Commit 9c52994e authored by Paolo Abeni's avatar Paolo Abeni Committed by David S. Miller
Browse files

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 c41dfb0d ("selftests/net: ignore timing errors in
so_txtime if KSFT_MACHINE_SLOW"), optionally suppress failure for timing
errors (only).

Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Reviewed-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4ec1d5fd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -163,6 +163,7 @@ 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);
		if (!getenv("KSFT_MACHINE_SLOW"))
			test_failed = true;
	}
}