[libcxx] r278357 - test: relax the FS test a slight bit to be more reliable

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 11 20:50:21 PDT 2016


On Thu, Aug 11, 2016 at 9:58 AM, Saleem Abdulrasool via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Author: compnerd
> Date: Thu Aug 11 11:58:12 2016
> New Revision: 278357
>
> URL: http://llvm.org/viewvc/llvm-project?rev=278357&view=rev
> Log:
> 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.
>

Thoughts on merging this to 3.9?  It fixes tests on Linux.


> Modified:
>     libcxx/trunk/test/std/experimental/filesystem/fs.op.
> funcs/fs.op.last_write_time/last_write_time.pass.cpp
>
> Modified: libcxx/trunk/test/std/experimental/filesystem/fs.op.
> funcs/fs.op.last_write_time/last_write_time.pass.cpp
> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/
> experimental/filesystem/fs.op.funcs/fs.op.last_write_time/
> last_write_time.pass.cpp?rev=278357&r1=278356&r2=278357&view=diff
> ============================================================
> ==================
> --- libcxx/trunk/test/std/experimental/filesystem/fs.op.
> funcs/fs.op.last_write_time/last_write_time.pass.cpp (original)
> +++ libcxx/trunk/test/std/experimental/filesystem/fs.op.
> funcs/fs.op.last_write_time/last_write_time.pass.cpp Thu Aug 11 11:58:12
> 2016
> @@ -158,7 +158,8 @@ TEST_CASE(get_last_write_time_dynamic_en
>
>      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);
>  }
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>



-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160811/8ede7ef5/attachment.html>


More information about the cfe-commits mailing list