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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180301190947.7299-3-dsahern@gmail.com>
Date:   Thu,  1 Mar 2018 11:09:44 -0800
From:   David Ahern <dsahern@...il.com>
To:     netdev@...r.kernel.org
Cc:     linux-kselftest@...r.kernel.org, idosch@...lanox.com,
        jiri@...lanox.com, David Ahern <dsahern@...il.com>
Subject: [PATCH net-next 2/5] selftests: forwarding: Only check for mz when it is needed

Add a CHECK_MZ flag and only check if mz exists when flag is set.
If it does not exist, exit non-0.

Signed-off-by: David Ahern <dsahern@...il.com>
---
 tools/testing/selftests/net/forwarding/lib.sh              | 8 +++++---
 tools/testing/selftests/net/forwarding/router_multipath.sh | 1 +
 tools/testing/selftests/net/forwarding/tc_common.sh        | 1 +
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index d0af52109360..f21b3ac11d27 100644
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -48,9 +48,11 @@ if [[ ! -x "$(command -v jq)" ]]; then
 	exit 1
 fi
 
-if [[ ! -x "$(command -v $MZ)" ]]; then
-	echo "SKIP: $MZ not installed"
-	exit 0
+if [[ "$CHECK_MZ" = "yes" ]]; then
+	if [[ ! -x "$(command -v $MZ)" ]]; then
+		echo "SKIP: $MZ not installed"
+		exit 1
+	fi
 fi
 
 if [[ ! -v NUM_NETIFS ]]; then
diff --git a/tools/testing/selftests/net/forwarding/router_multipath.sh b/tools/testing/selftests/net/forwarding/router_multipath.sh
index d31888e3133e..d40016443272 100755
--- a/tools/testing/selftests/net/forwarding/router_multipath.sh
+++ b/tools/testing/selftests/net/forwarding/router_multipath.sh
@@ -2,6 +2,7 @@
 # SPDX-License-Identifier: GPL-2.0
 
 NUM_NETIFS=8
+CHECK_MZ="yes"
 source lib.sh
 
 h1_create()
diff --git a/tools/testing/selftests/net/forwarding/tc_common.sh b/tools/testing/selftests/net/forwarding/tc_common.sh
index 9d3b64a2a264..d93cd7599bc1 100644
--- a/tools/testing/selftests/net/forwarding/tc_common.sh
+++ b/tools/testing/selftests/net/forwarding/tc_common.sh
@@ -2,6 +2,7 @@
 # SPDX-License-Identifier: GPL-2.0
 
 CHECK_TC="yes"
+CHECK_MZ="yes"
 
 tc_check_packets()
 {
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ