diff options
author | Ciara Loftus <ciara.loftus@intel.com> | 2021-02-23 16:23:02 +0000 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-02-26 12:08:48 -0800 |
commit | d2b0dfd5d1f94fe74ed580b5a1d5fdb5bf11f2fb (patch) | |
tree | fd96fff68c175fc0b6a8e94bd16c71ef019efc44 /tools/testing/selftests/bpf/test_xsk.sh | |
parent | selftest/bpf: Make xsk tests less verbose (diff) | |
download | linux-dev-d2b0dfd5d1f94fe74ed580b5a1d5fdb5bf11f2fb.tar.xz linux-dev-d2b0dfd5d1f94fe74ed580b5a1d5fdb5bf11f2fb.zip |
selftests/bpf: Expose and rename debug argument
Launching xdpxceiver with -D enables what was formerly know as 'debug'
mode. Rename this mode to 'dump-pkts' as it better describes the
behavior enabled by the option. New usage:
./xdpxceiver .. -D
or
./xdpxceiver .. --dump-pkts
Also make it possible to pass this flag to the app via the test_xsk.sh
shell script like so:
./test_xsk.sh -D
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210223162304.7450-3-ciara.loftus@intel.com
Diffstat (limited to 'tools/testing/selftests/bpf/test_xsk.sh')
-rwxr-xr-x | tools/testing/selftests/bpf/test_xsk.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/test_xsk.sh b/tools/testing/selftests/bpf/test_xsk.sh index f4cedf4c2718..dbb129a36606 100755 --- a/tools/testing/selftests/bpf/test_xsk.sh +++ b/tools/testing/selftests/bpf/test_xsk.sh @@ -74,14 +74,18 @@ # # Run with verbose output: # sudo ./test_xsk.sh -v +# +# Run and dump packet contents: +# sudo ./test_xsk.sh -D . xsk_prereqs.sh -while getopts "cv" flag +while getopts "cvD" flag do case "${flag}" in c) colorconsole=1;; v) verbose=1;; + D) dump_pkts=1;; esac done @@ -138,6 +142,10 @@ if [[ $verbose -eq 1 ]]; then VERBOSE_ARG="-v" fi +if [[ $dump_pkts -eq 1 ]]; then + DUMP_PKTS_ARG="-D" +fi + test_status $retval "${TEST_NAME}" ## START TESTS |