From: David Ahern <dsahern@gmail•com>
To: netdev@vger•kernel.org
Cc: Thomas.Winter@alliedtelesis•co.nz, idosch@mellanox•com,
sharpd@cumulusnetworks•com, roopa@cumulusnetworks•com,
David Ahern <dsahern@gmail•com>
Subject: [PATCH RFC net-next 5/7] selftests: fib_tests: Add option to pause after each test
Date: Mon, 14 May 2018 19:51:10 -0700 [thread overview]
Message-ID: <20180515025112.16647-6-dsahern@gmail.com> (raw)
In-Reply-To: <20180515025112.16647-1-dsahern@gmail.com>
Add option to pause after each test before cleanup is done. Allows
user to do manual inspection or more ad-hoc testing after each test
with the setup in tact.
Signed-off-by: David Ahern <dsahern@gmail•com>
---
tools/testing/selftests/net/fib_tests.sh | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh
index 8c99f0689efc..12b648826151 100755
--- a/tools/testing/selftests/net/fib_tests.sh
+++ b/tools/testing/selftests/net/fib_tests.sh
@@ -9,6 +9,7 @@ ret=0
TESTS="unregister down carrier nexthop"
VERBOSE=0
PAUSE_ON_FAIL=no
+PAUSE=no
IP="ip -netns testns"
log_test()
@@ -31,6 +32,13 @@ log_test()
[ "$a" = "q" ] && exit 1
fi
fi
+
+ if [ "${PAUSE}" = "yes" ]; then
+ echo
+ echo "hit enter to continue, 'q' to quit"
+ read a
+ [ "$a" = "q" ] && exit 1
+ fi
}
setup()
@@ -576,6 +584,7 @@ usage: ${0##*/} OPTS
-t <test> Test(s) to run (default: all)
(options: $TESTS)
-p Pause on fail
+ -P Pause after each test before cleanup
-v verbose mode (show commands and output)
EOF
}
@@ -588,6 +597,7 @@ do
case $o in
t) TESTS=$OPTARG;;
p) PAUSE_ON_FAIL=yes;;
+ P) PAUSE=yes;;
v) VERBOSE=$(($VERBOSE + 1));;
h) usage; exit 0;;
*) usage; exit 1;;
@@ -596,6 +606,9 @@ done
PEER_CMD="ip netns exec ${PEER_NS}"
+# make sure we don't pause twice
+[ "${PAUSE}" = "yes" ] && PAUSE_ON_FAIL=no
+
if [ "$(id -u)" -ne 0 ];then
echo "SKIP: Need root privileges"
exit 0
--
2.11.0
next prev parent reply other threads:[~2018-05-15 2:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-15 2:51 [PATCH RFC net-next 0/7] net/ipv6: Fix route append and replace use cases David Ahern
2018-05-15 2:51 ` [PATCH RFC net-next 1/7] mlxsw: spectrum_router: Add support for route append David Ahern
2018-05-15 2:51 ` [PATCH RFC net-next 2/7] net/ipv6: Simplify route replace and appending into multipath route David Ahern
2018-05-15 2:51 ` [PATCH RFC net-next 3/7] selftests: fib_tests: Add success-fail counts David Ahern
2018-05-15 2:51 ` [PATCH RFC net-next 4/7] selftests: fib_tests: Add command line options David Ahern
2018-05-15 2:51 ` David Ahern [this message]
2018-05-15 2:51 ` [PATCH RFC net-next 6/7] selftests: fib_tests: Add ipv6 route add append replace tests David Ahern
2018-05-15 2:51 ` [PATCH RFC net-next 7/7] selftests: fib_tests: Add ipv4 " David Ahern
2018-05-15 5:21 ` [PATCH RFC net-next 0/7] net/ipv6: Fix route append and replace use cases Tobin C. Harding
2018-05-15 5:54 ` David Ahern
2018-05-15 6:12 ` Tobin C. Harding
2018-05-15 6:25 ` David Ahern
2018-05-15 6:38 ` Tobin C. Harding
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=20180515025112.16647-6-dsahern@gmail.com \
--to=dsahern@gmail$(echo .)com \
--cc=Thomas.Winter@alliedtelesis$(echo .)co.nz \
--cc=idosch@mellanox$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=roopa@cumulusnetworks$(echo .)com \
--cc=sharpd@cumulusnetworks$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox