]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Comment out atime restore test. master anongit/master
authorDarren Tucker <dtucker@dtucker.net>
Sat, 2 Aug 2025 02:51:42 +0000 (12:51 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Sat, 2 Aug 2025 02:51:42 +0000 (12:51 +1000)
This works on filesystems mounted 'noatime', but on others the stat()
resets atime causing the test to fail.

openbsd-compat/regress/utimensattest.c

index bbc66c48523e1caa46c55cb293bdf9b167538e61..b4405e464d03194ae9d00ad8654fbf96a3e2b945 100644 (file)
@@ -77,11 +77,17 @@ main(void)
                fail("utimensat", 0, 0);
 
        if (stat(TMPFILE, &sb) == -1)
-               fail("stat", 0, 0 );
+               fail("stat", 0, 0);
+#if 0
+       /*
+        * This test only works on filesystems mounted 'noatime', otherwise the
+        * stat() above resets atime. Skip by default.
+        */
        if (sb.st_atime != 12345678)
-               fail("st_atime", 0, 0 );
+               fail("st_atime", 0, 0);
+#endif
        if (sb.st_mtime != 34567890)
-               fail("st_mtime", 0, 0 );
+               fail("st_mtime", 0, 0);
 #if 0
        /*
         * Results expected to be rounded to the nearest microsecond.