[libcxx] r348967 - [test] [filesystems] Extend FreeBSD tv_sec==-1 workaround to NetBSD

Michal Gorny mgorny at gentoo.org
Wed Dec 12 12:20:15 PST 2018


Author: mgorny
Date: Wed Dec 12 12:20:15 2018
New Revision: 348967

URL: http://llvm.org/viewvc/llvm-project?rev=348967&view=rev
Log:
[test] [filesystems] Extend FreeBSD tv_sec==-1 workaround to NetBSD

NetBSD also uses tv_sec==-1 as error status indicator, and does not
support setting such a value.

Modified:
    libcxx/trunk/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp

Modified: libcxx/trunk/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp?rev=348967&r1=348966&r2=348967&view=diff
==============================================================================
--- libcxx/trunk/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp (original)
+++ libcxx/trunk/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp Wed Dec 12 12:20:15 2018
@@ -427,7 +427,7 @@ TEST_CASE(set_last_write_time_dynamic_en
         epoch_time - Minutes(3) - Sec(42) - SubSec(17);
     // FreeBSD has a bug in their utimes implementation where the time is not update
     // when the number of seconds is '-1'.
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
     const file_time_type just_before_epoch_time =
         epoch_time - Sec(2) - SubSec(17);
 #else




More information about the libcxx-commits mailing list