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

Unified Diff: base/process/process_util_unittest.cc

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 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 1f7f1b2c776edcfe2942c7564a74a209942804ec..6c1a3f1d7619d2b128efb58b6c810c2c79023eae 100644
--- a/base/process/process_util_unittest.cc
+++ b/base/process/process_util_unittest.cc
@@ -64,6 +64,12 @@ using base::FilePath;
namespace {
+const char kSignalFileSlow[] = "SlowChildProcess.die";
+const char kSignalFileKill[] = "KilledChildProcess.die";
+
+#if defined(OS_POSIX)
+const char kSignalFileTerm[] = "TerminatedChildProcess.die";
+
#if defined(OS_ANDROID)
const char kShellPath[] = "/system/bin/sh";
const char kPosixShell[] = "sh";
@@ -71,13 +77,7 @@ const char kPosixShell[] = "sh";
const char kShellPath[] = "/bin/sh";
const char kPosixShell[] = "bash";
#endif
-
-const char kSignalFileSlow[] = "SlowChildProcess.die";
-const char kSignalFileKill[] = "KilledChildProcess.die";
-
-#if defined(OS_POSIX)
-const char kSignalFileTerm[] = "TerminatedChildProcess.die";
-#endif
+#endif // defined(OS_POSIX)
#if defined(OS_WIN)
const int kExpectedStillRunningExitCode = 0x102;
@@ -1025,6 +1025,7 @@ MULTIPROCESS_TEST_MAIN(CheckPidProcess) {
return kSuccess;
}
+#if defined(CLONE_NEWUSER) && defined(CLONE_NEWPID)
TEST_F(ProcessUtilTest, CloneFlags) {
if (RunningOnValgrind() ||
!base::PathExists(FilePath("/proc/self/ns/user")) ||
@@ -1043,6 +1044,7 @@ TEST_F(ProcessUtilTest, CloneFlags) {
EXPECT_TRUE(process.WaitForExit(&exit_code));
EXPECT_EQ(kSuccess, exit_code);
}
+#endif
TEST(ForkWithFlagsTest, UpdatesPidCache) {
// The libc clone function, which allows ForkWithFlags to keep the pid cache
« 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