diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-08-11 16:58:12 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-08-11 16:58:12 +0000 |
commit | f5b8d8249e1a6932b41b8103d16c60d298648346 (patch) | |
tree | 5fb6c2236bf75aae7270952ba9f48765f562491a /libcxx/test/std | |
parent | 51b4aee94f71bc75100465f336fa8b34161e8a11 (diff) | |
download | bcm5719-llvm-f5b8d8249e1a6932b41b8103d16c60d298648346.tar.gz bcm5719-llvm-f5b8d8249e1a6932b41b8103d16c60d298648346.zip |
test: relax the FS test a slight bit to be more reliable
Some filesystems track atime always. This relaxes the test to accept either a
filesystem which does not accurately track atime or does track the atime
accurately. This allows the test to pass on filesystems mounted with
`strictatime` on Linux or on macOS.
llvm-svn: 278357
Diffstat (limited to 'libcxx/test/std')
-rw-r--r-- | libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp index 3c61b26d18e..50407b0399f 100644 --- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp @@ -158,7 +158,8 @@ TEST_CASE(get_last_write_time_dynamic_env_test) TEST_CHECK(ftime2 > ftime); TEST_CHECK(dtime2 > dtime); - TEST_CHECK(LastAccessTime(file) == file_access_time); + TEST_CHECK(LastAccessTime(file) == file_access_time || + LastAccessTime(file) == Clock::to_time_t(ftime2)); TEST_CHECK(LastAccessTime(dir) == dir_access_time); } |