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

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

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sandbox/linux/services/syscall_wrappers_unittest.cc ('k') | sandbox/linux/tests/test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/services/unix_domain_socket_unittest.cc
diff --git a/sandbox/linux/services/unix_domain_socket_unittest.cc b/sandbox/linux/services/unix_domain_socket_unittest.cc
index 17208a829ddc0d200f1d4c5dde0a5ce3c19eb221..4d57c0d2fce5ab464ca75ab1e9aa9db528b9f4da 100644
--- a/sandbox/linux/services/unix_domain_socket_unittest.cc
+++ b/sandbox/linux/services/unix_domain_socket_unittest.cc
@@ -18,6 +18,7 @@
#include "base/posix/eintr_wrapper.h"
#include "base/posix/unix_domain_socket_linux.h"
#include "base/process/process_handle.h"
+#include "sandbox/linux/services/syscall_wrappers.h"
#include "sandbox/linux/tests/unit_tests.h"
// Additional tests for base's UnixDomainSocket to make sure it behaves
@@ -144,14 +145,14 @@ SANDBOX_TEST(UnixDomainSocketTest, Namespace) {
CHECK(UnixDomainSocket::EnableReceiveProcessId(recv_sock.get()));
- const pid_t pid = syscall(__NR_clone, CLONE_NEWPID | SIGCHLD, 0, 0, 0);
+ const pid_t pid = sys_clone(CLONE_NEWPID | SIGCHLD, 0, 0, 0, 0);
CHECK_NE(-1, pid);
if (pid == 0) {
// Child process.
recv_sock.reset();
// Check that we think we're pid 1 in our new namespace.
- CHECK_EQ(1, syscall(__NR_getpid));
+ CHECK_EQ(1, sys_getpid());
SendHello(send_sock.get());
_exit(0);
@@ -178,13 +179,13 @@ SANDBOX_TEST(UnixDomainSocketTest, DoubleNamespace) {
CHECK(UnixDomainSocket::EnableReceiveProcessId(recv_sock.get()));
- const pid_t pid = syscall(__NR_clone, CLONE_NEWPID | SIGCHLD, 0, 0, 0);
+ const pid_t pid = sys_clone(CLONE_NEWPID | SIGCHLD, 0, 0, 0, 0);
CHECK_NE(-1, pid);
if (pid == 0) {
// Child process.
recv_sock.reset();
- const pid_t pid2 = syscall(__NR_clone, CLONE_NEWPID | SIGCHLD, 0, 0, 0);
+ const pid_t pid2 = sys_clone(CLONE_NEWPID | SIGCHLD, 0, 0, 0, 0);
CHECK_NE(-1, pid2);
if (pid2 != 0) {
@@ -195,7 +196,7 @@ SANDBOX_TEST(UnixDomainSocketTest, DoubleNamespace) {
}
// Check that we think we're pid 1.
- CHECK_EQ(1, syscall(__NR_getpid));
+ CHECK_EQ(1, sys_getpid());
SendHello(send_sock.get());
_exit(0);
@@ -244,7 +245,7 @@ SANDBOX_TEST(UnixDomainSocketTest, ImpossiblePid) {
CHECK(UnixDomainSocket::EnableReceiveProcessId(recv_sock.get()));
- const pid_t pid = syscall(__NR_clone, CLONE_NEWPID | SIGCHLD, 0, 0, 0);
+ const pid_t pid = sys_clone(CLONE_NEWPID | SIGCHLD, 0, 0, 0, 0);
CHECK_NE(-1, pid);
if (pid == 0) {
// Child process.
« no previous file with comments | « sandbox/linux/services/syscall_wrappers_unittest.cc ('k') | sandbox/linux/tests/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698