[libcxx-commits] [libcxx] d4d96c4 - [libcxx][tests] Introduce 32-bit feature and use it for stringstream gcount test

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 23 10:29:22 PDT 2023


Author: Azat Khuzhin
Date: 2023-05-23T19:29:15+02:00
New Revision: d4d96c44440535a43cc6048fc3af3c10c115c1fb

URL: https://github.com/llvm/llvm-project/commit/d4d96c44440535a43cc6048fc3af3c10c115c1fb
DIFF: https://github.com/llvm/llvm-project/commit/d4d96c44440535a43cc6048fc3af3c10c115c1fb.diff

LOG: [libcxx][tests] Introduce 32-bit feature and use it for stringstream gcount test

This will avoid hardcoding all unsupported targets, since even after one
more follow up fix [1], there is one more failure.

  [1]: https://reviews.llvm.org/D150886

Plus, if you want to run it locally on some target that CI does not
covers, it could also false-positively fail, which is not good.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D151046

Added: 
    

Modified: 
    libcxx/test/std/input.output/string.streams/stringstream.members/gcount.pass.cpp
    libcxx/utils/libcxx/test/features.py

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/input.output/string.streams/stringstream.members/gcount.pass.cpp b/libcxx/test/std/input.output/string.streams/stringstream.members/gcount.pass.cpp
index a8d821e8e0407..3a5edac6c58b4 100644
--- a/libcxx/test/std/input.output/string.streams/stringstream.members/gcount.pass.cpp
+++ b/libcxx/test/std/input.output/string.streams/stringstream.members/gcount.pass.cpp
@@ -6,12 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// All 32 bit arches that CI has:
-//
-// UNSUPPORTED: target=powerpc-ibm-aix
-// UNSUPPORTED: target={{.*}}armv7l{{.*}}
-// UNSUPPORTED: target={{.*}}armv8l{{.*}}
-// UNSUPPORTED: target=i686-w64-windows-gnu
+// UNSUPPORTED: 32-bit-pointer
 
 // Test that tellp() does not break the stringstream after INT_MAX, due to use
 // of pbump() that accept int.

diff  --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
index 64e33e5ea6a47..a55d242a0dbf3 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -383,4 +383,12 @@ def check_gdb(cfg):
   # not other forms of aligned allocation.
   Feature(name='availability-aligned_allocation-missing',
     when=lambda cfg: BooleanExpression.evaluate('stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{(9|10|11|12)(.0)?}}', cfg.available_features)),
+
+  # Tests that require 64-bit architecture
+  Feature(name='32-bit-pointer',
+          when=lambda cfg: sourceBuilds(cfg, """
+            int main(int, char**) {
+              static_assert(sizeof(void *) == 4);
+            }
+          """)),
 ]


        


More information about the libcxx-commits mailing list