public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] libstdc++: testsuite: skip fs space tests if not available
@ 2022-06-21  0:09 Alexandre Oliva
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2022-06-21  0:09 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:8ce9375d132860d06c856a8ec45107f19ccf90cc

commit 8ce9375d132860d06c856a8ec45107f19ccf90cc
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Mon Jun 20 20:44:00 2022 -0300

    libstdc++: testsuite: skip fs space tests if not available
    
    The do_space function is defined in ways that are useful, or that fail
    immediately, depending on various macros.  When it fails immediately,
    the filesystem space.cc tests fail noisily, but the fail is entirely
    expected.
    
    Define HAVE_SPACE in the space.cc tests, according to the macros that
    select implementations of do_space, and use it to skip tests that are
    expected to fail.
    
    
    for  libstdc++-v3/ChangeLog
    
            * testsuite/27_io/filesystem/operations/space.cc: Skip the
            test if the feature is unavailable.
            * testsuite/experimental/filesystem/operations/space.cc:
            Likewise.
    
    TN: V527-033

Diff:
---
 libstdc++-v3/testsuite/27_io/filesystem/operations/space.cc    | 10 ++++++++++
 .../testsuite/experimental/filesystem/operations/space.cc      | 10 ++++++++++
 2 files changed, 20 insertions(+)

diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/space.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/space.cc
index 05997cac1df..029d65655b1 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/space.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/space.cc
@@ -24,6 +24,13 @@
 #include <testsuite_fs.h>
 #include <testsuite_hooks.h>
 
+#if defined (_GLIBCXX_HAVE_SYS_STATVFS_H) \
+  || defined (_GLIBCXX_FILESYSTEM_IS_WINDOWS)
+# define HAVE_SPACE 1
+#else
+# define HAVE_SPACE 0
+#endif
+
 bool check(std::filesystem::space_info const& s)
 {
   const std::uintmax_t err = -1;
@@ -59,6 +66,9 @@ test02()
 int
 main()
 {
+  if (!HAVE_SPACE)
+    return 0;
+
   test01();
   test02();
 }
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc
index 10ee0f06871..83868dea9b5 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc
@@ -25,6 +25,13 @@
 #include <testsuite_fs.h>
 #include <testsuite_hooks.h>
 
+#if defined (_GLIBCXX_HAVE_SYS_STATVFS_H) \
+  || defined (_GLIBCXX_FILESYSTEM_IS_WINDOWS)
+# define HAVE_SPACE 1
+#else
+# define HAVE_SPACE 0
+#endif
+
 namespace fs = std::experimental::filesystem;
 
 bool check(fs::space_info const& s)
@@ -60,6 +67,9 @@ test02()
 int
 main()
 {
+  if (!HAVE_SPACE)
+    return 0;
+
   test01();
   test02();
 }


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] libstdc++: testsuite: skip fs space tests if not available
@ 2022-06-22  5:23 Alexandre Oliva
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2022-06-22  5:23 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:92965499bb3e492ab520f1aa2964c10424920342

commit 92965499bb3e492ab520f1aa2964c10424920342
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Mon Jun 20 20:44:00 2022 -0300

    libstdc++: testsuite: skip fs space tests if not available
    
    The do_space function is defined in ways that are useful, or that fail
    immediately, depending on various macros.  When it fails immediately,
    the filesystem space.cc tests fail noisily, but the fail is entirely
    expected.
    
    Define HAVE_SPACE in the space.cc tests, according to the macros that
    select implementations of do_space, and use it to skip tests that are
    expected to fail.
    
    
    for  libstdc++-v3/ChangeLog
    
            * testsuite/27_io/filesystem/operations/space.cc: Skip the
            test if the feature is unavailable.
            * testsuite/experimental/filesystem/operations/space.cc:
            Likewise.

Diff:
---
 libstdc++-v3/testsuite/27_io/filesystem/operations/space.cc    | 10 ++++++++++
 .../testsuite/experimental/filesystem/operations/space.cc      | 10 ++++++++++
 2 files changed, 20 insertions(+)

diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/space.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/space.cc
index 05997cac1df..029d65655b1 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/space.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/space.cc
@@ -24,6 +24,13 @@
 #include <testsuite_fs.h>
 #include <testsuite_hooks.h>
 
+#if defined (_GLIBCXX_HAVE_SYS_STATVFS_H) \
+  || defined (_GLIBCXX_FILESYSTEM_IS_WINDOWS)
+# define HAVE_SPACE 1
+#else
+# define HAVE_SPACE 0
+#endif
+
 bool check(std::filesystem::space_info const& s)
 {
   const std::uintmax_t err = -1;
@@ -59,6 +66,9 @@ test02()
 int
 main()
 {
+  if (!HAVE_SPACE)
+    return 0;
+
   test01();
   test02();
 }
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc
index 10ee0f06871..83868dea9b5 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc
@@ -25,6 +25,13 @@
 #include <testsuite_fs.h>
 #include <testsuite_hooks.h>
 
+#if defined (_GLIBCXX_HAVE_SYS_STATVFS_H) \
+  || defined (_GLIBCXX_FILESYSTEM_IS_WINDOWS)
+# define HAVE_SPACE 1
+#else
+# define HAVE_SPACE 0
+#endif
+
 namespace fs = std::experimental::filesystem;
 
 bool check(fs::space_info const& s)
@@ -60,6 +67,9 @@ test02()
 int
 main()
 {
+  if (!HAVE_SPACE)
+    return 0;
+
   test01();
   test02();
 }


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] libstdc++: testsuite: skip fs space tests if not available
@ 2022-06-21  0:16 Alexandre Oliva
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Oliva @ 2022-06-21  0:16 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:fd08f705983b0cf2b12c136698010d4341de2a70

commit fd08f705983b0cf2b12c136698010d4341de2a70
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Mon Jun 20 20:44:00 2022 -0300

    libstdc++: testsuite: skip fs space tests if not available
    
    The do_space function is defined in ways that are useful, or that fail
    immediately, depending on various macros.  When it fails immediately,
    the filesystem space.cc tests fail noisily, but the fail is entirely
    expected.
    
    Define HAVE_SPACE in the space.cc tests, according to the macros that
    select implementations of do_space, and use it to skip tests that are
    expected to fail.
    
    
    for  libstdc++-v3/ChangeLog
    
            * testsuite/27_io/filesystem/operations/space.cc: Skip the
            test if the feature is unavailable.
            * testsuite/experimental/filesystem/operations/space.cc:
            Likewise.

Diff:
---
 libstdc++-v3/testsuite/27_io/filesystem/operations/space.cc    | 10 ++++++++++
 .../testsuite/experimental/filesystem/operations/space.cc      | 10 ++++++++++
 2 files changed, 20 insertions(+)

diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/space.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/space.cc
index 05997cac1df..029d65655b1 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/space.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/space.cc
@@ -24,6 +24,13 @@
 #include <testsuite_fs.h>
 #include <testsuite_hooks.h>
 
+#if defined (_GLIBCXX_HAVE_SYS_STATVFS_H) \
+  || defined (_GLIBCXX_FILESYSTEM_IS_WINDOWS)
+# define HAVE_SPACE 1
+#else
+# define HAVE_SPACE 0
+#endif
+
 bool check(std::filesystem::space_info const& s)
 {
   const std::uintmax_t err = -1;
@@ -59,6 +66,9 @@ test02()
 int
 main()
 {
+  if (!HAVE_SPACE)
+    return 0;
+
   test01();
   test02();
 }
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc
index 10ee0f06871..83868dea9b5 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc
@@ -25,6 +25,13 @@
 #include <testsuite_fs.h>
 #include <testsuite_hooks.h>
 
+#if defined (_GLIBCXX_HAVE_SYS_STATVFS_H) \
+  || defined (_GLIBCXX_FILESYSTEM_IS_WINDOWS)
+# define HAVE_SPACE 1
+#else
+# define HAVE_SPACE 0
+#endif
+
 namespace fs = std::experimental::filesystem;
 
 bool check(fs::space_info const& s)
@@ -60,6 +67,9 @@ test02()
 int
 main()
 {
+  if (!HAVE_SPACE)
+    return 0;
+
   test01();
   test02();
 }


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-22  5:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-21  0:09 [gcc(refs/users/aoliva/heads/testme)] libstdc++: testsuite: skip fs space tests if not available Alexandre Oliva
2022-06-21  0:16 Alexandre Oliva
2022-06-22  5:23 Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).