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

Unified Diff: sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc

Issue 11647024: Update Linux sandbox tests to pass on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@seccomp-2
Patch Set: Guard the Android path_utils.h. Created 8 years 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 | « no previous file | sandbox/linux/services/broker_process_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc
diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc b/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc
index dd5ece024acb37b951d1368cc81204fee5b14dd7..90ec8ffbdb74f1ea35ae4b90524e362963efc84d 100644
--- a/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc
+++ b/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc
@@ -451,19 +451,21 @@ BPF_TEST(SandboxBpf, SigMask, RedirectAllSyscallsPolicy) {
// entirely in the kernel.
sigset_t mask0, mask1, mask2;
- // Call sigprocmask() to verify that SIGUSR1 wasn't blocked, if we didn't
+ // Call sigprocmask() to verify that SIGUSR2 wasn't blocked, if we didn't
// change the mask (it shouldn't have been, as it isn't blocked by default
// in POSIX).
+ //
+ // Use SIGUSR2 because Android seems to use SIGUSR1 for some purpose.
sigemptyset(&mask0);
BPF_ASSERT(!sigprocmask(SIG_BLOCK, &mask0, &mask1));
- BPF_ASSERT(!sigismember(&mask1, SIGUSR1));
+ BPF_ASSERT(!sigismember(&mask1, SIGUSR2));
// Try again, and this time we verify that we can block it. This
// requires a second call to sigprocmask().
- sigaddset(&mask0, SIGUSR1);
+ sigaddset(&mask0, SIGUSR2);
BPF_ASSERT(!sigprocmask(SIG_BLOCK, &mask0, NULL));
BPF_ASSERT(!sigprocmask(SIG_BLOCK, NULL, &mask2));
- BPF_ASSERT( sigismember(&mask2, SIGUSR1));
+ BPF_ASSERT( sigismember(&mask2, SIGUSR2));
}
BPF_TEST(SandboxBpf, UnsafeTrapWithErrno, RedirectAllSyscallsPolicy) {
« no previous file with comments | « no previous file | sandbox/linux/services/broker_process_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698