selftests/xsk: add option to run single test
authorMagnus Karlsson <magnus.karlsson@intel.com>
Thu, 14 Sep 2023 08:48:54 +0000 (10:48 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 14 Sep 2023 16:47:56 +0000 (09:47 -0700)
commit146e30554a5309b183164b385019b0357ab144dc
treedc5a911865e9cb4337a0d1dff2e4c2b594ab8295
parentc53dab7d39abd46901122fa47d3dce3b482d9c54
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>
tools/testing/selftests/bpf/test_xsk.sh
tools/testing/selftests/bpf/xskxceiver.c
tools/testing/selftests/bpf/xskxceiver.h