summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-07-02 14:35:25 +0000
committerAlexey Samsonov <samsonov@google.com>2012-07-02 14:35:25 +0000
commit6f510f8eb53b7166ee336199b341d7070942943b (patch)
treed6d877457a9ffe5e0cda9a05ec534b013645c489
parent0373bbc8d6a2a13479a5711a1bd13a5a7044386b (diff)
downloadbcm5719-llvm-6f510f8eb53b7166ee336199b341d7070942943b.tar.gz
bcm5719-llvm-6f510f8eb53b7166ee336199b341d7070942943b.zip
[TSan] use threadsafe death tests in TSan unit tests
llvm-svn: 159533
-rw-r--r--compiler-rt/lib/tsan/Makefile.old2
-rw-r--r--compiler-rt/lib/tsan/rtl_tests/tsan_test.cc1
2 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/tsan/Makefile.old b/compiler-rt/lib/tsan/Makefile.old
index a0e83b6f2c4..4ee928c49ea 100644
--- a/compiler-rt/lib/tsan/Makefile.old
+++ b/compiler-rt/lib/tsan/Makefile.old
@@ -46,7 +46,7 @@ libtsan:
%.o: %.cc $(UNIT_TEST_HDR)
$(CXX) $(CXXFLAGS) $(CFLAGS) $(INCLUDES) -o $@ -c $<
-tsan_test: $(TEST_OBJ) $(UNIT_TEST_OBJ) $(RTL_TEST_OBJ) \
+tsan_test: $(UNIT_TEST_OBJ) $(RTL_TEST_OBJ) \
$(SANITIZER_COMMON_TESTS_OBJ) $(LIBTSAN) $(GTEST_LIB)
$(CXX) $^ -o $@ $(LDFLAGS)
diff --git a/compiler-rt/lib/tsan/rtl_tests/tsan_test.cc b/compiler-rt/lib/tsan/rtl_tests/tsan_test.cc
index 2c903ae359f..71641400efe 100644
--- a/compiler-rt/lib/tsan/rtl_tests/tsan_test.cc
+++ b/compiler-rt/lib/tsan/rtl_tests/tsan_test.cc
@@ -34,6 +34,7 @@ int main(int argc, char **argv) {
__tsan_func_entry(__builtin_return_address(0));
__tsan_func_entry((char*)&main + 1);
+ testing::GTEST_FLAG(death_test_style) = "threadsafe";
testing::InitGoogleTest(&argc, argv);
int res = RUN_ALL_TESTS();
OpenPOWER on IntegriCloud