Jakub Kicinski wrote: > On Thu, 19 Dec 2024 14:31:44 -0500 Willem de Bruijn wrote: > > All three timestamping flakes are instances where the script expects > > the timestamp to be taken essentially instantaneously after the send > > call. > > > > This is not the case, and the delay is outside even the 14K tolerance. > > I see occurrences of 20K. At some point we cannot keep increasing the > > tolerance, perhaps. > > I pinned the other services away and gave the packetdrill tester its > own cores. Let's see how much of a difference this makes. > The net-next-2024-12-20--03-00 branch will be the first to have this. Thanks. It does not seem to resolve the flakes. At this point I think the best path is to run them in debug mode to get coverage, but ignore errors. With the below draft patch, error output is still logged. For instance: # tcp_timestamping_partial.pkt:58: runtime error in recvmsg call: Bad timestamp 0 in scm_timestamping 0: expected=1734924748967958 (20000) actual=1734924748982069 (34111) start=1734924748947958 # ok 2 ipv6 # SKIP Such timestamping test failures are fairly straightforward. We could just increase the KSFT_MACHINE_SLOW timeout. But other tests see an actual difference in TCP stack behavior, e.g., size of packet. That is not addressed by a further relaxation of the tolerance. +++ b/tools/testing/selftests/net/packetdrill/ksft_runner.sh @@ -23,7 +23,7 @@ if [ $# -ne 1 ]; then ktap_exit_fail_msg "usage: $0 <script>" exit "$KSFT_FAIL" fi -script="$1" +script="$(basename $1)" if [ -z "$(which packetdrill)" ]; then ktap_skip_all "packetdrill not found in PATH" @@ -31,16 +31,27 @@ if [ -z "$(which packetdrill)" ]; then fi declare -a optargs +failfunc=ktap_test_fail + if [[ -n "${KSFT_MACHINE_SLOW}" ]]; then optargs+=('--tolerance_usecs=14000') + + declare -ar skip_list=( + "tcp_fast_recovery_prr-ss.*.pkt" + "tcp_timestamping.*.pkt" + "tcp_user_timeout_user-timeout-probe.pkt" + "tcp_zerocopy_epoll_.*.pkt" + ) + readonly skip_pattern="^($(printf '%s|' "${skip_list[@]}"))$" + [[ "$script" =~ ${skip_pattern} ]] && failfunc=ktap_test_skip fi ktap_print_header ktap_set_plan 2 -unshare -n packetdrill ${ipv4_args[@]} ${optargs[@]} $(basename $script) > /dev/null \ - && ktap_test_pass "ipv4" || ktap_test_fail "ipv4" -unshare -n packetdrill ${ipv6_args[@]} ${optargs[@]} $(basename $script) > /dev/null \ - && ktap_test_pass "ipv6" || ktap_test_fail "ipv6" +unshare -n packetdrill ${ipv4_args[@]} ${optargs[@]} $script > /dev/null \ + && ktap_test_pass "ipv4" || $failfunc "ipv4" +unshare -n packetdrill ${ipv6_args[@]} ${optargs[@]} $script > /dev/null \ + && ktap_test_pass "ipv6" || $failfunc "ipv6"