lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240903151524.586614-1-anezbeda@redhat.com>
Date: Tue,  3 Sep 2024 17:15:24 +0200
From: Ales Nezbeda <anezbeda@...hat.com>
To: netdev@...r.kernel.org
Cc: sd@...asysnail.net,
	davem@...emloft.net,
	Ales Nezbeda <anezbeda@...hat.com>
Subject: [PATCH net] selftests: rtnetlink: add 'ethtool' as a dependency

Introduction of `kci_test_macsec_offload()` in `rtnetlink.sh` created
a new dependency `ethtool` for the test suite. This dependency is not
reflected in checks that run before all the tests, so if the `ethtool`
is not present, all tests will start, but `macsec_offload` test will
fail with a misleading message. Message would say that MACsec offload is
not supported, yet it never actually managed to check this, since it
needs the `ethtool` to do so.

Fixes: 3b5222e2ac57 ("selftests: rtnetlink: add MACsec offload tests")
Signed-off-by: Ales Nezbeda <anezbeda@...hat.com>
---
 tools/testing/selftests/net/rtnetlink.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh
index bdf6f10d0558..fdd116458222 100755
--- a/tools/testing/selftests/net/rtnetlink.sh
+++ b/tools/testing/selftests/net/rtnetlink.sh
@@ -1306,6 +1306,7 @@ if [ "$(id -u)" -ne 0 ];then
 	exit $ksft_skip
 fi
 
+#check for dependencies
 for x in ip tc;do
 	$x -Version 2>/dev/null >/dev/null
 	if [ $? -ne 0 ];then
@@ -1313,6 +1314,11 @@ for x in ip tc;do
 		exit $ksft_skip
 	fi
 done
+ethtool --version 2>/dev/null >/dev/null
+if [ $? -ne 0 ];then
+	end_test "SKIP: Could not run test without the ethtool tool"
+	exit $ksft_skip
+fi
 
 while getopts t:hvpP o; do
 	case $o in
-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ