]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
sunrpc/tst-udp-timeout: Fix timeout value
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 10 Sep 2017 12:37:28 +0000 (14:37 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 10 Sep 2017 12:37:28 +0000 (14:37 +0200)
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.

ChangeLog
sunrpc/tst-udp-timeout.c

index 45f122503f3305ca9d243ce7ea12d58ee598a824..a31824b37297a2c7f00d2a09478a5b566721d56a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-09-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+       * sunrpc/tst-udp-timeout.c (test_udp_server): Increase timeout to 2.5
+       seconds.
+
 2017-09-09  Mike FABIAN  <mfabian@redhat.com>
 
        [BZ #14925]
index db9943a03e3d7b10c5c6ea56a2840a65101fd8fe..7ceba984320f497f652a42c3e6b617da7862ee8f 100644 (file)
@@ -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);
     }