mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-08-15 23:53:51 +00:00

We keep seeing flakes on packetdrill on debug kernels, while non-debug kernels are stable, not a single flake in 200 runs. Time to give up, debug kernels appear to suffer from 10msec latency spikes and any timing-sensitive test is bound to flake. Reviewed-by: Willem de Bruijn <willemb@google.com> Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20250801181638.2483531-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
50 lines
1.3 KiB
Bash
Executable File
50 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
source "$(dirname $(realpath $0))/../../kselftest/ktap_helpers.sh"
|
|
|
|
readonly ipv4_args=('--ip_version=ipv4 '
|
|
'--local_ip=192.168.0.1 '
|
|
'--gateway_ip=192.168.0.1 '
|
|
'--netmask_ip=255.255.0.0 '
|
|
'--remote_ip=192.0.2.1 '
|
|
'-D CMSG_LEVEL_IP=SOL_IP '
|
|
'-D CMSG_TYPE_RECVERR=IP_RECVERR ')
|
|
|
|
readonly ipv6_args=('--ip_version=ipv6 '
|
|
'--mtu=1520 '
|
|
'--local_ip=fd3d:0a0b:17d6::1 '
|
|
'--gateway_ip=fd3d:0a0b:17d6:8888::1 '
|
|
'--remote_ip=fd3d:fa7b:d17d::1 '
|
|
'-D CMSG_LEVEL_IP=SOL_IPV6 '
|
|
'-D CMSG_TYPE_RECVERR=IPV6_RECVERR ')
|
|
|
|
if [ $# -ne 1 ]; then
|
|
ktap_exit_fail_msg "usage: $0 <script>"
|
|
exit "$KSFT_FAIL"
|
|
fi
|
|
script="$(basename $1)"
|
|
|
|
if [ -z "$(which packetdrill)" ]; then
|
|
ktap_skip_all "packetdrill not found in PATH"
|
|
exit "$KSFT_SKIP"
|
|
fi
|
|
|
|
declare -a optargs
|
|
failfunc=ktap_test_fail
|
|
|
|
if [[ -n "${KSFT_MACHINE_SLOW}" ]]; then
|
|
optargs+=('--tolerance_usecs=14000')
|
|
failfunc=ktap_test_xfail
|
|
fi
|
|
|
|
ktap_print_header
|
|
ktap_set_plan 2
|
|
|
|
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"
|
|
|
|
ktap_finished
|