diff mbox series

[net-next] selftests: net: ignore timing errors in txtimestamp if KSFT_MACHINE_SLOW

Message ID bca0a7a2bac7fb1db6288a54936cdacdb0eb345b.1707411748.git.pabeni@redhat.com
State Accepted
Commit 9c52994e32c5d8aaff13b1a13f7b35b988b02b26
Headers show
Series [net-next] selftests: net: ignore timing errors in txtimestamp if KSFT_MACHINE_SLOW | expand

Commit Message

Paolo Abeni Feb. 8, 2024, 5:57 p.m. UTC
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>
---
 tools/testing/selftests/net/txtimestamp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Willem de Bruijn Feb. 8, 2024, 8:51 p.m. UTC | #1
Paolo Abeni wrote:
> 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>

Is this still failing after commit 5264ab612e28
("selftests/net: calibrate txtimestamp")?
Jakub Kicinski Feb. 8, 2024, 11:34 p.m. UTC | #2
On Thu, 08 Feb 2024 15:51:31 -0500 Willem de Bruijn wrote:
> Paolo Abeni wrote:
> > 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>  
> 
> Is this still failing after commit 5264ab612e28
> ("selftests/net: calibrate txtimestamp")?

On a debug kernel it continues to flake :(

https://netdev.bots.linux.dev/flakes.html?br-cnt=80&tn-needle=txtimestamp&min-flip=0
patchwork-bot+netdevbpf@kernel.org Feb. 12, 2024, 10:30 a.m. UTC | #3
Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Thu,  8 Feb 2024 18:57:49 +0100 you wrote:
> 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).
> 
> [...]

Here is the summary with links:
  - [net-next] selftests: net: ignore timing errors in txtimestamp if KSFT_MACHINE_SLOW
    https://git.kernel.org/netdev/net-next/c/9c52994e32c5

You are awesome, thank you!
diff mbox series

Patch

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;
 	}
 }