OSDN Git Service

selftests/xsx: test for huge pages only once
authorMagnus Karlsson <magnus.karlsson@intel.com>
Tue, 16 May 2023 10:31:06 +0000 (12:31 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 17 May 2023 05:31:51 +0000 (22:31 -0700)
commit041b68f688a38865434d7b8fbfe64beb03e54ff2
tree243dc96bcb49ec0327273a45d2ca861b0a22065b
parentd9f6d9709f87236f9a33de0d42dae8402b812e19
selftests/xsx: test for huge pages only once

Test for hugepages only once at the beginning of the execution of the
whole test suite, instead of before each test that needs huge
pages. These are the tests that use unaligned mode. As more unaligned
tests will be added, so the current system just does not scale.

With this change, there are now three possible outcomes of a test run:
fail, pass, or skip. To simplify the handling of this, the function
testapp_validate_traffic() now returns this value to the main loop. As
this function is used by nearly all tests, it meant a small change to
most of them.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/r/20230516103109.3066-8-magnus.karlsson@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/xskxceiver.c
tools/testing/selftests/bpf/xskxceiver.h