Message ID | 1b62f171064b5735f49c7fc0d953763ec0434832.1712714407.git.tanggeliang@kylinos.cn (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Mat Martineau |
Headers | show |
Series | refactor mptcp bpf tests | expand |
Context | Check | Description |
---|---|---|
matttbe/build | success | Build and static analysis OK |
matttbe/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 20 lines checked |
matttbe/shellcheck | success | MPTCP selftests files have not been modified |
matttbe/KVM_Validation__normal | success | Success! ✅ |
matttbe/KVM_Validation__debug | success | Success! ✅ |
matttbe/KVM_Validation__btf__only_bpftest_all_ | success | Success! ✅ |
diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c index cbdb15922949..c29c81239603 100644 --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c @@ -653,12 +653,16 @@ static void test_burst(void) mptcp_bpf_burst__destroy(burst_skel); } +#define RUN_MPTCP_TEST(suffix) \ +do { \ + if (test__start_subtest(#suffix)) \ + test_##suffix(); \ +} while (0) + void test_mptcp(void) { - if (test__start_subtest("base")) - test_base(); - if (test__start_subtest("mptcpify")) - test_mptcpify(); + RUN_MPTCP_TEST(base); + RUN_MPTCP_TEST(mptcpify); if (test__start_subtest("default")) test_default(); if (test__start_subtest("first"))