Commit c076fd5b authored by Alexis Lothoré (eBPF Foundation)'s avatar Alexis Lothoré (eBPF Foundation) Committed by Martin KaFai Lau
Browse files

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: default avatarAlexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Signed-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20251031-tc_tunnel_improv-v1-1-0ffe44d27eda@bootlin.com
parent ab01bfad
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -666,7 +666,7 @@ void test_tc_tunnel(void)
		ret = build_subtest_name(cfg, cfg->name, TEST_NAME_MAX_LEN);
		if (ret < 0 || !test__start_subtest(cfg->name))
			continue;
		subtest_setup(skel, cfg);
		if (subtest_setup(skel, cfg) == 0)
			run_test(cfg);
		subtest_cleanup(cfg);
	}