diff options
author | Eduard Zingerman <eddyz87@gmail.com> | 2024-07-22 16:38:40 -0700 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2024-07-29 15:05:06 -0700 |
commit | 4ef5d6af493558124b7a6c13cace58b938fe27d4 (patch) | |
tree | e5976500ec92f0e2c7437a411846426a95af3c30 /tools/gpio/Makefile | |
parent | 203e6aba7692bca18fd97251b1354da0f5e2ba30 (diff) |
selftests/bpf: no need to track next_match_pos in struct test_loader
The call stack for validate_case() function looks as follows:
- test_loader__run_subtests()
- process_subtest()
- run_subtest()
- prepare_case(), which does 'tester->next_match_pos = 0';
- validate_case(), which increments tester->next_match_pos.
Hence, each subtest is run with next_match_pos freshly set to zero.
Meaning that there is no need to persist this variable in the
struct test_loader, use local variable instead.
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20240722233844.1406874-7-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to 'tools/gpio/Makefile')
0 files changed, 0 insertions, 0 deletions