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

Configure Feed

Select the types of activity you want to include in your feed.

selftests: net: speed up pmtu.sh by avoiding unnecessary cleanup

The pmtu test takes nearly an hour when run on a debug kernel
(10min on a normal kernel, so the debug slow down is quite significant).
NIPA tries to ensure all results are delivered by a certain deadline
so this prevents it from retrying the test in case of a flake.

Looks like one of the slowest operations in the test is calling out
to ./openvswitch/ovs-dpctl.py to remove potential leftover OvS interfaces.
Check whether the interfaces exist in the first place in sysfs,
since it can be done directly in bash it is very fast.

This should save us around 20-30% of the test runtime.

Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250906214535.3204785-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+5 -4
+5 -4
tools/testing/selftests/net/pmtu.sh
··· 1089 1089 1090 1090 cleanup_all_ns 1091 1091 1092 - ip link del veth_A-C 2>/dev/null 1093 - ip link del veth_A-R1 2>/dev/null 1094 - cleanup_del_ovs_internal 1095 - cleanup_del_ovs_vswitchd 1092 + [ -e "/sys/class/net/veth_A-C" ] && ip link del veth_A-C 1093 + [ -e "/sys/class/net/veth_A-R1" ] && ip link del veth_A-R1 1094 + [ -e "/sys/class/net/ovs_br0" ] && cleanup_del_ovs_internal 1095 + [ -e "/sys/class/net/ovs_br0" ] && cleanup_del_ovs_vswitchd 1096 + 1096 1097 rm -f "$tmpoutfile" 1097 1098 } 1098 1099