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

Unified Diff: sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc

Issue 684993005: Linux sandbox: start adding syscall wrappers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More dependencies. 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
Index: sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
index a71975bb97fc3c159226be1461d377b879120de3..c472a1b20efd3144104d1832e70a2cd2bd2bb35f 100644
--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
+++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
@@ -32,6 +32,7 @@
#include "sandbox/linux/seccomp-bpf/syscall.h"
#include "sandbox/linux/services/android_futex.h"
#include "sandbox/linux/services/linux_syscalls.h"
+#include "sandbox/linux/services/syscall_wrappers.h"
#include "sandbox/linux/services/thread_helpers.h"
#include "sandbox/linux/tests/unit_tests.h"
@@ -113,7 +114,7 @@ BPF_TEST_C(BaselinePolicy, ForkErrno, BaselinePolicy) {
}
pid_t ForkX86Glibc() {
- return syscall(__NR_clone, CLONE_PARENT_SETTID | SIGCHLD);
+ return sys_clone(CLONE_PARENT_SETTID | SIGCHLD, 0, 0, 0, 0);
}
BPF_TEST_C(BaselinePolicy, ForkX86Eperm, BaselinePolicy) {
@@ -127,8 +128,8 @@ BPF_TEST_C(BaselinePolicy, ForkX86Eperm, BaselinePolicy) {
}
pid_t ForkARMGlibc() {
- return syscall(__NR_clone,
- CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD);
+ return sys_clone(CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, 0, 0, 0,
+ 0);
}
BPF_TEST_C(BaselinePolicy, ForkArmEperm, BaselinePolicy) {
@@ -150,7 +151,7 @@ BPF_DEATH_TEST_C(BaselinePolicy,
DisallowedCloneFlagCrashes,
DEATH_SEGV_MESSAGE(GetCloneErrorMessageContentForTests()),
BaselinePolicy) {
- pid_t pid = syscall(__NR_clone, CLONE_THREAD | SIGCHLD);
+ pid_t pid = sys_clone(CLONE_THREAD | SIGCHLD, 0, 0, 0, 0);
HandlePostForkReturn(pid);
}

Powered by Google App Engine
This is Rietveld 408576698