public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: libc-alpha@sourceware.org
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Subject: [hurd,commited] sunrpc/tst-udp-timeout: Fix timeout value
Date: Sun, 10 Sep 2017 14:38:00 -0000	[thread overview]
Message-ID: <20170910143842.17470-1-samuel.thibault@ens-lyon.org> (raw)

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                | 5 +++++
 sunrpc/tst-udp-timeout.c | 6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 45f122503f..a31824b372 100644
--- 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]
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);
     }
-- 
2.14.1

                 reply	other threads:[~2017-09-10 14:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170910143842.17470-1-samuel.thibault@ens-lyon.org \
    --to=samuel.thibault@ens-lyon.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).