A (f)utimens test fail on Ubuntu 8.04 LTS:
../../gltests/test-utimens.h:105: assertion failed
FAIL: test-fdutimensat
../../gltests/test-futimens.h:109: assertion failed
FAIL: test-futimens
../../gltests/test-utimens.h:105: assertion failed
FAIL: test-utimens
Reproduce with:
gnulib-tool --test --with-tests utimens
I can't reproduce on current debian testing, so it is likely an old bug.
The code is:
{
struct timespec ts[2] = { { BILLION, UTIME_OMIT }, { 0, UTIME_NOW } };
ASSERT (func (BASE "file", ts) == 0);
^^^
That line fails. Changing the code slightly, I see that the return code
is -1 on this system.
ASSERT (stat (BASE "file", &st2) == 0);
ASSERT (st2.st_atime == Y2K);
ASSERT (0 <= get_stat_atime_ns (&st2));
ASSERT (get_stat_atime_ns (&st2) < BILLION / 2);
/* See comment above about this utimecmp call. */
ASSERT (0 <= utimecmp (BASE "file", &st2, &st1, UTIMECMP_TRUNCATE_SOURCE));
}
/Simon