From: Magnus Karlsson <magnus.karlsson@gmail.com>
To: magnus.karlsson@intel.com, bjorn@kernel.org, ast@kernel.org,
daniel@iogearbox.net, netdev@vger.kernel.org,
maciej.fijalkowski@intel.com, bpf@vger.kernel.org, yhs@fb.com,
andrii@kernel.org, martin.lau@linux.dev, song@kernel.org,
john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com,
haoluo@google.com, jolsa@kernel.org
Subject: [PATCH bpf-next 10/10] selftests/xsk: display command line options with -h
Date: Wed, 9 Aug 2023 14:43:43 +0200 [thread overview]
Message-ID: <20230809124343.12957-11-magnus.karlsson@gmail.com> (raw)
In-Reply-To: <20230809124343.12957-1-magnus.karlsson@gmail.com>
From: Magnus Karlsson <magnus.karlsson@intel.com>
Add the -h option to display all available command line options
available for test_xsk.sh and xskxceiver.
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
---
tools/testing/selftests/bpf/test_xsk.sh | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_xsk.sh b/tools/testing/selftests/bpf/test_xsk.sh
index 94b4b86d5239..baaeb016d699 100755
--- a/tools/testing/selftests/bpf/test_xsk.sh
+++ b/tools/testing/selftests/bpf/test_xsk.sh
@@ -79,12 +79,15 @@
#
# Run a specific test from the test suite
# sudo ./test_xsk.sh -t TEST_NAME
+#
+# Display the available command line options
+# sudo ./test_xsk.sh -h
. xsk_prereqs.sh
ETH=""
-while getopts "vi:dm:lt:" flag
+while getopts "vi:dm:lt:h" flag
do
case "${flag}" in
v) verbose=1;;
@@ -93,6 +96,7 @@ do
m) MODE=${OPTARG};;
l) list=1;;
t) TEST=${OPTARG};;
+ h) help=1;;
esac
done
@@ -140,6 +144,11 @@ setup_vethPairs() {
ip link set ${VETH0} up
}
+if [[ $help -eq 1 ]]; then
+ ./${XSKOBJ}
+ exit
+fi
+
if [ ! -z $ETH ]; then
VETH0=${ETH}
VETH1=${ETH}
--
2.34.1
next prev parent reply other threads:[~2023-08-09 12:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 12:43 [PATCH bpf-next 00/10] seltests/xsk: various improvements to xskxceiver Magnus Karlsson
2023-08-09 12:43 ` [PATCH bpf-next 01/10] selftests/xsk: print per packet info in verbose mode Magnus Karlsson
2023-08-09 12:43 ` [PATCH bpf-next 02/10] selftests/xsk: add timeout for Tx thread Magnus Karlsson
2023-08-09 12:43 ` [PATCH bpf-next 03/10] selftests/xsk: add option to only run tests in a single mode Magnus Karlsson
2023-08-10 12:14 ` Przemek Kitszel
2023-08-10 12:36 ` Magnus Karlsson
2023-08-09 12:43 ` [PATCH bpf-next 04/10] selftests/xsk: move all tests to separate functions Magnus Karlsson
2023-08-09 12:43 ` [PATCH bpf-next 05/10] selftests/xsk: declare test names in struct Magnus Karlsson
2023-08-10 12:15 ` Przemek Kitszel
2023-08-10 12:36 ` Magnus Karlsson
2023-08-22 12:28 ` Maciej Fijalkowski
2023-08-09 12:43 ` [PATCH bpf-next 06/10] selftests/xsk: add option that lists all tests Magnus Karlsson
2023-08-22 12:37 ` Maciej Fijalkowski
2023-08-22 13:52 ` Magnus Karlsson
2023-08-09 12:43 ` [PATCH bpf-next 07/10] selftests/xsk: add option to run single test Magnus Karlsson
2023-08-22 12:50 ` Maciej Fijalkowski
2023-08-09 12:43 ` [PATCH bpf-next 08/10] selftests/xsk: use ksft_print_msg uniformly Magnus Karlsson
2023-08-09 12:43 ` [PATCH bpf-next 09/10] selftests/xsk: fail single test instead of all tests Magnus Karlsson
2023-08-09 12:43 ` Magnus Karlsson [this message]
2023-08-10 12:19 ` [PATCH bpf-next 10/10] selftests/xsk: display command line options with -h Przemek Kitszel
2023-08-10 12:41 ` Magnus Karlsson
2023-08-22 13:02 ` Maciej Fijalkowski
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=20230809124343.12957-11-magnus.karlsson@gmail.com \
--to=magnus.karlsson@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bjorn@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=yhs@fb.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 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).