Skip to content

Commit

Permalink
selftests: net: ignore timing errors in txtimestamp if KSFT_MACHINE_SLOW
Browse files Browse the repository at this point in the history
This test is time sensitive. It may fail on virtual machines and for
debug builds.

Similar to commit c41dfb0 ("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>
  • Loading branch information
Paolo Abeni authored and David S. Miller committed Feb 12, 2024
1 parent 4ec1d5f commit 9c52994
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/testing/selftests/net/txtimestamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 9c52994

Please sign in to comment.