[PATCH] D152696: Prevent deadlocks in death tests.

Martin Böhme via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 14 21:29:23 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGdfbcee286b9b: Prevent deadlocks in death tests. (authored by mboehme).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152696/new/

https://reviews.llvm.org/D152696

Files:
  third-party/unittest/UnitTestMain/TestMain.cpp


Index: third-party/unittest/UnitTestMain/TestMain.cpp
===================================================================
--- third-party/unittest/UnitTestMain/TestMain.cpp
+++ third-party/unittest/UnitTestMain/TestMain.cpp
@@ -29,6 +29,10 @@
                                             true /* Disable crash reporting */);
   }
 
+  // Use the "threadsafe" test style for death tests -- the "fast" test style
+  // can cause deadlocks.
+  testing::GTEST_FLAG(death_test_style) = "threadsafe";
+
   // Initialize both gmock and gtest.
   testing::InitGoogleMock(&argc, argv);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152696.531605.patch
Type: text/x-patch
Size: 579 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230615/8967f86b/attachment.bin>


More information about the cfe-commits mailing list