selftests/net: ignore timing errors in so_txtime if KSFT_MACHINE_SLOW
authorWillem de Bruijn <willemb@google.com>
Thu, 1 Feb 2024 16:21:19 +0000 (11:21 -0500)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 6 Feb 2024 09:19:06 +0000 (10:19 +0100)
commitc41dfb0dfbece824143ff51829d42cba4cb3c277
tree03cb69bec24981daee7d9c100c8ad6feacf1d4f9
parent8ff25dac88f616ebebb30830e3a20f079d7a30c9
selftests/net: ignore timing errors in so_txtime if KSFT_MACHINE_SLOW

This test is time sensitive. It may fail on virtual machines and for
debug builds.

Continue to run in these environments to get code coverage. But
optionally suppress failure for timing errors (only). This is
controlled with environment variable KSFT_MACHINE_SLOW.

The test continues to return 0 (KSFT_PASS), rather than KSFT_XFAIL
as previously discussed. Because making so_txtime.c return that and
then making so_txtime.sh capture runs that pass that vs KSFT_FAIL
and pass it on added a bunch of (fragile bash) boilerplate, while the
result is interpreted the same as KSFT_PASS anyway.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20240201162130.2278240-1-willemdebruijn.kernel@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/net/so_txtime.c