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

Azat Khuzhin via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun May 21 01:33:42 PDT 2023


azat created this revision.
Herald added a subscriber: arichardson.
Herald added a project: All.
azat requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151046

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


Index: libcxx/utils/libcxx/test/features.py
===================================================================
--- libcxx/utils/libcxx/test/features.py
+++ libcxx/utils/libcxx/test/features.py
@@ -381,4 +381,6 @@
   # 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)),
+
+  Feature(name='32-bit', when=lambda cfg: int(compilerMacros(cfg)['__SIZEOF_SIZE_T__']) == 4),
 ]
Index: libcxx/test/std/input.output/string.streams/stringstream.members/gcount.pass.cpp
===================================================================
--- libcxx/test/std/input.output/string.streams/stringstream.members/gcount.pass.cpp
+++ 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
 
 // Test that tellp() does not break the stringstream after INT_MAX, due to use
 // of pbump() that accept int.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151046.524089.patch
Type: text/x-patch
Size: 1349 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230521/2f4d85ca/attachment.bin>


More information about the libcxx-commits mailing list