Skip to content

Commit

Permalink
selftests/net: packetdrill: increase timing tolerance in debug mode
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Willem de Bruijn <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Acked-by: Stanislav Fomichev <[email protected]>
Acked-by: Matthieu Baerts (NGI0) <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
  • Loading branch information
wdebruij authored and Paolo Abeni committed Sep 26, 2024
1 parent 04e9068 commit 72ef075
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tools/testing/selftests/net/packetdrill/ksft_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,17 @@ if [ -z "$(which packetdrill)" ]; then
exit "$KSFT_SKIP"
fi

declare -a optargs
if [[ -n "${KSFT_MACHINE_SLOW}" ]]; then
optargs+=('--tolerance_usecs=14000')
fi

ktap_print_header
ktap_set_plan 2

unshare -n packetdrill ${ipv4_args[@]} $(basename $script) > /dev/null \
unshare -n packetdrill ${ipv4_args[@]} ${optargs[@]} $(basename $script) > /dev/null \
&& ktap_test_pass "ipv4" || ktap_test_fail "ipv4"
unshare -n packetdrill ${ipv6_args[@]} $(basename $script) > /dev/null \
unshare -n packetdrill ${ipv6_args[@]} ${optargs[@]} $(basename $script) > /dev/null \
&& ktap_test_pass "ipv6" || ktap_test_fail "ipv6"

ktap_finished

0 comments on commit 72ef075

Please sign in to comment.