Fix failing filesystem tests on mingw targets
authorJonathan Wakely <jwakely@redhat.com>
Wed, 16 Jan 2019 23:11:10 +0000 (23:11 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 16 Jan 2019 23:11:10 +0000 (23:11 +0000)
commitedfe833a31a4e34875f30ec5eb8c56da556384d8
treeb75c9381a29979c48f823d36c572f16eb55e3871
parenta6804ea9293fc10c85568c475ecdb402106fce8c
Fix failing filesystem tests on mingw targets

* config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
constructors and open members taking wide strings. Fix patterns for
filesystem::path members to match wstring_view parameters. Add
exports for shared_ptr members used by directory iterators.
* src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
error code parameter if the file doesn't exist.
* src/filesystem/ops.cc (remove(const path&, error_code&)):
Likewise.
* testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
values for mingw targets, where "/" is not an absolute path. Do not
test symlinks on mingw targets.
* testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
* testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
on mingw targets.
* testsuite/experimental/filesystem/operations/copy.cc: Likewise.
* testsuite/27_io/filesystem/operations/create_directories.cc: Check
that each component of the path is created.
* testsuite/experimental/filesystem/operations/create_directories.cc:
Likewise.
* testsuite/27_io/filesystem/operations/exists.cc: Do not test
permissions on mingw targets.
* testsuite/experimental/filesystem/operations/exists.cc: Likewise.
* testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
* testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
* testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
mingw targets.
* testsuite/experimental/filesystem/operations/permissions.cc:
Likewise.
* testsuite/27_io/filesystem/operations/remove.cc: Do not test
symlinks or permissions on mingw targets.
* testsuite/experimental/filesystem/operations/remove.cc: Likewise.
* testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
symlinks on mingw targets.
* testsuite/experimental/filesystem/operations/remove_all.cc:
Likewise.
* testsuite/27_io/filesystem/operations/status.cc: Do not test
permissions on mingw targets.
* testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
test symlinks on mingw targets.
* testsuite/experimental/filesystem/operations/space.cc: Fix test
for mingw targets.

From-SVN: r267991
23 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/config/abi/pre/gnu.ver
libstdc++-v3/src/c++17/fs_ops.cc
libstdc++-v3/src/filesystem/ops.cc
libstdc++-v3/testsuite/27_io/filesystem/operations/canonical.cc
libstdc++-v3/testsuite/27_io/filesystem/operations/copy.cc
libstdc++-v3/testsuite/27_io/filesystem/operations/create_directories.cc
libstdc++-v3/testsuite/27_io/filesystem/operations/exists.cc
libstdc++-v3/testsuite/27_io/filesystem/operations/is_empty.cc
libstdc++-v3/testsuite/27_io/filesystem/operations/permissions.cc
libstdc++-v3/testsuite/27_io/filesystem/operations/remove.cc
libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc
libstdc++-v3/testsuite/27_io/filesystem/operations/status.cc
libstdc++-v3/testsuite/27_io/filesystem/operations/weakly_canonical.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/canonical.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/copy.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/exists.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/is_empty.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/permissions.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc