[SRU][J][PATCH 2/2] UBUNTU: SAUCE: selftests: net: veth: accept 0 for unsupported combined channels

Massimiliano Pellizzer massimiliano.pellizzer at canonical.com
Wed Dec 17 13:11:29 UTC 2025


 BugLink: https://bugs.launchpad.net/bugs/2136734

The chk_channels() function in veth.sh expects 'n/a' for unsupported
combined channels, but older ethtool versions (e.g., ethtool 5.4 on
Focal) report '0' instead of 'n/a'.

This causes test failures like:
	setting tx channels		fail rx:1:1 tx:2:2 combined:n/a:0

Fix by accepting both '0' and 'n/a' as valid values for unsupported
combined channels, and update the error message to show the actual
value instead of assuming 'n/a'.

Signed-off-by: Massimiliano Pellizzer <massimiliano.pellizzer at canonical.com>
---
 tools/testing/selftests/net/veth.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/net/veth.sh b/tools/testing/selftests/net/veth.sh
index e670d63dd38ca..9a16351e2f546 100755
--- a/tools/testing/selftests/net/veth.sh
+++ b/tools/testing/selftests/net/veth.sh
@@ -91,10 +91,10 @@ chk_channels() {
 		grep Combined: | tail -n 1 | awk '{print $2}'`
 
 	printf "%-60s" "$msg"
-	if [ "$cur_rx" = "$rx" -a "$cur_tx" = "$tx" -a "$cur_combined" = "n/a" ]; then
+	if [ "$cur_rx" = "$rx" -a "$cur_tx" = "$tx" ] && [ "$cur_combined" = "n/a" -o "$cur_combined" = "0" ]; then
 		echo " ok "
 	else
-		echo " fail rx:$rx:$cur_rx tx:$tx:$cur_tx combined:n/a:$cur_combined"
+		echo " fail rx:$rx:$cur_rx tx:$tx:$cur_tx combined:$cur_combined"
 	fi
 }
 
-- 
2.51.0




More information about the kernel-team mailing list