diff options
author | Magnus Karlsson <magnus.karlsson@intel.com> | 2023-09-14 10:48:57 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-09-14 09:47:56 -0700 |
commit | 4a5f0ba55f4621aed4b22d28e496793e438555e1 (patch) | |
tree | 3517abd9c342d0989c5e41651cd0825d14a77231 /tools/testing/selftests/bpf/xskxceiver.c | |
parent | 5fc494d5ab4119967aa967aab0b70bab8bb8b970 (diff) |
selftests/xsk: display command line options with -h
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>
Link: https://lore.kernel.org/r/20230914084900.492-11-magnus.karlsson@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/xskxceiver.c')
-rw-r--r-- | tools/testing/selftests/bpf/xskxceiver.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/xskxceiver.c b/tools/testing/selftests/bpf/xskxceiver.c index d64061d647ae..43e0a5796929 100644 --- a/tools/testing/selftests/bpf/xskxceiver.c +++ b/tools/testing/selftests/bpf/xskxceiver.c @@ -318,6 +318,7 @@ static struct option long_options[] = { {"mode", required_argument, 0, 'm'}, {"list", no_argument, 0, 'l'}, {"test", required_argument, 0, 't'}, + {"help", no_argument, 0, 'h'}, {0, 0, 0, 0} }; @@ -331,7 +332,8 @@ static void print_usage(char **argv) " -b, --busy-poll Enable busy poll\n" " -m, --mode Run only mode skb, drv, or zc\n" " -l, --list List all available tests\n" - " -t, --test Run a specific test. Enter number from -l option.\n"; + " -t, --test Run a specific test. Enter number from -l option.\n" + " -h, --help Display this help and exit\n"; ksft_print_msg(str, basename(argv[0])); ksft_exit_xfail(); @@ -402,6 +404,7 @@ static void parse_command_line(struct ifobject *ifobj_tx, struct ifobject *ifobj if (errno) print_usage(argv); break; + case 'h': default: print_usage(argv); } |