selftests/xsk: fail single test instead of all tests
authorMagnus Karlsson <magnus.karlsson@intel.com>
Thu, 14 Sep 2023 08:48:56 +0000 (10:48 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 14 Sep 2023 16:47:56 +0000 (09:47 -0700)
commit5fc494d5ab4119967aa967aab0b70bab8bb8b970
treedb9834dbb02ea1c64b90d13f69a0232cf1f5934f
parent7c3fcf088ba329292d94c03536a8add6c5a84327
selftests/xsk: fail single test instead of all tests

In a number of places at en error, exit_with_error() is called that
terminates the whole test suite. This is not always desirable as it
would be more logical to only fail that test and then go along with
the other ones. So change this in a number of places in which I
thought it would be more logical to just fail the test in
question. Examples of this are in code that is only used by a single
test.

Also delete a pointless if-statement in receive_pkts() that has an
exit_with_error() in it. It can never occur since the return value is
an unsigned and the test is for less than zero.

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