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

Side by Side Diff: media/audio/cross_process_notification_unittest.cc

Issue 9791069: Disable the TwoThreads unit test since it triggers the TSAN bot. This is a false positive since we'… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/shared_memory.h" 7 #include "base/shared_memory.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/test/multiprocess_test.h" 9 #include "base/test/multiprocess_test.h"
10 #include "base/threading/platform_thread.h" 10 #include "base/threading/platform_thread.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 a.Signal(); 212 a.Signal();
213 b.Wait(); 213 b.Wait();
214 214
215 b.Signal(); 215 b.Signal();
216 a.Wait(); 216 a.Wait();
217 } 217 }
218 218
219 // Spins two worker threads, each with their own CrossProcessNotification 219 // Spins two worker threads, each with their own CrossProcessNotification
220 // that they use to read and write from a shared memory buffer. 220 // that they use to read and write from a shared memory buffer.
221 TEST(CrossProcessNotification, TwoThreads) { 221 // Disabled as it trips of the TSAN bot (false positive since TSAN doesn't
222 // recognize sockets as being a synchronization primitive).
223 TEST(CrossProcessNotification, DISABLED_TwoThreads) {
222 CrossProcessNotification a, b; 224 CrossProcessNotification a, b;
223 ASSERT_TRUE(CrossProcessNotification::InitializePair(&a, &b)); 225 ASSERT_TRUE(CrossProcessNotification::InitializePair(&a, &b));
224 226
225 size_t data = 0; 227 size_t data = 0;
226 const size_t kRepeats = 10000; 228 const size_t kRepeats = 10000;
227 SingleNotifierWorker worker1(&data, kRepeats, &a); 229 SingleNotifierWorker worker1(&data, kRepeats, &a);
228 SingleNotifierWorker worker2(&data, kRepeats, &b); 230 SingleNotifierWorker worker2(&data, kRepeats, &b);
229 base::PlatformThreadHandle thread1, thread2; 231 base::PlatformThreadHandle thread1, thread2;
230 base::PlatformThread::Create(0, &worker1, &thread1); 232 base::PlatformThread::Create(0, &worker1, &thread1);
231 base::PlatformThread::Create(0, &worker2, &thread2); 233 base::PlatformThread::Create(0, &worker2, &thread2);
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 455
454 ipc->ready = true; 456 ipc->ready = true;
455 457
456 a.Signal(); 458 a.Signal();
457 a.Wait(); 459 a.Wait();
458 460
459 int exit_code = -1; 461 int exit_code = -1;
460 base::WaitForExitCode(process, &exit_code); 462 base::WaitForExitCode(process, &exit_code);
461 EXPECT_EQ(0, exit_code); 463 EXPECT_EQ(0, exit_code);
462 } 464 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698