* timespec_get tests: Add comment
@ 2023-03-05 19:44 Bruno Haible
0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2023-03-05 19:44 UTC (permalink / raw)
To: bug-gnulib
On a Linux/x86_64 system, I once saw this unit test fail:
FAIL: test-timespec_get
../../gltests/test-timespec_get.c:49: assertion 'ts1.tv_sec <= tt2' failed
FAIL test-timespec_get (exit status: 134)
The failure probability is small (ca. 0.1% to 0.3%). I registered a glibc bug
about it.
2023-03-05 Bruno Haible <bruno@clisp.org>
timespec_get tests: Add comment.
* tests/test-timespec_get.c: Add a comment regarding a glibc bug.
diff --git a/tests/test-timespec_get.c b/tests/test-timespec_get.c
index 1b20fe23c0..69b98c5c64 100644
--- a/tests/test-timespec_get.c
+++ b/tests/test-timespec_get.c
@@ -46,6 +46,8 @@ main (void)
ASSERT (tt2 <= tt4);
/* Verify that the tv_sec field of the result is the same as time(NULL). */
+ /* Note: This assertion sometimes fails on glibc systems, see
+ https://sourceware.org/bugzilla/show_bug.cgi?id=30200 */
ASSERT (ts1.tv_sec <= tt2);
ASSERT (tt2 <= ts3.tv_sec);
ASSERT (ts3.tv_sec <= tt4);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-05 19:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-05 19:44 timespec_get tests: Add comment Bruno Haible
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).