netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] selftests: netdevsim: Fix ethtool-features.sh fail
@ 2025-10-30  3:22 Wang Liang
  2025-10-30 23:13 ` Sabrina Dubroca
  0 siblings, 1 reply; 12+ messages in thread
From: Wang Liang @ 2025-10-30  3:22 UTC (permalink / raw)
  To: kuba, andrew, davem, edumazet, pabeni, shuah, horms, sd
  Cc: netdev, linux-kselftest, linux-kernel, yuehaibing,
	zhangchangzhong, wangliang74

The test 'ethtool-features.sh' failed with the below output:

  TAP version 13
  1..1
  # timeout set to 600
  # selftests: drivers/net/netdevsim: ethtool-features.sh
  # Warning: file ethtool-features.sh is not executable
  # ethtool: bad command line argument(s)
  # For more information run ethtool -h
  # ethtool: bad command line argument(s)
  # For more information run ethtool -h
  # ethtool: bad command line argument(s)
  # For more information run ethtool -h
  # ethtool: bad command line argument(s)
  # For more information run ethtool -h
  # ethtool: bad command line argument(s)
  # For more information run ethtool -h
  # ethtool: bad command line argument(s)
  # For more information run ethtool -h
  # ethtool: bad command line argument(s)
  # For more information run ethtool -h
  # ethtool: bad command line argument(s)
  # For more information run ethtool -h
  # ethtool: bad command line argument(s)
  # For more information run ethtool -h
  # ethtool: bad command line argument(s)
  # For more information run ethtool -h
  # FAILED 10/10 checks
  not ok 1 selftests: drivers/net/netdevsim: ethtool-features.sh # exit=1

Similar to commit 18378b0e49d9 ("selftests/damon: Add executable
permission to test scripts"), the script 'ethtool-features.sh' has no
executable permission, which leads to the warning 'file
ethtool-features.sh is not executable'.

Old version ethtool (my ethtool version is 5.16) does not support command
'ethtool --json -k enp1s0', which leads to the output 'ethtool: bad
command line argument(s)'.

This patch adds executable permission to script 'ethtool-features.sh', and
check 'ethtool --json -k' support. After this patch:

  TAP version 13
  1..1
  # timeout set to 600
  # selftests: drivers/net/netdevsim: ethtool-features.sh
  # SKIP: No --json -k support in ethtool
  ok 1 selftests: drivers/net/netdevsim: ethtool-features.sh

Fixes: 0189270117c3 ("selftests: netdevsim: add a test checking ethtool features")
Signed-off-by: Wang Liang <wangliang74@huawei.com>
---
 .../selftests/drivers/net/netdevsim/ethtool-features.sh      | 5 +++++
 1 file changed, 5 insertions(+)
 mode change 100644 => 100755 tools/testing/selftests/drivers/net/netdevsim/ethtool-features.sh

diff --git a/tools/testing/selftests/drivers/net/netdevsim/ethtool-features.sh b/tools/testing/selftests/drivers/net/netdevsim/ethtool-features.sh
old mode 100644
new mode 100755
index bc210dc6ad2d..f771dc6839ea
--- a/tools/testing/selftests/drivers/net/netdevsim/ethtool-features.sh
+++ b/tools/testing/selftests/drivers/net/netdevsim/ethtool-features.sh
@@ -7,6 +7,11 @@ NSIM_NETDEV=$(make_netdev)
 
 set -o pipefail
 
+if ! ethtool --json -k $NSIM_NETDEV > /dev/null 2>&1; then
+	echo "SKIP: No --json -k support in ethtool"
+	exit $ksft_skip
+fi
+
 FEATS="
   tx-checksum-ip-generic
   tx-scatter-gather
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-11-05  0:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-30  3:22 [PATCH net] selftests: netdevsim: Fix ethtool-features.sh fail Wang Liang
2025-10-30 23:13 ` Sabrina Dubroca
2025-10-31  0:02   ` Jakub Kicinski
2025-11-03 10:13     ` Sabrina Dubroca
2025-11-03 13:36       ` Andrew Lunn
2025-11-03 15:01         ` Sabrina Dubroca
2025-11-03 15:31           ` Andrew Lunn
2025-11-04  0:01       ` Jakub Kicinski
2025-11-04 11:04         ` Sabrina Dubroca
2025-11-05  0:51           ` Jakub Kicinski
2025-11-03  8:58   ` Wang Liang
2025-11-03  9:59     ` Sabrina Dubroca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).