Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/bpf: Turn fexit_bpf2bpf into test with subtests

There are clearly 4 subtests, so make it official.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200903203542.15944-12-andriin@fb.com

authored by

Andrii Nakryiko and committed by
Alexei Starovoitov
d86687ae 52109584

+14 -7
+14 -7
tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c
··· 208 208 209 209 void test_fexit_bpf2bpf(void) 210 210 { 211 - test_target_no_callees(); 212 - test_target_yes_callees(); 213 - test_func_replace(); 214 - test_func_replace_verify(); 215 - test_func_sockmap_update(); 216 - test_func_replace_return_code(); 217 - test_func_map_prog_compatibility(); 211 + if (test__start_subtest("target_no_callees")) 212 + test_target_no_callees(); 213 + if (test__start_subtest("target_yes_callees")) 214 + test_target_yes_callees(); 215 + if (test__start_subtest("func_replace")) 216 + test_func_replace(); 217 + if (test__start_subtest("func_replace_verify")) 218 + test_func_replace_verify(); 219 + if (test__start_subtest("func_sockmap_update")) 220 + test_func_sockmap_update(); 221 + if (test__start_subtest("func_replace_return_code")) 222 + test_func_replace_return_code(); 223 + if (test__start_subtest("func_map_prog_compatibility")) 224 + test_func_map_prog_compatibility(); 218 225 }