selftests: netdevsim: fix SIGPIPE flake in ethtool-coalesce
Subsystems (6)
Jakub Kicinski
maintainerPATCH 1/1 selftests: netdevsim: fix SIGPIPE flake in ethtool-coalesce
The adaptive-rx and adaptive-tx checks use 'ethtool -c | grep -q' under 'set -o pipefail'. grep -q exits as soon as it finds a match, which can happen before ethtool finishes writing its output. When that occurs, ethtool receives SIGPIPE causing (uninformative):
# selftests: drivers/net/netdevsim: ethtool-coalesce.sh
# FAILED 1/22 checks
not ok 1 selftests: drivers/net/netdevsim: ethtool-coalesce.sh # exit=1
This happens on debug kernels in NIPA, ~4% of the time.
---
CC: [email protected]
CC: [email protected]
CC: [email protected]
--- .../drivers/net/netdevsim/ethtool-coalesce.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
tools/testing/selftests/drivers/net/netdevsim/ethtool-coalesce.sh +6 -4
@@ -116,12 +116,14 @@ done # bool settings which ethtool displays on the same line ethtool -C $NSIM_NETDEV adaptive-rx on -s=$(ethtool -c $NSIM_NETDEV | grep -q "Adaptive RX: on TX: off") -check $? "$s" "" +s=$(ethtool -c $NSIM_NETDEV) +echo "$s" | grep -q "Adaptive RX: on TX: off" +check $? "" "" ethtool -C $NSIM_NETDEV adaptive-tx on -s=$(ethtool -c $NSIM_NETDEV | grep -q "Adaptive RX: on TX: on") -check $? "$s" "" +s=$(ethtool -c $NSIM_NETDEV) +echo "$s" | grep -q "Adaptive RX: on TX: on" +check $? "" "" if [ $num_errors -eq 0 ]; then echo "PASSED all $((num_passes)) checks"
Signature · 1 line
2.55.0
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Sat, 8 Aug 2026 09:34:16 -0700 you wrote:
The adaptive-rx and adaptive-tx checks use 'ethtool -c | grep -q' under 'set -o pipefail'. grep -q exits as soon as it finds a match, which can happen before ethtool finishes writing its output. When that occurs, ethtool receives SIGPIPE causing (uninformative):
# selftests:
drivers/net/netdevsim:ethtool-coalesce.sh
# FAILED 1/22 checks
not ok 1 selftests:drivers/net/netdevsim:ethtool-coalesce.sh# exit=1[...]
Here is the summary with links:
- [net-next] selftests: netdevsim: fix SIGPIPE flake in ethtool-coalesce
https://git.kernel.org/netdev/net-next/c/4d2cbd620a7f
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html