selftests: kselftest_harness: support using xfail
authorJakub Kicinski <kuba@kernel.org>
Thu, 29 Feb 2024 00:59:18 +0000 (16:59 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Mar 2024 10:30:29 +0000 (10:30 +0000)
commit2709473c938602c3955b87000009e9bf3cd9bb32
tree0caeb1367b2705142bada68d1ad7b2e3878bb9cd
parent378193eff3399acb8529d0b553709e8f91d34fe3
selftests: kselftest_harness: support using xfail

Currently some tests report skip for things they expect to fail
e.g. when given combination of parameters is known to be unsupported.
This is confusing because in an ideal test environment and fully
featured kernel no tests should be skipped.

Selftest summary line already includes xfail and xpass counters,
e.g.:

  Totals: pass:725 fail:0 xfail:0 xpass:0 skip:0 error:0

but there's no way to use it from within the harness.

Add a new per-fixture+variant combination list of test cases
we expect to fail.

Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/kselftest_harness.h