[libcxx-commits] [libcxx] 41d85fe - [libc++] Remove signal-based checkpoints in libc++ tests

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 14 07:38:48 PDT 2020


Author: Louis Dionne
Date: 2020-10-14T10:38:32-04:00
New Revision: 41d85fe0e168bf1e846e582a95f82ff8ecaf7c28

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

LOG: [libc++] Remove signal-based checkpoints in libc++ tests

While this adds some convenience to the test suite, it prevents the tests
using these checkpoints from being used on systems where signals are not
available, such as some embedded systems. It will also prevent these tests
from being constexpr-friendly once e.g. std::map is made constexpr, due
to the use of statics.

Instead, one can always use a debugger to figure out exactly where a
test is failing when that isn't clear from the log output without
checkpoints.

Added: 
    

Modified: 
    libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp
    libcxx/test/libcxx/debug/containers/db_string.pass.cpp
    libcxx/test/std/containers/map_allocator_requirement_test_templates.h
    libcxx/test/std/containers/set_allocator_requirement_test_templates.h
    libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp
    libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp
    libcxx/test/support/container_debug_tests.h
    libcxx/test/support/debug_mode_helper.h

Removed: 
    libcxx/test/support/assert_checkpoint.h


################################################################################
diff  --git a/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp b/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp
index 74a4ea504de5..1db96226ceea 100644
--- a/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp
+++ b/libcxx/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp
@@ -70,14 +70,14 @@ struct SequenceContainerChecks : BasicContainerChecks<Container, CT> {
 
 private:
   static void SanityTest() {
-    CHECKPOINT("sanity test");
+    // sanity test
     Container C = {1, 1, 1, 1};
     ::DoNotOptimize(&C);
   }
 
   static void RemoveFirstElem() {
     // See llvm.org/PR35564
-    CHECKPOINT("remove(<first-elem>)");
+    // remove(<first-elem>)
     {
       Container C = makeContainer(1);
       auto FirstVal = *(C.begin());
@@ -94,7 +94,7 @@ struct SequenceContainerChecks : BasicContainerChecks<Container, CT> {
 
   static void SpliceFirstElem() {
     // See llvm.org/PR35564
-    CHECKPOINT("splice(<first-elem>)");
+    // splice(<first-elem>)
     {
       Container C = makeContainer(1);
       Container C2;
@@ -108,14 +108,14 @@ struct SequenceContainerChecks : BasicContainerChecks<Container, CT> {
   }
 
   static void SpliceSameContainer() {
-    CHECKPOINT("splice(<same-container>)");
+    // splice(<same-container>)
     Container C = {1, 1};
     C.splice(C.end(), C, C.begin());
   }
 
   static void SpliceFirstElemAfter() {
     // See llvm.org/PR35564
-    CHECKPOINT("splice(<first-elem>)");
+    // splice(<first-elem>)
     {
       Container C = makeContainer(1);
       Container C2;
@@ -129,7 +129,7 @@ struct SequenceContainerChecks : BasicContainerChecks<Container, CT> {
   }
 
   static void AssignInvalidates() {
-    CHECKPOINT("assign(Size, Value)");
+    // assign(Size, Value)
     Container C(allocator_type{});
     iterator it1, it2, it3;
     auto reset = [&]() {
@@ -147,7 +147,7 @@ struct SequenceContainerChecks : BasicContainerChecks<Container, CT> {
     C.assign(2, makeValueType(4));
     check();
     reset();
-    CHECKPOINT("assign(Iter, Iter)");
+    // assign(Iter, Iter)
     std::vector<value_type> V = {
         makeValueType(1),
         makeValueType(2),
@@ -156,13 +156,13 @@ struct SequenceContainerChecks : BasicContainerChecks<Container, CT> {
     C.assign(V.begin(), V.end());
     check();
     reset();
-    CHECKPOINT("assign(initializer_list)");
+    // assign(initializer_list)
     C.assign({makeValueType(1), makeValueType(2), makeValueType(3)});
     check();
   }
 
   static void BackOnEmptyContainer() {
-    CHECKPOINT("testing back on empty");
+    // testing back on empty
     Container C = makeContainer(1);
     Container const& CC = C;
     (void)C.back();
@@ -173,7 +173,7 @@ struct SequenceContainerChecks : BasicContainerChecks<Container, CT> {
   }
 
   static void FrontOnEmptyContainer() {
-    CHECKPOINT("testing front on empty");
+    // testing front on empty
     Container C = makeContainer(1);
     Container const& CC = C;
     (void)C.front();
@@ -184,7 +184,7 @@ struct SequenceContainerChecks : BasicContainerChecks<Container, CT> {
   }
 
   static void EraseIterIter() {
-    CHECKPOINT("testing erase iter iter invalidation");
+    // testing erase iter iter invalidation
     Container C1 = makeContainer(3);
     iterator it1 = C1.begin();
     iterator it1_next = ++C1.begin();
@@ -206,7 +206,7 @@ struct SequenceContainerChecks : BasicContainerChecks<Container, CT> {
   }
 
   static void PopBack() {
-    CHECKPOINT("testing  pop_back() invalidation");
+    // testing  pop_back() invalidation
     Container C1 = makeContainer(2);
     iterator it1 = C1.end();
     --it1;
@@ -218,7 +218,7 @@ struct SequenceContainerChecks : BasicContainerChecks<Container, CT> {
   }
 
   static void PopFront() {
-    CHECKPOINT("testing pop_front() invalidation");
+    // testing pop_front() invalidation
     Container C1 = makeContainer(2);
     iterator it1 = C1.begin();
     C1.pop_front();
@@ -229,7 +229,7 @@ struct SequenceContainerChecks : BasicContainerChecks<Container, CT> {
   }
 
   static void InsertIterValue() {
-    CHECKPOINT("testing insert(iter, value)");
+    // testing insert(iter, value)
     Container C1 = makeContainer(2);
     iterator it1 = C1.begin();
     iterator it1_next = it1;
@@ -254,7 +254,7 @@ struct SequenceContainerChecks : BasicContainerChecks<Container, CT> {
   }
 
   static void EmplaceIterValue() {
-    CHECKPOINT("testing emplace(iter, value)");
+    // testing emplace(iter, value)
     Container C1 = makeContainer(2);
     iterator it1 = C1.begin();
     iterator it1_next = it1;
@@ -274,7 +274,7 @@ struct SequenceContainerChecks : BasicContainerChecks<Container, CT> {
   }
 
   static void InsertIterSizeValue() {
-    CHECKPOINT("testing insert(iter, size, value)");
+    // testing insert(iter, size, value)
     Container C1 = makeContainer(2);
     iterator it1 = C1.begin();
     iterator it1_next = it1;
@@ -293,7 +293,7 @@ struct SequenceContainerChecks : BasicContainerChecks<Container, CT> {
   }
 
   static void InsertIterIterIter() {
-    CHECKPOINT("testing insert(iter, iter, iter)");
+    // testing insert(iter, iter, iter)
     Container C1 = makeContainer(2);
     iterator it1 = C1.begin();
     iterator it1_next = it1;

diff  --git a/libcxx/test/libcxx/debug/containers/db_string.pass.cpp b/libcxx/test/libcxx/debug/containers/db_string.pass.cpp
index 293a37c0d726..9402da523258 100644
--- a/libcxx/test/libcxx/debug/containers/db_string.pass.cpp
+++ b/libcxx/test/libcxx/debug/containers/db_string.pass.cpp
@@ -51,7 +51,7 @@ struct StringContainerChecks : BasicContainerChecks<Container, CT> {
 
 private:
   static void BackOnEmptyContainer(int N) {
-    CHECKPOINT("testing back on empty");
+    // testing back on empty
     Container C = makeContainer(N);
     Container const& CC = C;
     iterator it = --C.end();
@@ -65,7 +65,7 @@ struct StringContainerChecks : BasicContainerChecks<Container, CT> {
   }
 
   static void FrontOnEmptyContainer(int N) {
-    CHECKPOINT("testing front on empty");
+    // testing front on empty
     Container C = makeContainer(N);
     Container const& CC = C;
     (void)C.front();
@@ -76,7 +76,7 @@ struct StringContainerChecks : BasicContainerChecks<Container, CT> {
   }
 
   static void PopBack(int N) {
-    CHECKPOINT("testing pop_back() invalidation");
+    // testing pop_back() invalidation
     Container C1 = makeContainer(N);
     iterator it1 = C1.end();
     --it1;

diff  --git a/libcxx/test/std/containers/map_allocator_requirement_test_templates.h b/libcxx/test/std/containers/map_allocator_requirement_test_templates.h
index d95238937db8..65d57737733f 100644
--- a/libcxx/test/std/containers/map_allocator_requirement_test_templates.h
+++ b/libcxx/test/std/containers/map_allocator_requirement_test_templates.h
@@ -25,7 +25,6 @@
 #include "test_macros.h"
 #include "count_new.h"
 #include "container_test_types.h"
-#include "assert_checkpoint.h"
 
 
 template <class Container>
@@ -35,7 +34,7 @@ void testMapInsert()
   ConstructController* cc = getConstructController();
   cc->reset();
   {
-    CHECKPOINT("Testing C::insert(const value_type&)");
+    // Testing C::insert(const value_type&)
     Container c;
     const ValueTp v(42, 1);
     cc->expect<const ValueTp&>();
@@ -48,7 +47,7 @@ void testMapInsert()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(value_type&)");
+    // Testing C::insert(value_type&)
     Container c;
     ValueTp v(42, 1);
     cc->expect<const ValueTp&>();
@@ -61,7 +60,7 @@ void testMapInsert()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(value_type&&)");
+    // Testing C::insert(value_type&&)
     Container c;
     ValueTp v(42, 1);
     cc->expect<ValueTp&&>();
@@ -74,7 +73,7 @@ void testMapInsert()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(const value_type&&)");
+    // Testing C::insert(const value_type&&)
     Container c;
     const ValueTp v(42, 1);
     cc->expect<const ValueTp&>();
@@ -87,7 +86,7 @@ void testMapInsert()
     }
   }
   {
-    CHECKPOINT("Testing C::insert({key, value})");
+    // Testing C::insert({key, value})
     Container c;
     cc->expect<ValueTp&&>();
     assert(c.insert({42, 1}).second);
@@ -99,7 +98,7 @@ void testMapInsert()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(std::initializer_list<ValueTp>)");
+    // Testing C::insert(std::initializer_list<ValueTp>)
     Container c;
     std::initializer_list<ValueTp> il = { ValueTp(1, 1), ValueTp(2, 1) };
     cc->expect<ValueTp const&>(2);
@@ -111,7 +110,7 @@ void testMapInsert()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(Iter, Iter) for *Iter = value_type const&");
+    // Testing C::insert(Iter, Iter) for *Iter = value_type const&
     Container c;
     const ValueTp ValueList[] = { ValueTp(1, 1), ValueTp(2, 1), ValueTp(3, 1) };
     cc->expect<ValueTp const&>(3);
@@ -123,7 +122,7 @@ void testMapInsert()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(Iter, Iter) for *Iter = value_type&&");
+    // Testing C::insert(Iter, Iter) for *Iter = value_type&&
     Container c;
     ValueTp ValueList[] = { ValueTp(1, 1), ValueTp(2, 1) , ValueTp(3, 1) };
     cc->expect<ValueTp&&>(3);
@@ -138,7 +137,7 @@ void testMapInsert()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(Iter, Iter) for *Iter = value_type&");
+    // Testing C::insert(Iter, Iter) for *Iter = value_type&
     Container c;
     ValueTp ValueList[] = { ValueTp(1, 1), ValueTp(2, 1) , ValueTp(3, 1) };
     cc->expect<ValueTp const&>(3);
@@ -164,7 +163,7 @@ void testMapInsertHint()
   ConstructController* cc = getConstructController();
   cc->reset();
   {
-    CHECKPOINT("Testing C::insert(p, const value_type&)");
+    // Testing C::insert(p, const value_type&)
     Container c;
     const ValueTp v(42, 1);
     cc->expect<const ValueTp&>();
@@ -181,7 +180,7 @@ void testMapInsertHint()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(p, value_type&)");
+    // Testing C::insert(p, value_type&)
     Container c;
     ValueTp v(42, 1);
     cc->expect<ValueTp const&>();
@@ -198,7 +197,7 @@ void testMapInsertHint()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(p, value_type&&)");
+    // Testing C::insert(p, value_type&&)
     Container c;
     ValueTp v(42, 1);
     cc->expect<ValueTp&&>();
@@ -215,7 +214,7 @@ void testMapInsertHint()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(p, {key, value})");
+    // Testing C::insert(p, {key, value})
     Container c;
     cc->expect<ValueTp&&>();
     It ret = c.insert(c.end(), {42, 1});
@@ -230,7 +229,7 @@ void testMapInsertHint()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(p, const value_type&&)");
+    // Testing C::insert(p, const value_type&&)
     Container c;
     const ValueTp v(42, 1);
     cc->expect<const ValueTp&>();
@@ -247,7 +246,7 @@ void testMapInsertHint()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(p, pair<Key, Mapped> const&)");
+    // Testing C::insert(p, pair<Key, Mapped> const&)
     Container c;
     const NonConstKeyPair v(42, 1);
     cc->expect<const NonConstKeyPair&>();
@@ -264,7 +263,7 @@ void testMapInsertHint()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(p, pair<Key, Mapped>&&)");
+    // Testing C::insert(p, pair<Key, Mapped>&&)
     Container c;
     NonConstKeyPair v(42, 1);
     cc->expect<NonConstKeyPair&&>();
@@ -295,7 +294,7 @@ void testMapEmplace()
   ConstructController* cc = getConstructController();
   cc->reset();
   {
-    CHECKPOINT("Testing C::emplace(const value_type&)");
+    // Testing C::emplace(const value_type&)
     Container c;
     const ValueTp v(42, 1);
     cc->expect<const ValueTp&>();
@@ -308,7 +307,7 @@ void testMapEmplace()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace(value_type&)");
+    // Testing C::emplace(value_type&)
     Container c;
     ValueTp v(42, 1);
     cc->expect<ValueTp&>();
@@ -321,7 +320,7 @@ void testMapEmplace()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace(value_type&&)");
+    // Testing C::emplace(value_type&&)
     Container c;
     ValueTp v(42, 1);
     cc->expect<ValueTp&&>();
@@ -334,7 +333,7 @@ void testMapEmplace()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace(const value_type&&)");
+    // Testing C::emplace(const value_type&&)
     Container c;
     const ValueTp v(42, 1);
     cc->expect<const ValueTp&&>();
@@ -347,7 +346,7 @@ void testMapEmplace()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace(pair<Key, Mapped> const&)");
+    // Testing C::emplace(pair<Key, Mapped> const&)
     Container c;
     const NonConstKeyPair v(42, 1);
     cc->expect<const NonConstKeyPair&>();
@@ -360,7 +359,7 @@ void testMapEmplace()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace(pair<Key, Mapped> &&)");
+    // Testing C::emplace(pair<Key, Mapped> &&)
     Container c;
     NonConstKeyPair v(42, 1);
     cc->expect<NonConstKeyPair&&>();
@@ -373,7 +372,7 @@ void testMapEmplace()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace(const Key&, ConvertibleToMapped&&)");
+    // Testing C::emplace(const Key&, ConvertibleToMapped&&)
     Container c;
     const Key k(42);
     cc->expect<Key const&, int&&>();
@@ -386,7 +385,7 @@ void testMapEmplace()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace(Key&, Mapped&)");
+    // Testing C::emplace(Key&, Mapped&)
     Container c;
     Key k(42);
     Mapped m(1);
@@ -400,7 +399,7 @@ void testMapEmplace()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace(Key&&, Mapped&&)");
+    // Testing C::emplace(Key&&, Mapped&&)
     Container c;
     Key k(42);
     Mapped m(1);
@@ -415,7 +414,7 @@ void testMapEmplace()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace(ConvertibleToKey&&, ConvertibleToMapped&&)");
+    // Testing C::emplace(ConvertibleToKey&&, ConvertibleToMapped&&)
     Container c;
     cc->expect<int&&, int&&>();
     assert(c.emplace(42, 1).second);
@@ -443,7 +442,7 @@ void testMapEmplaceHint()
   ConstructController* cc = getConstructController();
   cc->reset();
   {
-    CHECKPOINT("Testing C::emplace_hint(p, const value_type&)");
+    // Testing C::emplace_hint(p, const value_type&)
     Container c;
     const ValueTp v(42, 1);
     cc->expect<const ValueTp&>();
@@ -460,7 +459,7 @@ void testMapEmplaceHint()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace_hint(p, value_type&)");
+    // Testing C::emplace_hint(p, value_type&)
     Container c;
     ValueTp v(42, 1);
     cc->expect<ValueTp&>();
@@ -477,7 +476,7 @@ void testMapEmplaceHint()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace_hint(p, value_type&&)");
+    // Testing C::emplace_hint(p, value_type&&)
     Container c;
     ValueTp v(42, 1);
     cc->expect<ValueTp&&>();
@@ -494,7 +493,7 @@ void testMapEmplaceHint()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace_hint(p, const value_type&&)");
+    // Testing C::emplace_hint(p, const value_type&&)
     Container c;
     const ValueTp v(42, 1);
     cc->expect<const ValueTp&&>();
@@ -511,7 +510,7 @@ void testMapEmplaceHint()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace_hint(p, pair<Key, Mapped> const&)");
+    // Testing C::emplace_hint(p, pair<Key, Mapped> const&)
     Container c;
     const NonConstKeyPair v(42, 1);
     cc->expect<const NonConstKeyPair&>();
@@ -528,7 +527,7 @@ void testMapEmplaceHint()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace_hint(p, pair<Key, Mapped>&&)");
+    // Testing C::emplace_hint(p, pair<Key, Mapped>&&)
     Container c;
     NonConstKeyPair v(42, 1);
     cc->expect<NonConstKeyPair&&>();
@@ -545,7 +544,7 @@ void testMapEmplaceHint()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace_hint(p, const Key&, ConvertibleToMapped&&)");
+    // Testing C::emplace_hint(p, const Key&, ConvertibleToMapped&&)
     Container c;
     const Key k(42);
     cc->expect<Key const&, int&&>();
@@ -562,7 +561,7 @@ void testMapEmplaceHint()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace_hint(p, Key&, Mapped&)");
+    // Testing C::emplace_hint(p, Key&, Mapped&)
     Container c;
     Key k(42);
     Mapped m(1);
@@ -581,7 +580,7 @@ void testMapEmplaceHint()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace_hint(p, Key&&, Mapped&&)");
+    // Testing C::emplace_hint(p, Key&&, Mapped&&)
     Container c;
     Key k(42);
     Mapped m(1);
@@ -600,7 +599,7 @@ void testMapEmplaceHint()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace_hint(p, ConvertibleToKey&&, ConvertibleToMapped&&)");
+    // Testing C::emplace_hint(p, ConvertibleToKey&&, ConvertibleToMapped&&)
     Container c;
     cc->expect<int&&, int&&>();
     It ret = c.emplace_hint(c.end(), 42, 1);
@@ -626,7 +625,7 @@ void testMultimapInsert()
   ConstructController* cc = getConstructController();
   cc->reset();
   {
-    CHECKPOINT("Testing C::insert(const value_type&)");
+    // Testing C::insert(const value_type&)
     Container c;
     const ValueTp v(42, 1);
     cc->expect<const ValueTp&>();
@@ -634,7 +633,7 @@ void testMultimapInsert()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::insert(value_type&)");
+    // Testing C::insert(value_type&)
     Container c;
     ValueTp v(42, 1);
     cc->expect<ValueTp&>();
@@ -642,7 +641,7 @@ void testMultimapInsert()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::insert(value_type&&)");
+    // Testing C::insert(value_type&&)
     Container c;
     ValueTp v(42, 1);
     cc->expect<ValueTp&&>();
@@ -650,14 +649,14 @@ void testMultimapInsert()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::insert({key, value})");
+    // Testing C::insert({key, value})
     Container c;
     cc->expect<ValueTp&&>();
     c.insert({42, 1});
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::insert(std::initializer_list<ValueTp>)");
+    // Testing C::insert(std::initializer_list<ValueTp>)
     Container c;
     std::initializer_list<ValueTp> il = { ValueTp(1, 1), ValueTp(2, 1) };
     cc->expect<ValueTp const&>(2);
@@ -665,7 +664,7 @@ void testMultimapInsert()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::insert(Iter, Iter) for *Iter = value_type const&");
+    // Testing C::insert(Iter, Iter) for *Iter = value_type const&
     Container c;
     const ValueTp ValueList[] = { ValueTp(1, 1), ValueTp(2, 1), ValueTp(3, 1) };
     cc->expect<ValueTp const&>(3);
@@ -673,7 +672,7 @@ void testMultimapInsert()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::insert(Iter, Iter) for *Iter = value_type&&");
+    // Testing C::insert(Iter, Iter) for *Iter = value_type&&
     Container c;
     ValueTp ValueList[] = { ValueTp(1, 1), ValueTp(2, 1) , ValueTp(3, 1) };
     cc->expect<ValueTp&&>(3);
@@ -682,7 +681,7 @@ void testMultimapInsert()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::insert(Iter, Iter) for *Iter = value_type&");
+    // Testing C::insert(Iter, Iter) for *Iter = value_type&
     Container c;
     ValueTp ValueList[] = { ValueTp(1, 1), ValueTp(2, 1) , ValueTp(3, 1) };
     cc->expect<ValueTp&>(3);
@@ -699,7 +698,7 @@ void testMultimapInsertHint()
   ConstructController* cc = getConstructController();
   cc->reset();
   {
-    CHECKPOINT("Testing C::insert(p, const value_type&)");
+    // Testing C::insert(p, const value_type&)
     Container c;
     const ValueTp v(42, 1);
     cc->expect<const ValueTp&>();
@@ -707,7 +706,7 @@ void testMultimapInsertHint()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::insert(p, value_type&)");
+    // Testing C::insert(p, value_type&)
     Container c;
     ValueTp v(42, 1);
     cc->expect<ValueTp&>();
@@ -715,7 +714,7 @@ void testMultimapInsertHint()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::insert(p, value_type&&)");
+    // Testing C::insert(p, value_type&&)
     Container c;
     ValueTp v(42, 1);
     cc->expect<ValueTp&&>();
@@ -723,7 +722,7 @@ void testMultimapInsertHint()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::insert(p, {key, value})");
+    // Testing C::insert(p, {key, value})
     Container c;
     cc->expect<ValueTp&&>();
     c.insert(c.begin(), {42, 1});

diff  --git a/libcxx/test/std/containers/set_allocator_requirement_test_templates.h b/libcxx/test/std/containers/set_allocator_requirement_test_templates.h
index 5135a16ec8bb..78b0c826d4ec 100644
--- a/libcxx/test/std/containers/set_allocator_requirement_test_templates.h
+++ b/libcxx/test/std/containers/set_allocator_requirement_test_templates.h
@@ -24,7 +24,6 @@
 #include "test_macros.h"
 #include "count_new.h"
 #include "container_test_types.h"
-#include "assert_checkpoint.h"
 
 
 template <class Container>
@@ -34,7 +33,7 @@ void testSetInsert()
   ConstructController* cc = getConstructController();
   cc->reset();
   {
-    CHECKPOINT("Testing C::insert(const value_type&)");
+    // Testing C::insert(const value_type&)"
     Container c;
     const ValueTp v(42);
     cc->expect<const ValueTp&>();
@@ -47,7 +46,7 @@ void testSetInsert()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(value_type&)");
+    // Testing C::insert(value_type&)"
     Container c;
     ValueTp v(42);
     cc->expect<const ValueTp&>();
@@ -60,7 +59,7 @@ void testSetInsert()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(value_type&&)");
+    // Testing C::insert(value_type&&)"
     Container c;
     ValueTp v(42);
     cc->expect<ValueTp&&>();
@@ -73,7 +72,7 @@ void testSetInsert()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(const value_type&&)");
+    // Testing C::insert(const value_type&&)"
     Container c;
     const ValueTp v(42);
     cc->expect<const ValueTp&>();
@@ -86,7 +85,7 @@ void testSetInsert()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(std::initializer_list<ValueTp>)");
+    // Testing C::insert(std::initializer_list<ValueTp>)"
     Container c;
     std::initializer_list<ValueTp> il = { ValueTp(1), ValueTp(2) };
     cc->expect<ValueTp const&>(2);
@@ -98,7 +97,7 @@ void testSetInsert()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(Iter, Iter) for *Iter = value_type const&");
+    // Testing C::insert(Iter, Iter) for *Iter = value_type const&"
     Container c;
     const ValueTp ValueList[] = { ValueTp(1), ValueTp(2), ValueTp(3) };
     cc->expect<ValueTp const&>(3);
@@ -110,7 +109,7 @@ void testSetInsert()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(Iter, Iter) for *Iter = value_type&&");
+    // Testing C::insert(Iter, Iter) for *Iter = value_type&&"
     Container c;
     ValueTp ValueList[] = { ValueTp(1), ValueTp(2) , ValueTp(3) };
     cc->expect<ValueTp&&>(3);
@@ -125,7 +124,7 @@ void testSetInsert()
     }
   }
   {
-    CHECKPOINT("Testing C::insert(Iter, Iter) for *Iter = value_type&");
+    // Testing C::insert(Iter, Iter) for *Iter = value_type&"
     Container c;
     ValueTp ValueList[] = { ValueTp(1), ValueTp(2) , ValueTp(3) };
     cc->expect<ValueTp const&>(3);
@@ -146,7 +145,7 @@ void testSetEmplace()
   ConstructController* cc = getConstructController();
   cc->reset();
   {
-    CHECKPOINT("Testing C::emplace(const value_type&)");
+    // Testing C::emplace(const value_type&)"
     Container c;
     const ValueTp v(42);
     cc->expect<const ValueTp&>();
@@ -159,7 +158,7 @@ void testSetEmplace()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace(value_type&)");
+    // Testing C::emplace(value_type&)"
     Container c;
     ValueTp v(42);
     cc->expect<ValueTp&>();
@@ -172,7 +171,7 @@ void testSetEmplace()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace(value_type&&)");
+    // Testing C::emplace(value_type&&)"
     Container c;
     ValueTp v(42);
     cc->expect<ValueTp&&>();
@@ -185,7 +184,7 @@ void testSetEmplace()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace(const value_type&&)");
+    // Testing C::emplace(const value_type&&)"
     Container c;
     const ValueTp v(42);
     cc->expect<const ValueTp&&>();
@@ -209,7 +208,7 @@ void testSetEmplaceHint()
   ConstructController* cc = getConstructController();
   cc->reset();
   {
-    CHECKPOINT("Testing C::emplace_hint(p, const value_type&)");
+    // Testing C::emplace_hint(p, const value_type&)"
     Container c;
     const ValueTp v(42);
     cc->expect<const ValueTp&>();
@@ -226,7 +225,7 @@ void testSetEmplaceHint()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace_hint(p, value_type&)");
+    // Testing C::emplace_hint(p, value_type&)"
     Container c;
     ValueTp v(42);
     cc->expect<ValueTp&>();
@@ -243,7 +242,7 @@ void testSetEmplaceHint()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace_hint(p, value_type&&)");
+    // Testing C::emplace_hint(p, value_type&&)"
     Container c;
     ValueTp v(42);
     cc->expect<ValueTp&&>();
@@ -260,7 +259,7 @@ void testSetEmplaceHint()
     }
   }
   {
-    CHECKPOINT("Testing C::emplace_hint(p, const value_type&&)");
+    // Testing C::emplace_hint(p, const value_type&&)"
     Container c;
     const ValueTp v(42);
     cc->expect<const ValueTp&&>();
@@ -286,7 +285,7 @@ void testMultisetInsert()
   ConstructController* cc = getConstructController();
   cc->reset();
   {
-    CHECKPOINT("Testing C::insert(const value_type&)");
+    // Testing C::insert(const value_type&)"
     Container c;
     const ValueTp v(42);
     cc->expect<const ValueTp&>();
@@ -294,7 +293,7 @@ void testMultisetInsert()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::insert(value_type&)");
+    // Testing C::insert(value_type&)"
     Container c;
     ValueTp v(42);
     cc->expect<const ValueTp&>();
@@ -302,7 +301,7 @@ void testMultisetInsert()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::insert(value_type&&)");
+    // Testing C::insert(value_type&&)"
     Container c;
     ValueTp v(42);
     cc->expect<ValueTp&&>();
@@ -310,7 +309,7 @@ void testMultisetInsert()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::insert(std::initializer_list<ValueTp>)");
+    // Testing C::insert(std::initializer_list<ValueTp>)"
     Container c;
     std::initializer_list<ValueTp> il = { ValueTp(1), ValueTp(2) };
     cc->expect<ValueTp const&>(2);
@@ -318,7 +317,7 @@ void testMultisetInsert()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::insert(Iter, Iter) for *Iter = value_type const&");
+    // Testing C::insert(Iter, Iter) for *Iter = value_type const&"
     Container c;
     const ValueTp ValueList[] = { ValueTp(1), ValueTp(2), ValueTp(3) };
     cc->expect<ValueTp const&>(3);
@@ -326,7 +325,7 @@ void testMultisetInsert()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::insert(Iter, Iter) for *Iter = value_type&&");
+    // Testing C::insert(Iter, Iter) for *Iter = value_type&&"
     Container c;
     ValueTp ValueList[] = { ValueTp(1), ValueTp(2) , ValueTp(3) };
     cc->expect<ValueTp&&>(3);
@@ -335,7 +334,7 @@ void testMultisetInsert()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::insert(Iter, Iter) for *Iter = value_type&");
+    // Testing C::insert(Iter, Iter) for *Iter = value_type&"
     Container c;
     ValueTp ValueList[] = { ValueTp(1), ValueTp(2) , ValueTp(1) };
     cc->expect<ValueTp&>(3);
@@ -352,7 +351,7 @@ void testMultisetEmplace()
   ConstructController* cc = getConstructController();
   cc->reset();
   {
-    CHECKPOINT("Testing C::emplace(const value_type&)");
+    // Testing C::emplace(const value_type&)"
     Container c;
     const ValueTp v(42);
     cc->expect<const ValueTp&>();
@@ -360,7 +359,7 @@ void testMultisetEmplace()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::emplace(value_type&)");
+    // Testing C::emplace(value_type&)"
     Container c;
     ValueTp v(42);
     cc->expect<ValueTp&>();
@@ -368,7 +367,7 @@ void testMultisetEmplace()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::emplace(value_type&&)");
+    // Testing C::emplace(value_type&&)"
     Container c;
     ValueTp v(42);
     cc->expect<ValueTp&&>();
@@ -376,7 +375,7 @@ void testMultisetEmplace()
     assert(!cc->unchecked());
   }
   {
-    CHECKPOINT("Testing C::emplace(const value_type&&)");
+    // Testing C::emplace(const value_type&&)"
     Container c;
     const ValueTp v(42);
     cc->expect<const ValueTp&&>();

diff  --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp
index eb092c285578..bbc77e5be208 100644
--- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp
@@ -52,7 +52,6 @@
 #include "test_iterators.h"
 #include "count_new.h"
 #include "filesystem_test_helper.h"
-#include "assert_checkpoint.h"
 #include "verbose_assert.h"
 
 struct ComparePathExact {
@@ -120,7 +119,6 @@ void decompPathTest()
 {
   using namespace fs;
   for (auto const & TC : PathTestCases) {
-    CHECKPOINT(TC.raw.c_str());
     fs::path p(TC.raw);
     ASSERT(p == TC.raw);
 
@@ -192,7 +190,6 @@ void decompFilenameTest()
 {
   using namespace fs;
   for (auto const & TC : FilenameTestCases) {
-    CHECKPOINT(TC.raw.c_str());
     fs::path p(TC.raw);
     ASSERT_EQ(p, TC.raw);
     ASSERT_NOEXCEPT(p.empty());

diff  --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp
index 0ebda2862798..e7c95eb14876 100644
--- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp
@@ -22,7 +22,6 @@
 #include "test_iterators.h"
 #include "count_new.h"
 #include "filesystem_test_helper.h"
-#include "assert_checkpoint.h"
 #include "verbose_assert.h"
 
 struct ReplaceFilenameTestcase {

diff  --git a/libcxx/test/support/assert_checkpoint.h b/libcxx/test/support/assert_checkpoint.h
deleted file mode 100644
index 6627b35eb30d..000000000000
--- a/libcxx/test/support/assert_checkpoint.h
+++ /dev/null
@@ -1,73 +0,0 @@
-#ifndef SUPPORT_ASSERT_CHECKPOINT_H
-#define SUPPORT_ASSERT_CHECKPOINT_H
-
-#include <csignal>
-#include <iostream>
-#include <cstdlib>
-
-struct Checkpoint {
-  const char* file;
-  const char* func;
-  int line;
-  const char* msg;
-
-  Checkpoint() : file(nullptr), func(nullptr), line(-1), msg(nullptr) {}
-  Checkpoint(const char* xfile, const char* xfunc, int xline, const char* xmsg)
-      : file(xfile), func(xfunc), line(xline), msg(xmsg)
-  {}
-
-  template <class Stream>
-  void print(Stream& s) const {
-      if (!file) {
-          s << "NO CHECKPOINT\n";
-          return;
-      }
-      s << file << ":" << line << " " << func << ": Checkpoint";
-      if (msg)
-        s << " '" << msg << "'";
-      s << std::endl;
-  }
-};
-
-inline Checkpoint& globalCheckpoint() {
-    static Checkpoint C;
-    return C;
-}
-
-inline void clearCheckpoint() {
-    globalCheckpoint() = Checkpoint();
-}
-
-#if defined(__GNUC__)
-#define CHECKPOINT_FUNCTION_NAME __PRETTY_FUNCTION__
-#else
-#define CHECKPOINT_FUNCTION_NAME __func__
-#endif
-
-#define CHECKPOINT(msg) globalCheckpoint() = Checkpoint(__FILE__, CHECKPOINT_FUNCTION_NAME, __LINE__, msg);
-
-inline void checkpointSignalHandler(int signal) {
-    if (signal == SIGABRT) {
-        globalCheckpoint().print(std::cerr);
-    } else {
-        std::cerr << "Unexpected signal " << signal << " received\n";
-    }
-    std::_Exit(EXIT_FAILURE);
-}
-
-inline bool initCheckpointHandler() {
-    typedef void(*HandlerT)(int);
-    static bool isInit = false;
-    if (isInit) return true;
-    HandlerT prev_h = std::signal(SIGABRT, checkpointSignalHandler);
-    if (prev_h == SIG_ERR) {
-        std::cerr << "Setup failed.\n";
-        std::_Exit(EXIT_FAILURE);
-    }
-    isInit = true;
-    return false;
-}
-
-static bool initDummy = initCheckpointHandler();
-
-#endif

diff  --git a/libcxx/test/support/container_debug_tests.h b/libcxx/test/support/container_debug_tests.h
index 781d49f97560..0ddd272f3aa0 100644
--- a/libcxx/test/support/container_debug_tests.h
+++ b/libcxx/test/support/container_debug_tests.h
@@ -26,7 +26,6 @@
 
 #include "test_macros.h"
 #include "debug_mode_helper.h"
-#include "assert_checkpoint.h"
 #include "test_allocator.h"
 
 // These test make use of 'if constexpr'.
@@ -191,7 +190,7 @@ struct BasicContainerChecks {
   // Iterator tests
   template <class Iter>
   static void TestNullIterators() {
-    CHECKPOINT("testing null iterator");
+    // testing null iterator
     Iter it;
     EXPECT_DEATH( ++it );
     EXPECT_DEATH( it++ );
@@ -206,7 +205,7 @@ struct BasicContainerChecks {
   }
 
   static void DecrementBegin() {
-    CHECKPOINT("testing decrement on begin");
+    // testing decrement on begin
     Container C = makeContainer(1);
     iterator i = C.end();
     const_iterator ci = C.cend();
@@ -220,7 +219,7 @@ struct BasicContainerChecks {
   }
 
   static void IncrementEnd() {
-    CHECKPOINT("testing increment on end");
+    // testing increment on end
     Container C = makeContainer(1);
     iterator i = C.begin();
     const_iterator ci = C.begin();
@@ -234,7 +233,7 @@ struct BasicContainerChecks {
   }
 
   static void DerefEndIterator() {
-    CHECKPOINT("testing deref end iterator");
+    // testing deref end iterator
     Container C = makeContainer(1);
     iterator i = C.begin();
     const_iterator ci = C.cbegin();
@@ -255,7 +254,7 @@ struct BasicContainerChecks {
 
   // Container tests
   static void CopyInvalidatesIterators() {
-    CHECKPOINT("copy invalidates iterators");
+    // copy invalidates iterators
     Container C1 = makeContainer(3);
     iterator i = C1.begin();
     Container C2 = C1;
@@ -275,7 +274,7 @@ struct BasicContainerChecks {
   }
 
   static void MoveInvalidatesIterators() {
-    CHECKPOINT("copy move invalidates iterators");
+    // copy move invalidates iterators
     Container C1 = makeContainer(3);
     iterator i = C1.begin();
     Container C2 = std::move(C1);
@@ -291,7 +290,7 @@ struct BasicContainerChecks {
   }
 
   static void EraseIter() {
-    CHECKPOINT("testing erase invalidation");
+    // testing erase invalidation
     Container C1 = makeContainer(2);
     iterator it1 = C1.begin();
     iterator it1_next = it1;
@@ -306,7 +305,7 @@ struct BasicContainerChecks {
   }
 
   static void EraseIterIter() {
-    CHECKPOINT("testing erase iter iter invalidation");
+    // testing erase iter iter invalidation
     Container C1 = makeContainer(2);
     iterator it1 = C1.begin();
     iterator it1_next = it1;
@@ -323,7 +322,7 @@ struct BasicContainerChecks {
 
   // Allocator aware tests
   static void SwapInvalidatesIterators() {
-    CHECKPOINT("testing swap invalidates iterators");
+    // testing swap invalidates iterators
     Container C1 = makeContainer(3);
     Container C2 = makeContainer(3);
     iterator it1 = C1.begin();
@@ -339,7 +338,7 @@ struct BasicContainerChecks {
   }
 
   static void SwapNonEqualAllocators() {
-    CHECKPOINT("testing swap with non-equal allocators");
+    // testing swap with non-equal allocators
     Container C1 = makeContainer(3, allocator_type(1));
     Container C2 = makeContainer(1, allocator_type(2));
     Container C3 = makeContainer(2, allocator_type(2));

diff  --git a/libcxx/test/support/debug_mode_helper.h b/libcxx/test/support/debug_mode_helper.h
index 8256f3eb3828..4b6e765a1404 100644
--- a/libcxx/test/support/debug_mode_helper.h
+++ b/libcxx/test/support/debug_mode_helper.h
@@ -30,7 +30,6 @@
 #include <unistd.h>
 #include <sys/wait.h>
 #include "test_macros.h"
-#include "assert_checkpoint.h"
 #include "test_allocator.h"
 
 #if TEST_STD_VER < 11


        


More information about the libcxx-commits mailing list