* 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.
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.
tests/macros.h
Depends-on:
+time
configure.ac:
tests/macros.h
Depends-on:
+time
configure.ac:
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);
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);