diff options
author | Paolo Abeni <pabeni@redhat.com> | 2024-02-08 20:57:49 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-02-12 13:21:15 +0300 |
commit | 9c52994e32c5d8aaff13b1a13f7b35b988b02b26 (patch) | |
tree | d2ddec73a5b2fef9a99c81e46a09479238d3bc2e /tools | |
parent | 4ec1d5fd384e85531e8c6b4ba7c0441617f79ca4 (diff) | |
download | linux-9c52994e32c5d8aaff13b1a13f7b35b988b02b26.tar.xz |
selftests: net: ignore timing errors in txtimestamp if KSFT_MACHINE_SLOW
This test is time sensitive. It may fail on virtual machines and for
debug builds.
Similar to commit c41dfb0dfbec ("selftests/net: ignore timing errors in
so_txtime if KSFT_MACHINE_SLOW"), optionally suppress failure for timing
errors (only).
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/net/txtimestamp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/txtimestamp.c b/tools/testing/selftests/net/txtimestamp.c index 10f2fde3686b..ec60a16c9307 100644 --- a/tools/testing/selftests/net/txtimestamp.c +++ b/tools/testing/selftests/net/txtimestamp.c @@ -163,7 +163,8 @@ static void validate_timestamp(struct timespec *cur, int min_delay) if (cur64 < start64 + min_delay || cur64 > start64 + max_delay) { fprintf(stderr, "ERROR: %" PRId64 " us expected between %d and %d\n", cur64 - start64, min_delay, max_delay); - test_failed = true; + if (!getenv("KSFT_MACHINE_SLOW")) + test_failed = true; } } |