Haiku now documents that the access time of files is continually updated. <https://dev.haiku-os.org/ticket/15102>. This allows us to skip an assertion and avoid an assertion failure.
The test-utimens, test-utimensat, test-fdutimensat tests still fail, a bit later. To be investigated. 2026-01-11 Bruno Haible <[email protected]> utimens tests: Avoid an assertion failure on Haiku. * tests/test-utimens.h (test_utimens): Skip the comparison of the access times on Haiku. diff --git a/tests/test-utimens.h b/tests/test-utimens.h index dc43fdaa82..4b47cf9dc0 100644 --- a/tests/test-utimens.h +++ b/tests/test-utimens.h @@ -99,10 +99,15 @@ test_utimens (int (*func) (char const *, struct timespec const *), bool print) ASSERT (func (BASE "file/", ts) == -1); ASSERT (errno == ENOTDIR || errno == EINVAL); } + /* On Haiku, the access time is continually updated. See + <https://git.haiku-os.org/haiku.git/tree/docs/develop/libroot/index.rst>. + This causes this part of the test to fail. */ +#if !defined __HAIKU__ ASSERT (stat (BASE "file", &st2) == 0); ASSERT (st1.st_atime == st2.st_atime); ASSERT (get_stat_atime_ns (&st1) == get_stat_atime_ns (&st2)); ASSERT (utimecmp (BASE "file", &st1, &st2, 0) == 0); +#endif /* Set both times. */ {
