test: fix flaky uv_fs_lutime test (#3424)
Disable `atime` testing for symlink as this test is dependant on a race condition on some OSes (Linux is one) as `lstat` updates the `atime`. As both `mtime` and `atime` are set by the same syscall, barring an eventual kernel bug, this test does not omit any error case.
This commit is contained in:
parent
d9e90857f0
commit
e89abc80ea
@ -851,7 +851,12 @@ static void check_utime(const char* path,
|
||||
#endif
|
||||
st_atim = s->st_atim.tv_sec + s->st_atim.tv_nsec / 1e9;
|
||||
st_mtim = s->st_mtim.tv_sec + s->st_mtim.tv_nsec / 1e9;
|
||||
ASSERT_DOUBLE_EQ(st_atim, atime);
|
||||
/*
|
||||
* Linux does not allow reading reliably the atime of a symlink
|
||||
* since readlink() can update it
|
||||
*/
|
||||
if (!test_lutime)
|
||||
ASSERT_DOUBLE_EQ(st_atim, atime);
|
||||
ASSERT_DOUBLE_EQ(st_mtim, mtime);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user