Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3140)

Unified Diff: base/threading/thread_unittest.cc

Issue 2218663003: Fix TSAN suppressions for non-joinable ThreadTest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/sanitizers/tsan_suppressions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/thread_unittest.cc
diff --git a/base/threading/thread_unittest.cc b/base/threading/thread_unittest.cc
index 5c6c27506c9a2e54438c8447086b7805d1985921..481ac4b8d8614c2636b509ee2dd3afb119f07f6f 100644
--- a/base/threading/thread_unittest.cc
+++ b/base/threading/thread_unittest.cc
@@ -154,6 +154,9 @@ TEST_F(ThreadTest, StartWithOptions_StackSize) {
event.Wait();
}
+// Intentional test-only race for otherwise untestable code, won't fix.
+// https://crbug.com/634383
+#if !defined(THREAD_SANITIZER)
TEST_F(ThreadTest, StartWithOptions_NonJoinable) {
Thread* a = new Thread("StartNonJoinable");
// Non-joinable threads have to be leaked for now (see
@@ -193,6 +196,7 @@ TEST_F(ThreadTest, StartWithOptions_NonJoinable) {
// The thread should now have stopped on its own.
EXPECT_FALSE(a->IsRunning());
}
+#endif
TEST_F(ThreadTest, TwoTasksOnJoinableThread) {
bool was_invoked = false;
@@ -288,7 +292,11 @@ TEST_F(ThreadTest, StartTwice) {
EXPECT_FALSE(a.IsRunning());
}
+// Intentional test-only race for otherwise untestable code, won't fix.
+// https://crbug.com/634383
+#if !defined(THREAD_SANITIZER)
TEST_F(ThreadTest, StartTwiceNonJoinableNotAllowed) {
+ LOG(ERROR) << __FUNCTION__;
gab 2016/08/08 21:09:51 Leftover debug code?
Thread* a = new Thread("StartTwiceNonJoinable");
// Non-joinable threads have to be leaked for now (see
// Thread::Options::joinable for details).
@@ -323,6 +331,7 @@ TEST_F(ThreadTest, StartTwiceNonJoinableNotAllowed) {
// Restarting it should not be allowed.
EXPECT_DCHECK_DEATH(a->Start());
}
+#endif
TEST_F(ThreadTest, ThreadName) {
Thread a("ThreadName");
« no previous file with comments | « no previous file | build/sanitizers/tsan_suppressions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698