]> Savannah Git Hosting - gnulib.git/commitdiff
utime, futimens tests: Avoid test failure on Haiku.
authorBruno Haible <bruno@clisp.org>
Mon, 2 Sep 2024 07:27:04 +0000 (09:27 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 17 Sep 2024 11:25:04 +0000 (13:25 +0200)
* tests/test-utimens-common.h (checkable_atime): On Haiku, return false.

ChangeLog
tests/test-utimens-common.h

index 41e41b9308cb3a83c885d1c4ee89bd582e313fa3..c449ad522b6880f9d8ff87e593d6e15a877fcdb9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-09-02  Bruno Haible  <bruno@clisp.org>
+
+       utime, futimens tests: Avoid test failure on Haiku.
+       * tests/test-utimens-common.h (checkable_atime): On Haiku, return false.
+
 2024-09-01  Bruno Haible  <bruno@clisp.org>
 
        strtold: Work around a Haiku bug.
index f9fdb9a86787a99449828451ff7b8ab3566432c6..a59e65df8c10c169aba95a209f475654757d1fba 100644 (file)
@@ -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;