This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Five patches for std::experimental::filesystem
- From: Christophe Lyon <christophe dot lyon at linaro dot org>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 4 Nov 2016 15:31:45 +0100
- Subject: Re: [PATCH] Five patches for std::experimental::filesystem
- Authentication-results: sourceware.org; auth=none
- References: <20161024165010.GL2922@redhat.com> <20161025153232.GN2922@redhat.com> <CAKdteOZzp5_NYNHQ9wgECZUYT3RDsd37s8ppARpTkWn_ueyz4g@mail.gmail.com> <20161027110139.GY2922@redhat.com> <CAKdteOZXJUgA5=b2O3kN8HXxTOr_x_nUUYp+Lv2WE3NcoxAiRg@mail.gmail.com>
On 2 November 2016 at 10:09, Christophe Lyon <christophe.lyon@linaro.org> wrote:
> On 27 October 2016 at 15:34, Jonathan Wakely <jwakely@redhat.com> wrote:
>> On 26/10/16 09:24 +0200, Christophe Lyon wrote:
>>>
>>> Hi Jonathan,
>>>
>>> On 25 October 2016 at 17:32, Jonathan Wakely <jwakely@redhat.com> wrote:
>>>>
>>>> Two more fixes for the filesystem TS, and improved tests.
>>>>
>>>> Handle negative times in filesystem::last_write_time
>>>> * src/filesystem/ops.cc
>>>> (last_write_time(const path&, file_time_type, error_code&)):
>>>> Handle
>>>> negative times correctly.
>>>> * testsuite/experimental/filesystem/operations/last_write_time.cc:
>>>> Test writing file times.
>>>>
>>>> Fix error handling in copy_file and equivalent
>>>> * src/filesystem/ops.cc (do_copy_file): Report an error if
>>>> source
>>>> or
>>>> destination is not a regular file (LWG 2712).
>>>> (equivalent): Fix error handling and result when only one file
>>>> exists.
>>>> * testsuite/experimental/filesystem/operations/copy.cc: Remove
>>>> files
>>>> created by tests. Test copying directories.
>>>> * testsuite/experimental/filesystem/operations/copy_file.cc:
>>>> Remove
>>>> files created by tests.
>>>> * testsuite/experimental/filesystem/operations/equivalent.cc: New.
>>>> * testsuite/experimental/filesystem/operations/is_empty.cc: New.
>>>> * testsuite/experimental/filesystem/operations/read_symlink.cc:
>>>> Remove
>>>> file created by test.
>>>> * testsuite/experimental/filesystem/operations/remove_all.cc: New.
>>>> * testsuite/util/testsuite_fs.h (~scoped_file): Only try to remove
>>>> file if path is non-empty, to support removal by other means.
>>>>
>>>> Tested x86_64-linux, committed to trunk.
>>>>
>>>>
>>> I can see failures in
>>> experimental/filesystem/operations/last_write_time.cc after your
>>> committed this patch:
>>>
>>> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/experimental/filesystem/operations/last_write_time.cc:127:
>>> void test02(): Assertion 'last_write_time(f.path) == time' failed.
>>> on arm*linux* and aarch64*linux* targets.
>>
>>
>> That test will fail for targets where _GLIBCXX_USE_UTIMENSAT is not
>> defined, as they use utime() instead which only supports second
>> granularity.
>>
>> This should solve it, by only checking that the file times are within
>> one second of the expected value.
>>
>
> Hi Jonathan,
> Indeed your patch fixes the problem I reported.
> Sorry for the delay, I was on holidays.
>
.... but experimental/filesystem/iterators/recursive_directory_iterator.cc
now fails at execution on "old" arm targets (when forcing -march=armv5t).
Christophe
> Thanks,
>
> Christophe
>
>
>>
>> Tested x86_64-linux, committed to trunk.