Skip to content

Commit

Permalink
selftests/bpf: Fix running of XDP bonding tests
Browse files Browse the repository at this point in the history
An "innocent" cleanup in the last version of the XDP bonding patchset moved
the "test__start_subtest" calls to the test main function, but I forgot to
reverse the condition, which lead to all tests being skipped. Fix it.

Fixes: 6aab1c8 ("selftests/bpf: Add tests for XDP bonding")
Signed-off-by: Jussi Maki <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
  • Loading branch information
joamaki authored and borkmann committed Aug 11, 2021
1 parent 88be326 commit 25dc389
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/testing/selftests/bpf/prog_tests/xdp_bonding.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,20 +493,20 @@ void test_xdp_bonding(void)
"xdp_redirect_multi_kern__open_and_load"))
goto out;

if (!test__start_subtest("xdp_bonding_attach"))
if (test__start_subtest("xdp_bonding_attach"))
test_xdp_bonding_attach(&skeletons);

for (i = 0; i < ARRAY_SIZE(bond_test_cases); i++) {
struct bond_test_case *test_case = &bond_test_cases[i];

if (!test__start_subtest(test_case->name))
if (test__start_subtest(test_case->name))
test_xdp_bonding_with_mode(
&skeletons,
test_case->mode,
test_case->xmit_policy);
}

if (!test__start_subtest("xdp_bonding_redirect_multi"))
if (test__start_subtest("xdp_bonding_redirect_multi"))
test_xdp_bonding_redirect_multi(&skeletons);

out:
Expand Down

0 comments on commit 25dc389

Please sign in to comment.