]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Skip filesystem tests that depend on permissions [PR90787]
authorJonathan Wakely <jwakely@redhat.com>
Fri, 20 Aug 2021 13:51:06 +0000 (14:51 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 12 Oct 2021 19:40:36 +0000 (20:40 +0100)
commitcec047eaeb3ca40be65500d140a3a3f16db742e1
tree90435fc689e91b4990749f9f32cbd5bb79c338d7
parente22db028743ff2f82c2aade4c8003e256ca15a6e
libstdc++: Skip filesystem tests that depend on permissions [PR90787]

Tests that depend on filesystem permissions FAIL if run on Windows or as
root. Add a helper function to detect those cases, so the tests can skip
those checks gracefully.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

PR libstdc++/90787
* testsuite/27_io/filesystem/iterators/directory_iterator.cc:
Use new __gnu_test::permissions_are_testable() function.
* testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
Likewise.
* testsuite/27_io/filesystem/operations/exists.cc: Likewise.
* testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
* testsuite/27_io/filesystem/operations/remove.cc: Likewise.
* testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
* testsuite/27_io/filesystem/operations/status.cc: Likewise.
* testsuite/27_io/filesystem/operations/symlink_status.cc:
Likewise.
* testsuite/27_io/filesystem/operations/temp_directory_path.cc:
Likewise.
* testsuite/experimental/filesystem/iterators/directory_iterator.cc:
Likewise.
* testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc:
Likewise.
* testsuite/experimental/filesystem/operations/exists.cc:
Likewise.
* testsuite/experimental/filesystem/operations/is_empty.cc:
Likewise.
* testsuite/experimental/filesystem/operations/remove.cc:
Likewise.
* testsuite/experimental/filesystem/operations/remove_all.cc:
Likewise.
* testsuite/experimental/filesystem/operations/temp_directory_path.cc:
Likewise.
* testsuite/util/testsuite_fs.h (__gnu_test::permissions_are_testable):
New function to guess whether testing permissions will work.

(cherry picked from commit 29b2fd371f18169141e20b90effa7205db68fb11)
17 files changed:
libstdc++-v3/testsuite/27_io/filesystem/iterators/directory_iterator.cc
libstdc++-v3/testsuite/27_io/filesystem/iterators/recursive_directory_iterator.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/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/symlink_status.cc
libstdc++-v3/testsuite/27_io/filesystem/operations/temp_directory_path.cc
libstdc++-v3/testsuite/experimental/filesystem/iterators/directory_iterator.cc
libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/exists.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/is_empty.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc
libstdc++-v3/testsuite/experimental/filesystem/operations/temp_directory_path.cc
libstdc++-v3/testsuite/util/testsuite_fs.h
This page took 0.068398 seconds and 6 git commands to generate.