[SRU][J][PATCH 2/2] UBUNTU: SAUCE: selftests: net: veth: accept 0 for unsupported combined channels
Juerg Haefliger
juerg.haefliger at canonical.com
Thu Dec 18 10:45:56 UTC 2025
On Wed, 17 Dec 2025 14:11:29 +0100
Massimiliano Pellizzer <massimiliano.pellizzer at canonical.com> wrote:
> BugLink: https://bugs.launchpad.net/bugs/2136734
^
Stray leading space.
Should be fixed when applied.
...Juerg
>
> 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
> }
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20251218/e8194b39/attachment-0001.sig>
More information about the kernel-team
mailing list