diff options
author | timurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 21:03:00 +0000 |
---|---|---|
committer | timurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 21:03:00 +0000 |
commit | bd39fda10c96f6ab10dd6f8f324ec7282c3600a2 (patch) | |
tree | 7902cfe28fce4417c982ed48e6877df605d940dd /base | |
parent | 65ca6d532a82f095b7bb8755789c59a533b74979 (diff) | |
download | chromium_src-bd39fda10c96f6ab10dd6f8f324ec7282c3600a2.zip chromium_src-bd39fda10c96f6ab10dd6f8f324ec7282c3600a2.tar.gz chromium_src-bd39fda10c96f6ab10dd6f8f324ec7282c3600a2.tar.bz2 |
Add sleep into data race sanity test since it fails on TSan x64 FYI bot (too fast?)
TBR=glider
TEST=TSAN x64 FYI bot should become green
Review URL: http://codereview.chromium.org/668176
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40778 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/tools_sanity_unittest.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/base/tools_sanity_unittest.cc b/base/tools_sanity_unittest.cc index 91f56b4..0a18031 100644 --- a/base/tools_sanity_unittest.cc +++ b/base/tools_sanity_unittest.cc @@ -16,6 +16,11 @@ class TOOLS_SANITY_TEST_CONCURRENT_THREAD : public PlatformThread::Delegate { ~TOOLS_SANITY_TEST_CONCURRENT_THREAD() {} void ThreadMain() { *value_ = true; + + // Sleep for a few milliseconds so the two threads are more likely to live + // simultaneously. Otherwise we may miss the report due to mutex + // lock/unlock's inside thread creation code in pure-happens-before mode... + PlatformThread::Sleep(100); } private: bool* value_; @@ -47,4 +52,3 @@ TEST(ToolsSanityTest, DataRace) { delete thread1; delete thread2; } - |