diff options
author | Magnus Karlsson <magnus.karlsson@intel.com> | 2023-09-14 10:48:54 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-09-14 09:47:56 -0700 |
commit | 146e30554a5309b183164b385019b0357ab144dc (patch) | |
tree | dc5a911865e9cb4337a0d1dff2e4c2b594ab8295 /tools/testing/selftests/bpf/xskxceiver.h | |
parent | c53dab7d39abd46901122fa47d3dce3b482d9c54 (diff) |
selftests/xsk: add option to run single test
Add a command line option to be able to run a single test. This option
(-t) takes a number from the list of tests available with the "-l"
option. Here are two examples:
Run test number 2, the "receive single packet" test in all available modes:
./test_xsk.sh -t 2
Run test number 21, the metadata copy test in skb mode only
./test_xsh.sh -t 21 -m skb
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/r/20230914084900.492-8-magnus.karlsson@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/xskxceiver.h')
-rw-r--r-- | tools/testing/selftests/bpf/xskxceiver.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/xskxceiver.h b/tools/testing/selftests/bpf/xskxceiver.h index 3a71d490db3e..8015aeea839d 100644 --- a/tools/testing/selftests/bpf/xskxceiver.h +++ b/tools/testing/selftests/bpf/xskxceiver.h @@ -5,6 +5,8 @@ #ifndef XSKXCEIVER_H_ #define XSKXCEIVER_H_ +#include <limits.h> + #include "xsk_xdp_progs.skel.h" #ifndef SOL_XDP @@ -56,6 +58,7 @@ #define XSK_DESC__MAX_SKB_FRAGS 18 #define HUGEPAGE_SIZE (2 * 1024 * 1024) #define PKT_DUMP_NB_TO_PRINT 16 +#define RUN_ALL_TESTS UINT_MAX #define print_verbose(x...) do { if (opt_verbose) ksft_print_msg(x); } while (0) |