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

Unified Diff: sandbox/linux/services/namespace_sandbox_unittest.cc

Issue 1158793003: Enable one PID namespace per process for NaCl processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments. Created 5 years, 7 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
Index: sandbox/linux/services/namespace_sandbox_unittest.cc
diff --git a/sandbox/linux/services/namespace_sandbox_unittest.cc b/sandbox/linux/services/namespace_sandbox_unittest.cc
index 547ef6728c871cb1972993f84d44b9b615fcb9d3..3b22e84130e723afd89fa9c4ead304335f6c8cb6 100644
--- a/sandbox/linux/services/namespace_sandbox_unittest.cc
+++ b/sandbox/linux/services/namespace_sandbox_unittest.cc
@@ -120,7 +120,6 @@ TEST_F(NamespaceSandboxTest, NestedNamespaceSandbox) {
}
const int kNormalExitCode = 0;
-const int kSignalTerminationExitCode = 255;
// Ensure that CHECK(false) is distinguishable from _exit(kNormalExitCode).
// Allowing noise since CHECK(false) will write a stack trace to stderr.
@@ -182,7 +181,7 @@ SANDBOX_TEST(ForkInNewPidNamespace, ExitWithSignal) {
CHECK_EQ(1, getpid());
CHECK(!Credentials::HasAnyCapability());
CHECK(NamespaceSandbox::InstallTerminationSignalHandler(
- SIGTERM, kSignalTerminationExitCode));
+ SIGTERM, NamespaceSandbox::SignalExitCode(SIGTERM)));
while (true) {
raise(SIGTERM);
}
@@ -191,7 +190,7 @@ SANDBOX_TEST(ForkInNewPidNamespace, ExitWithSignal) {
int status;
PCHECK(waitpid(pid, &status, 0) == pid);
CHECK(WIFEXITED(status));
- CHECK_EQ(kSignalTerminationExitCode, WEXITSTATUS(status));
+ CHECK_EQ(NamespaceSandbox::SignalExitCode(SIGTERM), WEXITSTATUS(status));
}
volatile sig_atomic_t signal_handler_called;
@@ -206,7 +205,7 @@ SANDBOX_TEST(InstallTerminationSignalHandler, DoesNotOverrideExistingHandlers) {
NamespaceSandbox::InstallDefaultTerminationSignalHandlers();
CHECK(!NamespaceSandbox::InstallTerminationSignalHandler(
- SIGUSR1, kSignalTerminationExitCode));
+ SIGUSR1, NamespaceSandbox::SignalExitCode(SIGUSR1)));
raise(SIGUSR1);
CHECK_EQ(1, signal_handler_called);
« sandbox/linux/services/namespace_sandbox.h ('K') | « sandbox/linux/services/namespace_sandbox.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698