Commit 8c8f3abc authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

[ThreadPool] Fix unlikely race in ThreadPoolImplTest.FileDescriptorWatcherNoOpsAfterShutdown

R=etiennep@chromium.org

Bug: 965717
Change-Id: Ie7185cd0afc819d612368c6ce168a1544b2a64af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1654271
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: default avatarEtienne Pierre-Doray <etiennep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#668476}
parent 037c5c0b
...@@ -767,6 +767,12 @@ TEST_P(ThreadPoolImplTest, FileDescriptorWatcherNoOpsAfterShutdown) { ...@@ -767,6 +767,12 @@ TEST_P(ThreadPoolImplTest, FileDescriptorWatcherNoOpsAfterShutdown) {
// Give a chance for the file watcher to fire before closing the handles. // Give a chance for the file watcher to fire before closing the handles.
PlatformThread::Sleep(TestTimeouts::tiny_timeout()); PlatformThread::Sleep(TestTimeouts::tiny_timeout());
// Need to join the ServiceThread before closing the pipes as the pipe
// becoming readable is observed on the ServiceThread and TSAN correctly
// identifies this as a race even though the above sleep makes it highly
// unlikely in practice.
TearDown();
EXPECT_EQ(0, IGNORE_EINTR(close(pipes[0]))); EXPECT_EQ(0, IGNORE_EINTR(close(pipes[0])));
EXPECT_EQ(0, IGNORE_EINTR(close(pipes[1]))); EXPECT_EQ(0, IGNORE_EINTR(close(pipes[1])));
} }
......
...@@ -168,10 +168,6 @@ char kTSanDefaultSuppressions[] = ...@@ -168,10 +168,6 @@ char kTSanDefaultSuppressions[] =
// http://crbug.com/927330 // http://crbug.com/927330
"race:net::(anonymous namespace)::g_network_change_notifier\n" "race:net::(anonymous namespace)::g_network_change_notifier\n"
// https://crbug.com/965717
"race:base::internal::ThreadPoolImplTest_"
"FileDescriptorWatcherNoOpsAfterShutdown_Test::TestBody\n"
// https://crbug.com/965722 // https://crbug.com/965722
"race:content::(anonymous namespace)::CorruptDBRequestHandler\n" "race:content::(anonymous namespace)::CorruptDBRequestHandler\n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment