[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
utimens: Fix test failures on macOS
From: |
Bruno Haible |
Subject: |
utimens: Fix test failures on macOS |
Date: |
Sat, 02 Jan 2021 19:06:01 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; ) |
On macOS 10.13, I'm seeing test failures:
FAIL: test-futimens
===================
../../gltests/test-futimens.h:170: assertion 'ctime_compare (&st3, &st2) < 0'
failed
FAIL test-futimens (exit status: 134)
FAIL: test-utimens
==================
../../gltests/test-utimens.h:149: assertion 'ctime_compare (&st3, &st2) < 0'
failed
FAIL test-utimens (exit status: 134)
I looked at the file timestamps using coreutils' 'stat' program. These two
failures are apparently caused by st_ctime being unchanged when you ask
for an st_atime change using utimensat(). I think this is not worth working
around, because every read access on a file causes st_atime to change without
st_ctime changing.
Another test failure, then:
./test-utimens.h:164: assertion 'func (BASE "link/", NULL) == -1' failed
Abort trap: 6
2021-01-02 Bruno Haible <bruno@clisp.org>
utimens: Fix test failure on macOS 10.13.
* lib/utimens.c (fdutimens): Before calling utimensat, recognize a
filename ending in a slash that does not point to a directory.
2021-01-02 Bruno Haible <bruno@clisp.org>
utimens: Avoid test failures on macOS 10.13.
Reported by Martin Storsjö <martin@martin.st> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>.
* tests/test-utimens-common.h (check_ctime): Define to -1 on macOS.
* tests/test-utimens.h (test_utimens): Don't expect a ctime change when
only the atime is requested to change.
* tests/test-futimens.h (test_futimens): Likewise.
* tests/test-lutimens.h (test_lutimens): Likewise.
0001-utimens-Avoid-test-failures-on-macOS-10.13.patch
Description: Text Data
0002-utimens-Fix-test-failure-on-macOS-10.13.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- utimens: Fix test failures on macOS,
Bruno Haible <=