Skip to content

Commit b50d882

Browse files
TropicaoKernel Patches Daemon
authored andcommitted
selftests/bpf: skip tc_tunnel subtest if its setup fails
A subtest setup can fail in a wide variety of ways, so make sure not to run it if an issue occurs during its setup. The return value is already representing whether the setup succeeds or fails, it is just about wiring it. Signed-off-by: Alexis Lothoré (eBPF Foundation) <[email protected]>
1 parent 385f65b commit b50d882

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/bpf/prog_tests/test_tc_tunnel.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,8 @@ void test_tc_tunnel(void)
666666
ret = build_subtest_name(cfg, cfg->name, TEST_NAME_MAX_LEN);
667667
if (ret < 0 || !test__start_subtest(cfg->name))
668668
continue;
669-
subtest_setup(skel, cfg);
670-
run_test(cfg);
669+
if (subtest_setup(skel, cfg) == 0)
670+
run_test(cfg);
671671
subtest_cleanup(cfg);
672672
}
673673
cleanup();

0 commit comments

Comments
 (0)