From: dsahern at gmail.com (David Ahern)
Subject: [PATCH net-next 2/5] selftests: forwarding: Only check for mz when it is needed
Date: Thu, 1 Mar 2018 11:09:44 -0800 [thread overview]
Message-ID: <20180301190947.7299-3-dsahern@gmail.com> (raw)
In-Reply-To: <20180301190947.7299-1-dsahern@gmail.com>
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 at gmail.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: dsahern@gmail.com (David Ahern)
Subject: [PATCH net-next 2/5] selftests: forwarding: Only check for mz when it is needed
Date: Thu, 1 Mar 2018 11:09:44 -0800 [thread overview]
Message-ID: <20180301190947.7299-3-dsahern@gmail.com> (raw)
Message-ID: <20180301190944.jNss-VUmKnWYy9phhqr55ZzxDebLb_XwbXdYYPWCIzE@z> (raw)
In-Reply-To: <20180301190947.7299-1-dsahern@gmail.com>
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 at gmail.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: David Ahern <dsahern@gmail.com>
To: netdev@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org, idosch@mellanox.com,
jiri@mellanox.com, David Ahern <dsahern@gmail.com>
Subject: [PATCH net-next 2/5] selftests: forwarding: Only check for mz when it is needed
Date: Thu, 1 Mar 2018 11:09:44 -0800 [thread overview]
Message-ID: <20180301190947.7299-3-dsahern@gmail.com> (raw)
In-Reply-To: <20180301190947.7299-1-dsahern@gmail.com>
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@gmail.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
next prev parent reply other threads:[~2018-03-01 19:09 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-01 19:09 [PATCH net-next 0/5] selftests: forwarding: misc bug fixes and enhancements dsahern
2018-03-01 19:09 ` David Ahern
2018-03-01 19:09 ` David Ahern
2018-03-01 19:09 ` [PATCH net-next 1/5] selftests: forwarding: Only check tc version for tc tests dsahern
2018-03-01 19:09 ` David Ahern
2018-03-01 19:09 ` David Ahern
2018-03-01 20:12 ` idosch
2018-03-01 20:12 ` Ido Schimmel
2018-03-01 20:12 ` Ido Schimmel
2018-03-01 19:09 ` dsahern [this message]
2018-03-01 19:09 ` [PATCH net-next 2/5] selftests: forwarding: Only check for mz when it is needed David Ahern
2018-03-01 19:09 ` David Ahern
2018-03-01 19:36 ` idosch
2018-03-01 19:36 ` Ido Schimmel
2018-03-01 19:36 ` Ido Schimmel
2018-03-01 21:44 ` dsahern
2018-03-01 21:44 ` David Ahern
2018-03-01 21:44 ` David Ahern
2018-03-01 19:09 ` [PATCH net-next 3/5] selftests: forwarding: Handle 0 for packet difference in multipath tests dsahern
2018-03-01 19:09 ` David Ahern
2018-03-01 19:09 ` David Ahern
2018-03-01 19:37 ` idosch
2018-03-01 19:37 ` Ido Schimmel
2018-03-01 19:37 ` Ido Schimmel
2018-03-01 19:09 ` [PATCH net-next 4/5] selftests: forwarding: Use PING6 instead of ping for ipv6 multipath test dsahern
2018-03-01 19:09 ` David Ahern
2018-03-01 19:09 ` David Ahern
2018-03-01 19:39 ` idosch
2018-03-01 19:39 ` Ido Schimmel
2018-03-01 19:39 ` Ido Schimmel
2018-03-01 19:43 ` dsahern
2018-03-01 19:43 ` David Ahern
2018-03-01 19:43 ` David Ahern
2018-03-01 19:49 ` idosch
2018-03-01 19:49 ` Ido Schimmel
2018-03-01 19:49 ` Ido Schimmel
2018-03-01 19:09 ` [PATCH net-next 5/5] selftests: forwarding: Add description to the multipath tests dsahern
2018-03-01 19:09 ` David Ahern
2018-03-01 19:09 ` David Ahern
2018-03-01 19:43 ` idosch
2018-03-01 19:43 ` Ido Schimmel
2018-03-01 19:43 ` Ido Schimmel
2018-03-01 19:27 ` [PATCH net-next 0/5] selftests: forwarding: misc bug fixes and enhancements idosch
2018-03-01 19:27 ` Ido Schimmel
2018-03-01 19:27 ` Ido Schimmel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180301190947.7299-3-dsahern@gmail.com \
--to=unknown@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.