about summary refs log tree commit diff
path: root/sunrpc/tst-udp-nonblocking.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-05-16 19:29:50 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-05-16 19:34:48 +0200
commitcbfc16122e9c4948b3a17224aeb5f8b70f02417d (patch)
treefaf4ece9861669e7348e74cc085e7e7e458e8a76 /sunrpc/tst-udp-nonblocking.c
parent501bdb5dd61afc714a098cd5ff441bd114584f75 (diff)
downloadglibc-cbfc16122e9c4948b3a17224aeb5f8b70f02417d.tar.gz
glibc-cbfc16122e9c4948b3a17224aeb5f8b70f02417d.tar.xz
glibc-cbfc16122e9c4948b3a17224aeb5f8b70f02417d.zip
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.
Diffstat (limited to 'sunrpc/tst-udp-nonblocking.c')
-rw-r--r--sunrpc/tst-udp-nonblocking.c2
1 files changed, 1 insertions, 1 deletions
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;