[PATCH] D42755: [libcxx] Fix last_write_time tests for filesystems that don't support very small times.

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 1 06:31:15 PST 2018


Hahnfeld requested changes to this revision.
Hahnfeld added a comment.
This revision now requires changes to proceed.

Can you please add a summary that describes which filesystem this problem can be seen with? I think outside people can't access rdar tickets, so I can only guess that it's related to APFS? Further guessing the filesystem supports negative timestamps in general but not `file_time_type::min()` (which probably is `-2 ** 63`)?

In https://reviews.llvm.org/D42755#993784, @vsapsai wrote:

> Don't like removing `new_time = file_time_type::min() + MicroSec(1);` part of the `test_write_min_time` but it escapes `file_time_type::min()` check. If somebody can explain the purpose of this test, I'd be glad to preserve it for filesystems that support very small times.


I think the idea was to have something slightly larger than `file_time_type::min()` which generally makes sense for testing corner cases. However, there is no equivalent check for `file_time_type::max()` so I'd like to hear @EricWF whether we should keep it.


https://reviews.llvm.org/D42755





More information about the cfe-commits mailing list