aboutsummaryrefslogtreecommitdiff
path: root/sunrpc
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2017-09-10 14:37:28 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2017-09-10 14:37:28 +0200
commit00c3da43ace363315fb9e70a6d4696de0630f6cf (patch)
treea9852d9fa48e8db4add461ccbea52949e2b39b0a /sunrpc
parent96480903ab6f16cba475c02e32827fa4bf2b62b7 (diff)
downloadglibc-00c3da43ace363315fb9e70a6d4696de0630f6cf.tar
glibc-00c3da43ace363315fb9e70a6d4696de0630f6cf.tar.gz
glibc-00c3da43ace363315fb9e70a6d4696de0630f6cf.tar.bz2
glibc-00c3da43ace363315fb9e70a6d4696de0630f6cf.zip
sunrpc/tst-udp-timeout: Fix timeout value
2.3 is not representable with double, and thus leads to rounding issues if the clock is not very precise and the measured delay is then exactly 2.3. * sunrpc/tst-udp-timeout.c (test_udp_server): Increase timeout to 2.5 seconds.
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/tst-udp-timeout.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sunrpc/tst-udp-timeout.c b/sunrpc/tst-udp-timeout.c
index db9943a03e..7ceba98432 100644
--- a/sunrpc/tst-udp-timeout.c
+++ b/sunrpc/tst-udp-timeout.c
@@ -352,13 +352,13 @@ test_udp_server (int port)
.a = 170, .b = 40, .timeout_ms = 3000,
.garbage_packets = with_garbage * 30
},
- (struct timeval) { 2, 300 * 1000 });
+ (struct timeval) { 2, 500 * 1000 });
after = get_ticks ();
if (test_verbose)
- printf ("info: test_udp_server: 2.3 second timeout took %f seconds"
+ printf ("info: test_udp_server: 2.5 second timeout took %f seconds"
" (garbage %d)\n",
after - before, with_garbage);
- TEST_VERIFY (2.3 <= after - before);
+ TEST_VERIFY (2.5 <= after - before);
TEST_VERIFY (after - before < 3.0);
test_call_flush (clnt);
}