On Haiku, I see these test failures: FAIL: test-futimens ===================
../../gltests/test-futimens.h:123: assertion 'get_stat_atime_ns (&st1) == get_stat_atime_ns (&st2)' failed Abort FAIL test-futimens (exit status: 149) FAIL: test-utime ================ ../../gltests/test-utime.c:85: assertion 'get_stat_atime_ns (&st1) == get_stat_atime_ns (&st2)' failed Abort FAIL test-utime (exit status: 149) The cause is the particular st_atime implementation on Haiku. This patch provides a workaround; the tests then fail later, relating to st_ctime. 2024-09-02 Bruno Haible <br...@clisp.org> utime, futimens tests: Avoid test failure on Haiku. * tests/test-utimens-common.h (checkable_atime): On Haiku, return false. diff --git a/tests/test-utimens-common.h b/tests/test-utimens-common.h index f9fdb9a867..a59e65df8c 100644 --- a/tests/test-utimens-common.h +++ b/tests/test-utimens-common.h @@ -93,8 +93,15 @@ checkable_atime (int fd, struct stat *st) ASSERT (read (fd, buf, sizeof buf) == 0); ASSERT (fstat (fd, &st2) == 0); bool check_atime +#if defined __HAIKU__ + /* On Haiku, the st_atime field is always the current time. It is as if there + was a daemon running (as root) that constantly reads from all files on all + disks at the same time. See <https://dev.haiku-os.org/ticket/19038>. */ + = false; +#else = (st1.st_atime != st2.st_atime || get_stat_atime_ns (&st1) != get_stat_atime_ns (&st2)); +#endif if (st) *st = st2; return check_atime;