Skip to contentSkip to conversation

selftests: net: veth: propagate channel-check failures to exit status

PATCH Superseded Omokefe Emmanuel Onanaroghene 3 participants 4 messages Nov 15

Subsystems (4)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: net: veth: propagate channel-check failures to exit status

chk_channels() reports mismatches with a "fail" line but never sets ret, so the script exits 0 even when channel counts are wrong. Every other check helper in the file (__chk_flag, chk_xdp_feature, chk_gro) sets ret=1 on failure, and all chk_channels() call sites expect the check to pass. Set ret=1 on mismatch.

Fixes c017800af5c71 ("selftests: net: veth: test peer ndo-xmit after GRO toggle while down")
---
 tools/testing/selftests/net/veth.sh | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/net/veth.sh +1 -0
index 64c2a5a59821d..5c1dbe1516bb4 100755
@@ -130,6 +130,7 @@ chk_channels() {
 		echo " ok "
 	else
 		echo " fail rx:$rx:$cur_rx tx:$tx:$cur_tx combined:n/a:$cur_combined"
+		ret=1
 	fi
 }
 
Signature · 1 line
2.43.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] selftests: net: veth: wrong Fixes trailer for chk_channels() fix --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Low] selftests: net: veth: wrong Fixes trailer for chk_channels() fix --

commit f30572a6b8a908de83aa08afbd2a257c0b17b275
Author: Omokefe Emmanuel Onanaroghene <[email protected]>

Quoted 10 lines

selftests: net: veth: propagate channel-check failures to exit status

chk_channels() reports mismatches with a "fail" line but never sets ret, so the script exits 0 even when channel counts are wrong. Every other check helper in the file (__chk_flag, chk_xdp_feature, chk_gro) sets ret=1 on failure, and all chk_channels() call sites expect the check to pass. Set ret=1 on mismatch.

Fixes c017800af5c71 ("selftests: net: veth: test peer ndo-xmit after GRO toggle while down")

[Severity: Low]
Commit c017800af5c7 ("selftests: net: veth: test peer ndo-xmit after GRO toggle while down") added chk_xdp_feature() above chk_channels() without touching chk_channels(). chk_channels() and its failure branch omitting ret=1 were introduced by commit 1ec2230fc721 ("selftests: net: veth: add tests for set_channel"), so the Fixes tag should be:

Fixes 1ec2230fc721 ("selftests: net: veth: add tests for set_channel")
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#2 lore raw

PATCH 1/1 selftests: net: veth: propagate channel-check failures to exit status

In reply to Omokefe Emmanuel Onanaroghene
Quoted 1 line · On Sun, 15 Nov 2026 22:21:16 +0100 Omokefe Emmanuel Onanaroghene wrote:
Fixes c017800af5c71 ("selftests: net: veth: test peer ndo-xmit after GRO toggle while down")

The Fixes tag should point to the commit that added chk_channels():

Fixes 1ec2230fc721 ("selftests: net: veth: add tests for set_channel")

c017800af5c7 did not change this helper. The bug is present since v5.15.

#3 lore raw
Quoted 6 lines · On Sun, 15 Nov 2026 21:34:29 +0000 Tianyi Gao wrote:

The Fixes tag should point to the commit that added chk_channels():

Fixes 1ec2230fc721 ("selftests: net: veth: add tests for set_channel")

c017800af5c7 did not change this helper. The bug is present since v5.15.

Thank you for confirming. v2 already carries the corrected tag:

https://lore.kernel.org/all/[email protected]/