Skip to content

Commit 72ef075

Browse files
wdebruijPaolo Abeni
authored andcommitted
selftests/net: packetdrill: increase timing tolerance in debug mode
Some packetdrill tests are flaky in debug mode. As discussed, increase tolerance. We have been doing this for debug builds outside ksft too. Previous setting was 10000. A manual 50 runs in virtme-ng showed two failures that needed 12000. To be on the safe side, Increase to 14000. Link: https://lore.kernel.org/netdev/Zuhhe4-MQHd3EkfN@mini-arch/ Fixes: 1e42f73 ("selftests/net: packetdrill: import tcp/zerocopy") Reported-by: Stanislav Fomichev <sdf@fomichev.me> Signed-off-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Simon Horman <horms@kernel.org> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20240919124412.3014326-1-willemdebruijn.kernel@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 04e9068 commit 72ef075

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tools/testing/selftests/net/packetdrill/ksft_runner.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,17 @@ if [ -z "$(which packetdrill)" ]; then
3030
exit "$KSFT_SKIP"
3131
fi
3232

33+
declare -a optargs
34+
if [[ -n "${KSFT_MACHINE_SLOW}" ]]; then
35+
optargs+=('--tolerance_usecs=14000')
36+
fi
37+
3338
ktap_print_header
3439
ktap_set_plan 2
3540

36-
unshare -n packetdrill ${ipv4_args[@]} $(basename $script) > /dev/null \
41+
unshare -n packetdrill ${ipv4_args[@]} ${optargs[@]} $(basename $script) > /dev/null \
3742
&& ktap_test_pass "ipv4" || ktap_test_fail "ipv4"
38-
unshare -n packetdrill ${ipv6_args[@]} $(basename $script) > /dev/null \
43+
unshare -n packetdrill ${ipv6_args[@]} ${optargs[@]} $(basename $script) > /dev/null \
3944
&& ktap_test_pass "ipv6" || ktap_test_fail "ipv6"
4045

4146
ktap_finished

0 commit comments

Comments
 (0)