[libcxx-commits] [libcxx] r358593 - Revert "[libc++] Add a test that uses the debug database from multiple threads"

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 17 09:43:03 PDT 2019


Author: ldionne
Date: Wed Apr 17 09:43:03 2019
New Revision: 358593

URL: http://llvm.org/viewvc/llvm-project?rev=358593&view=rev
Log:
Revert "[libc++] Add a test that uses the debug database from multiple threads"

This reverts r358591, which seems to have uncovered an actual bug and
causes the tsan CI to fail. We need to fix the bug and re-commit the
test.

Modified:
    libcxx/trunk/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp

Modified: libcxx/trunk/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp?rev=358593&r1=358592&r2=358593&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp (original)
+++ libcxx/trunk/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp Wed Apr 17 09:43:03 2019
@@ -22,9 +22,6 @@
 #include <list>
 #include <vector>
 #include <deque>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
-#   include <thread>
-#endif
 #include "container_debug_tests.hpp"
 #include "debug_mode_helper.h"
 
@@ -54,7 +51,6 @@ public:
         InsertIterIterIter();
         EmplaceIterValue();
         EraseIterIter();
-        ThreadUseIter();
       }
     else {
       SpliceFirstElemAfter();
@@ -189,36 +185,6 @@ private:
     EXPECT_DEATH( CC.front() );
   }
 
-  static void ThreadUseIter() {
-#if !defined(_LIBCPP_HAS_NO_THREADS)
-    CHECKPOINT("thread iter use");
-    const size_t maxRounds = 7;
-    struct TestRunner{
-     void operator()() {
-        for (size_t count = 0; count < maxRounds; count++) {
-          const size_t containerCount = 21;
-          std::vector<Container> containers;
-          std::vector<typename Container::iterator> iterators;
-          for (size_t containerIndex = 0; containerIndex < containerCount; containerIndex++) {
-              containers.push_back(makeContainer(3));
-              Container &c = containers.back();
-              iterators.push_back(c.begin());
-              iterators.push_back(c.end());
-          }
-        }
-      }
-    };
-    TestRunner r;
-    const size_t threadCount = 13;
-    std::vector<std::thread> threads;
-    for (size_t count = 0; count < threadCount; count++)
-        threads.emplace_back(r);
-    r();
-    for (size_t count = 0; count < threadCount; count++)
-        threads[count].join();
-#endif
-  }
-
   static void EraseIterIter() {
     CHECKPOINT("testing erase iter iter invalidation");
     Container C1 = makeContainer(3);




More information about the libcxx-commits mailing list