diff options
author | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-03 16:54:32 +0000 |
---|---|---|
committer | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-03 16:54:32 +0000 |
commit | d86c06c97a9736a4f852e8e7321f36a4bab1560d (patch) | |
tree | eb336082c8e38510440eddbeae5cac43e8130874 | |
parent | 527340c39c9dad5d318fb158888a0cc01427bbf1 (diff) | |
download | chromium_src-d86c06c97a9736a4f852e8e7321f36a4bab1560d.zip chromium_src-d86c06c97a9736a4f852e8e7321f36a4bab1560d.tar.gz chromium_src-d86c06c97a9736a4f852e8e7321f36a4bab1560d.tar.bz2 |
Disable the tests failing under TSan because of incorrect assumptions about the threadpool size:
ConditionVariableTest.LargeFastTaskTest
ConditionVariableTest.MultiThreadConsumerTest
ConditionVariableTest.TimeoutTest
PosixDynamicThreadPoolTest.Complex
PosixDynamicThreadPoolTest.ReuseIdle
PosixDynamicThreadPoolTest.TwoActiveTasks
BUG=303007
TBR=jar@chromium.org
Review URL: https://codereview.chromium.org/25675007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226775 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/synchronization/condition_variable_unittest.cc | 20 | ||||
-rw-r--r-- | base/threading/worker_pool_posix_unittest.cc | 16 |
2 files changed, 29 insertions, 7 deletions
diff --git a/base/synchronization/condition_variable_unittest.cc b/base/synchronization/condition_variable_unittest.cc index 65e153c..ebaf02a 100644 --- a/base/synchronization/condition_variable_unittest.cc +++ b/base/synchronization/condition_variable_unittest.cc @@ -171,7 +171,13 @@ TEST_F(ConditionVariableTest, StartupShutdownTest) { lock.Release(); } // Call for cv destruction. -TEST_F(ConditionVariableTest, TimeoutTest) { +#if defined(THREAD_SANITIZER) +// Fails under ThreadSanitizer, see http://crbug.com/303007. +#define MAYBE_TimeoutTest DISABLED_TimeoutTest +#else +#define MAYBE_TimeoutTest TimeoutTest +#endif +TEST_F(ConditionVariableTest, MAYBE_TimeoutTest) { Lock lock; ConditionVariable cv(&lock); lock.Acquire(); @@ -243,8 +249,8 @@ TEST_F(ConditionVariableTest, DISABLED_TimeoutAcrossSetTimeOfDay) { // Suddenly got flaky on Win, see http://crbug.com/10607 (starting at -// comment #15) -#if defined(OS_WIN) +// comment #15). Failing under ThreadSanitizer, see http://crbug.com/303007. +#if defined(OS_WIN) || defined(THREAD_SANITIZER) #define MAYBE_MultiThreadConsumerTest DISABLED_MultiThreadConsumerTest #else #define MAYBE_MultiThreadConsumerTest MultiThreadConsumerTest @@ -394,7 +400,13 @@ TEST_F(ConditionVariableTest, MAYBE_MultiThreadConsumerTest) { queue.ThreadSafeCheckShutdown(kThreadCount)); } -TEST_F(ConditionVariableTest, LargeFastTaskTest) { +#if defined(THREAD_SANITIZER) +// Fails under ThreadSanitizer, see http://crbug.com/303007. +#define MAYBE_LargeFastTaskTest DISABLED_LargeFastTaskTest +#else +#define MAYBE_LargeFastTaskTest LargeFastTaskTest +#endif +TEST_F(ConditionVariableTest, MAYBE_LargeFastTaskTest) { const int kThreadCount = 200; WorkQueue queue(kThreadCount); // Start the threads. diff --git a/base/threading/worker_pool_posix_unittest.cc b/base/threading/worker_pool_posix_unittest.cc index 49f6570a..6343779 100644 --- a/base/threading/worker_pool_posix_unittest.cc +++ b/base/threading/worker_pool_posix_unittest.cc @@ -164,7 +164,17 @@ TEST_F(PosixDynamicThreadPoolTest, Basic) { EXPECT_EQ(1, counter_); } -TEST_F(PosixDynamicThreadPoolTest, ReuseIdle) { +#if defined(THREAD_SANITIZER) +// These tests fail under ThreadSanitizer, see http://crbug.com/303007. +#define MAYBE_ReuseIdle DISABLED_ReuseIdle +#define MAYBE_TwoActiveTasks DISABLED_TwoActiveTasks +#define MAYBE_Complex DISABLED_Complex +#else +#define MAYBE_ReuseIdle ReuseIdle +#define MAYBE_TwoActiveTasks TwoActiveTasks +#define MAYBE_Complex Complex +#endif +TEST_F(PosixDynamicThreadPoolTest, MAYBE_ReuseIdle) { // Add one task and wait for it to be completed. pool_->PostTask(FROM_HERE, CreateNewIncrementingTaskCallback()); @@ -183,7 +193,7 @@ TEST_F(PosixDynamicThreadPoolTest, ReuseIdle) { EXPECT_EQ(3, counter_); } -TEST_F(PosixDynamicThreadPoolTest, TwoActiveTasks) { +TEST_F(PosixDynamicThreadPoolTest, MAYBE_TwoActiveTasks) { // Add two blocking tasks. pool_->PostTask(FROM_HERE, CreateNewBlockingIncrementingTaskCallback()); pool_->PostTask(FROM_HERE, CreateNewBlockingIncrementingTaskCallback()); @@ -199,7 +209,7 @@ TEST_F(PosixDynamicThreadPoolTest, TwoActiveTasks) { EXPECT_EQ(2, counter_); } -TEST_F(PosixDynamicThreadPoolTest, Complex) { +TEST_F(PosixDynamicThreadPoolTest, MAYBE_Complex) { // Add two non blocking tasks and wait for them to finish. pool_->PostTask(FROM_HERE, CreateNewIncrementingTaskCallback()); |