Skip to content

Commit b8a81b0

Browse files
author
Florian Westphal
committed
selftests: netfilter: prefer xfail in case race wasn't triggered
Jakub says: "We try to reserve SKIP for tests skipped because tool is missing in env, something isn't built into the kernel etc." use xfail, we can't force the race condition to appear at will so its expected that the test 'fails' occasionally. Fixes: 78a5883 ("selftests: netfilter: add conntrack clash resolution test case") Reported-by: Jakub Kicinski <kuba@kernel.org> Closes: https://lore.kernel.org/netdev/20251206175647.5c32f419@kernel.org/ Signed-off-by: Florian Westphal <fw@strlen.de>
1 parent 2bdc536 commit b8a81b0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tools/testing/selftests/net/netfilter/conntrack_clash.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ run_one_clash_test()
116116
# not a failure: clash resolution logic did not trigger.
117117
# With right timing, xmit completed sequentially and
118118
# no parallel insertion occurs.
119-
return $ksft_skip
119+
return $ksft_xfail
120120
}
121121

122122
run_clash_test()
@@ -133,12 +133,12 @@ run_clash_test()
133133
if [ $rv -eq 0 ];then
134134
echo "PASS: clash resolution test for $daddr:$dport on attempt $i"
135135
return 0
136-
elif [ $rv -eq $ksft_skip ]; then
136+
elif [ $rv -eq $ksft_xfail ]; then
137137
softerr=1
138138
fi
139139
done
140140

141-
[ $softerr -eq 1 ] && echo "SKIP: clash resolution for $daddr:$dport did not trigger"
141+
[ $softerr -eq 1 ] && echo "XFAIL: clash resolution for $daddr:$dport did not trigger"
142142
}
143143

144144
ip link add veth0 netns "$nsclient1" type veth peer name veth0 netns "$nsrouter"
@@ -167,8 +167,7 @@ load_simple_ruleset "$nsclient2"
167167
run_clash_test "$nsclient2" "$nsclient2" 127.0.0.1 9001
168168

169169
if [ $clash_resolution_active -eq 0 ];then
170-
[ "$ret" -eq 0 ] && ret=$ksft_skip
171-
echo "SKIP: Clash resolution did not trigger"
170+
[ "$ret" -eq 0 ] && ret=$ksft_xfail
172171
fi
173172

174173
exit $ret

0 commit comments

Comments
 (0)