[libcxx-commits] [PATCH] D105910: [SystemZ][z/OS][libcxx] Mark tests that require runtime linking as unsupported on z/OS

Daniel McIntosh via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 13 10:28:00 PDT 2021


DanielMcIntosh-IBM created this revision.
DanielMcIntosh-IBM added reviewers: EricWF, ldionne.
DanielMcIntosh-IBM requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

z/OS doesn't currently have runtime linking, so a call to new or delete won't
invoke any user-defined new or delete operators unless the operator is visible
when the call is processed by the linker. Notably, if a call to new or delete
is compiled as part of a shared library, it is impossible for an application to
change which definition that call invokes. This includes calls compiled as part
of the standard library.

Many tests rely on user-defined new and delete operators to count allocations.
Any such tests will not work on z/OS.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105910

Files:
  libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp
  libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp
  libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp
  libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp
  libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp


Index: libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
===================================================================
--- libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
+++ libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
@@ -8,6 +8,12 @@
 //
 // UNSUPPORTED: libcpp-has-no-threads
 
+// z/OS doesn't currently have runtime linking. This prevents calls to new and
+// delete in the standard library (like the one caused by the argument copy in
+// the thread constructor) from invoking user-defined versions of those
+// operators.
+// UNSUPPORTED: target={{.+}}-zos{{.*}}
+
 // <thread>
 
 // class thread
Index: libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp
===================================================================
--- libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp
+++ libcxx/test/std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp
@@ -6,6 +6,12 @@
 //
 //===----------------------------------------------------------------------===//
 
+// z/OS doesn't currently have runtime linking. This prevents calls to new and
+// delete in the standard library (like the one in ctype<char>::~ctype) from
+// invoking user-defined versions of those operators (like the ones in
+// count_new.h). Thus, globalMemCounter doesn't see the delete[] it's expecting.
+// UNSUPPORTED: target={{.+}}-zos{{.*}}
+
 // <locale>
 
 // template <> class ctype<char>
Index: libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp
+++ libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp
@@ -8,6 +8,13 @@
 
 // UNSUPPORTED: c++03
 
+// z/OS doesn't currently have runtime linking. This prevents calls to new and
+// delete in the standard library (like the one caused by the allocation in the
+// string constructor) from invoking user-defined versions of those operators
+// (like the ones in count_new.h). Thus, globalMemCounter doesn't see the
+// new we expect it to.
+// UNSUPPORTED: target={{.+}}-zos{{.*}}
+
 // <filesystem>
 
 // class path
Index: libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp
+++ libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp
@@ -11,6 +11,13 @@
 // These tests require locale for non-char paths
 // UNSUPPORTED: libcpp-has-no-localization
 
+// z/OS doesn't currently have runtime linking. This prevents calls to new and
+// delete in the standard library (like the one during path concatenation
+// caused by basic_string::__grow_by_and_replace) from invoking user-defined
+// versions of those operators (like the ones in count_new.h). Thus,
+// RequireAllocationGuard doesn't see the new we expect it to.
+// UNSUPPORTED: target={{.+}}-zos{{.*}}
+
 // <filesystem>
 
 // class path
Index: libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp
+++ libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp
@@ -8,6 +8,13 @@
 
 // UNSUPPORTED: c++03
 
+// z/OS doesn't currently have runtime linking. This prevents calls to new and
+// delete in the standard library (like the one caused by the allocation in the
+// string constructor) from invoking user-defined versions of those operators
+// (like the ones in count_new.h). Thus, globalMemCounter doesn't see the
+// new we expect it to.
+// UNSUPPORTED: target={{.+}}-zos{{.*}}
+
 // <filesystem>
 
 // class path


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105910.358331.patch
Type: text/x-patch
Size: 4218 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210713/fa13706b/attachment-0001.bin>


More information about the libcxx-commits mailing list