OSDN Git Service

selftests: xsk: Eliminate test specific if-statement in test runner
authorMagnus Karlsson <magnus.karlsson@intel.com>
Tue, 7 Sep 2021 07:19:26 +0000 (09:19 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 10 Sep 2021 19:15:32 +0000 (21:15 +0200)
commit6ce67b5165e630a4f874e9e45bd9cca86aa4f4a6
tree68e11a4f181cbc28732beb2b2e7b26fe0a1cfaf5
parenta4ba98dd0c693e4f0f4aa93ef210a77a72d32025
selftests: xsk: Eliminate test specific if-statement in test runner

Eliminate a test specific if-statement for the RX_FILL_EMTPY stats
test that is present in the test runner. We can do this as we now have
the use_addr_for_fill option. Just create and empty Rx packet stream
and indicated that the test runner should use the addresses in that to
populate the fill ring. As there are no packets in the stream, the
fill ring will be empty and we will get the error stats that we want
to test.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Link: https://lore.kernel.org/bpf/20210907071928.9750-19-magnus.karlsson@gmail.com
tools/testing/selftests/bpf/xdpxceiver.c