diff options
author | Eduard Zingerman <eddyz87@gmail.com> | 2024-07-23 02:38:40 +0300 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2024-07-30 01:05:06 +0300 |
commit | 4ef5d6af493558124b7a6c13cace58b938fe27d4 (patch) | |
tree | e5976500ec92f0e2c7437a411846426a95af3c30 /scripts/lib/kdoc/kdoc_files.py | |
parent | 203e6aba7692bca18fd97251b1354da0f5e2ba30 (diff) | |
download | linux-4ef5d6af493558124b7a6c13cace58b938fe27d4.tar.xz |
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 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions