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

Unified Diff: base/process/process_util_unittest.cc

Issue 2549363004: Multiprocess test client: Android child process launcher rework. (Closed)
Patch Set: content_unittests + sync Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process/process_posix.cc ('k') | base/process/process_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_util_unittest.cc
diff --git a/base/process/process_util_unittest.cc b/base/process/process_util_unittest.cc
index 87fdd0123097e51739a2bc1830e34f584302fdc8..7031706e0b7796721e098ca6b72aa2b8b126b7f6 100644
--- a/base/process/process_util_unittest.cc
+++ b/base/process/process_util_unittest.cc
@@ -257,7 +257,7 @@ TEST_F(ProcessUtilTest, GetProcId) {
}
#endif // defined(OS_WIN)
-#if !defined(OS_MACOSX)
+#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
// This test is disabled on Mac, since it's flaky due to ReportCrash
// taking a variable amount of time to parse and load the debug and
// symbol data for this unit test's executable before firing the
@@ -266,23 +266,14 @@ TEST_F(ProcessUtilTest, GetProcId) {
// TODO(gspencer): turn this test process into a very small program
// with no symbols (instead of using the multiprocess testing
// framework) to reduce the ReportCrash overhead.
+//
+// It is disabled on Android as MultiprocessTests are started as services that
+// the framework restarts on crashes.
const char kSignalFileCrash[] = "CrashingChildProcess.die";
MULTIPROCESS_TEST_MAIN(CrashingChildProcess) {
WaitToDie(ProcessUtilTest::GetSignalFilePath(kSignalFileCrash).c_str());
-#if defined(OS_ANDROID)
- // Android L+ expose signal and sigaction symbols that override the system
- // ones. There is a bug in these functions where a request to set the handler
- // to SIG_DFL is ignored. In that case, an infinite loop is entered as the
- // signal is repeatedly sent to the crash dump signal handler.
- // To work around this, directly call the system's sigaction.
- struct kernel_sigaction sa;
- memset(&sa, 0, sizeof(sa));
- sys_sigemptyset(&sa.sa_mask);
- sa.sa_handler_ = SIG_DFL;
- sa.sa_flags = SA_RESTART;
- sys_rt_sigaction(SIGSEGV, &sa, NULL, sizeof(kernel_sigset_t));
-#elif defined(OS_POSIX)
+#if defined(OS_POSIX)
// Have to disable to signal handler for segv so we can get a crash
// instead of an abnormal termination through the crash dump handler.
::signal(SIGSEGV, SIG_DFL);
@@ -331,7 +322,7 @@ TEST_F(ProcessUtilTest, MAYBE_GetTerminationStatusCrash) {
base::debug::EnableInProcessStackDumping();
remove(signal_file.c_str());
}
-#endif // !defined(OS_MACOSX)
+#endif // !defined(OS_MACOSX) && !defined(OS_ANDROID)
MULTIPROCESS_TEST_MAIN(KilledChildProcess) {
WaitToDie(ProcessUtilTest::GetSignalFilePath(kSignalFileKill).c_str());
« no previous file with comments | « base/process/process_posix.cc ('k') | base/process/process_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698