Skip to content

Commit 9f78149

Browse files
committed
selftests/bpf: Fix namespace usage in flow_dissector tests
The flow_dissector_skb_less_{direct,indirect}_attach tests support parallel execution, but each tries to create the same namespace and may result in timing-dependent test failures: root@qemu-armhf# ./test_progs -j2 -t flow_dissector_skb_less Cannot create namespace file "/run/netns/flow_dissector_skb_less_indirect_attach_ns": File exists Cannot open network namespace "flow_dissector_skb_less_indirect_attach_ns": No such file or directory test_flow_dissector_skb_less_direct_attach:FAIL:create and open netns unexpected error: -2 torvalds#116 flow_dissector_skb_less_direct_attach:FAIL test_flow_dissector_skb_less_indirect_attach:FAIL:create and open netns unexpected error: -2 torvalds#117 flow_dissector_skb_less_indirect_attach:FAIL Fix the apparent typo, allowing each test use of a unique net namespace and avoiding these errors. Fixes: 2b044dd ("selftests/bpf: re-split main function into dedicated tests") Signed-off-by: Tony Ambardar <tony.ambardar@gmail.com>
1 parent 9c42092 commit 9f78149

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ void test_flow_dissector_skb_less_direct_attach(void)
706706
struct bpf_flow *skel;
707707
struct netns_obj *ns;
708708

709-
ns = netns_new("flow_dissector_skb_less_indirect_attach_ns", true);
709+
ns = netns_new("flow_dissector_skb_less_direct_attach_ns", true);
710710
if (!ASSERT_OK_PTR(ns, "create and open netns"))
711711
return;
712712

0 commit comments

Comments
 (0)