Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 1e42f73fd3c2 ("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>

authored by

Willem de Bruijn and committed by
Paolo Abeni
72ef0755 04e90683

+7 -2
+7 -2
tools/testing/selftests/net/packetdrill/ksft_runner.sh
··· 30 30 exit "$KSFT_SKIP" 31 31 fi 32 32 33 + declare -a optargs 34 + if [[ -n "${KSFT_MACHINE_SLOW}" ]]; then 35 + optargs+=('--tolerance_usecs=14000') 36 + fi 37 + 33 38 ktap_print_header 34 39 ktap_set_plan 2 35 40 36 - unshare -n packetdrill ${ipv4_args[@]} $(basename $script) > /dev/null \ 41 + unshare -n packetdrill ${ipv4_args[@]} ${optargs[@]} $(basename $script) > /dev/null \ 37 42 && 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 \ 39 44 && ktap_test_pass "ipv6" || ktap_test_fail "ipv6" 40 45 41 46 ktap_finished