mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-07-19 20:49:29 +00:00
Remove barrier to fix Android build.
The unittest for #752 made use of pthread_barrier_t, which is not supported on Android. This change replaces the barrier code with a simple sleep, which proved sufficient to trigger the race. It only affects the test and does not affect the original fix for #752. Change-Id: I82c32cf00899176fa09089e716ed85850b8711e6 Reviewed-on: https://chromium-review.googlesource.com/895168 Reviewed-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
fd99ff473c
commit
242327485d
|
@ -270,6 +270,7 @@ static void* CrashFunction(void* b_ptr) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(__ANDROID_API__) || __ANDROID_API__ >= __ANDROID_API_N__
|
||||||
// Tests that concurrent crashes do not enter a loop by alternately triggering
|
// Tests that concurrent crashes do not enter a loop by alternately triggering
|
||||||
// the signal handler.
|
// the signal handler.
|
||||||
TEST(ExceptionHandlerTest, ParallelChildCrashesDontHang) {
|
TEST(ExceptionHandlerTest, ParallelChildCrashesDontHang) {
|
||||||
|
@ -306,7 +307,7 @@ TEST(ExceptionHandlerTest, ParallelChildCrashesDontHang) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait a while until the child should have crashed.
|
// Wait a while until the child should have crashed.
|
||||||
usleep(100000);
|
usleep(1000000);
|
||||||
// Kill the child if it is still running.
|
// Kill the child if it is still running.
|
||||||
kill(child, SIGKILL);
|
kill(child, SIGKILL);
|
||||||
|
|
||||||
|
@ -315,6 +316,7 @@ TEST(ExceptionHandlerTest, ParallelChildCrashesDontHang) {
|
||||||
// SIGKILL.
|
// SIGKILL.
|
||||||
ASSERT_NO_FATAL_FAILURE(WaitForProcessToTerminate(child, SIGSEGV));
|
ASSERT_NO_FATAL_FAILURE(WaitForProcessToTerminate(child, SIGSEGV));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool DoneCallbackReturnFalse(const MinidumpDescriptor& descriptor,
|
static bool DoneCallbackReturnFalse(const MinidumpDescriptor& descriptor,
|
||||||
void* context,
|
void* context,
|
||||||
|
|
Loading…
Reference in a new issue