From cbfc16122e9c4948b3a17224aeb5f8b70f02417d Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 16 May 2020 19:29:50 +0200 Subject: sunrpc/tst-udp-*: Fix timeout value Following on 00c3da43a ('sunrpc/tst-udp-timeout: Fix timeout value'). While e.g. 2.5 timeout can be represented exactly with doubles, time stamps may not be represented that exactly, and thus with coarse-grain clocks (e.g. 10ms) we may end up with 2.499-ish values due to rounding errors. * sunrpc/tst-udp-timeout.c (test_udp_server): Add more timeout slack. * sunrpc/tst-udp-nonblocking.c (do_test): Likewise. --- sunrpc/tst-udp-nonblocking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sunrpc/tst-udp-nonblocking.c') diff --git a/sunrpc/tst-udp-nonblocking.c b/sunrpc/tst-udp-nonblocking.c index 189136c9f9..45d6b8919f 100644 --- a/sunrpc/tst-udp-nonblocking.c +++ b/sunrpc/tst-udp-nonblocking.c @@ -290,7 +290,7 @@ do_test (void) printf ("info: send/receive took %f seconds\n", after_pings - before_pings); /* Expected timeout is 0.75 seconds. */ - TEST_VERIFY (0.75 <= after_pings - before_pings); + TEST_VERIFY (0.70 <= after_pings - before_pings); TEST_VERIFY (after_pings - before_pings < 1.2); uint32_t xid; -- cgit 1.4.1