https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83626
Christophe Lyon <clyon at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clyon at gcc dot gnu.org
--- Comment #10 from Christophe Lyon <clyon at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #6)
> Author: redi
> Date: Fri Jan 5 21:27:25 2018
> New Revision: 256287
>
> URL: https://gcc.gnu.org/viewcvs?rev=256287&root=gcc&view=rev
> Log:
> PR libstdc++/83626 Don't report errors when removing non-existent files
>
> Backport from mainline
> 2018-01-05 Jonathan Wakely <[email protected]>
>
> PR libstdc++/83626
> * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
> report an error for ENOENT.
> (remove_all(const path&)): Fix type of result variable.
> (remove_all(const path&, error_code&)): Use non-throwing increment
> for directory iterator. Call POSIX remove directly to avoid redundant
> calls to symlink_status. Do not report errors for ENOENT.
> * testsuite/experimental/filesystem/operations/remove_all.cc: Test
> throwing overload.
>
> Backport from mainline
> 2018-01-04 Jonathan Wakely <[email protected]>
>
> PR libstdc++/83626
> * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
> redundant call to ec.clear().
> (remove_all(const path&, error_code&))): Do not return an error for
> non-existent paths.
> * testsuite/experimental/filesystem/operations/remove.cc: New test.
> * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
> expected results for non-existent paths.
>
> Added:
>
> branches/gcc-7-branch/libstdc++-v3/testsuite/experimental/filesystem/
> operations/remove.cc
> - copied, changed from r256286,
> branches/gcc-7-branch/libstdc++-v3/testsuite/experimental/filesystem/
> operations/remove_all.cc
> Modified:
> branches/gcc-7-branch/libstdc++-v3/ChangeLog
> branches/gcc-7-branch/libstdc++-v3/src/filesystem/ops.cc
>
> branches/gcc-7-branch/libstdc++-v3/testsuite/experimental/filesystem/
> operations/remove_all.cc
In my testing, I have a new failure:
FAIL:: experimental/filesystem/operations/remove.cc execution test
on aarch64-linux-gnu and arm*linux* targets.
I'm cross-testing using proot+qemu, so maybe there is a bad interaction.
The log says:
/libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc:81: void
test01(): Assertion 'ec' failed.
I don't have the results for trunk yet.