mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-09-01 02:34:55 +00:00
gettimeofday, timespec_get tests: Avoid test failure on glibc/Linux.
* modules/gettimeofday-tests (Depends-on): Add 'time'. * modules/timespec_get-tests (Depends-on): Likewise. * tests/test-gettimeofday.c (test_consistency): Update comment. * tests/test-timespec_get.c (main): Likewise.
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
2023-03-08 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
gettimeofday, timespec_get tests: Avoid test failure on glibc/Linux.
|
||||
* modules/gettimeofday-tests (Depends-on): Add 'time'.
|
||||
* modules/timespec_get-tests (Depends-on): Likewise.
|
||||
* tests/test-gettimeofday.c (test_consistency): Update comment.
|
||||
* tests/test-timespec_get.c (main): Likewise.
|
||||
|
||||
time: Add tests.
|
||||
* tests/test-time.c: New file.
|
||||
* modules/time-tests: New file.
|
||||
|
||||
@@ -4,6 +4,7 @@ tests/signature.h
|
||||
tests/macros.h
|
||||
|
||||
Depends-on:
|
||||
time
|
||||
|
||||
configure.ac:
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ tests/signature.h
|
||||
tests/macros.h
|
||||
|
||||
Depends-on:
|
||||
time
|
||||
|
||||
configure.ac:
|
||||
|
||||
|
||||
@@ -70,7 +70,8 @@ test_consistency ()
|
||||
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
|
||||
/* Note: It's here that the dependency to the 'time' module is needed.
|
||||
Without it, this assertion would sometimes fail on glibc systems, see
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=30200 */
|
||||
ASSERT (tv1.tv_sec <= tt2);
|
||||
ASSERT (tt2 <= tv3.tv_sec);
|
||||
|
||||
@@ -46,7 +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
|
||||
/* Note: It's here that the dependency to the 'time' module is needed.
|
||||
Without it, this assertion would sometimes fail on glibc systems, see
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=30200 */
|
||||
ASSERT (ts1.tv_sec <= tt2);
|
||||
ASSERT (tt2 <= ts3.tv_sec);
|
||||
|
||||
Reference in New Issue
Block a user