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 0b6acb5fe0487280cd4b6e24cecddaab1c7ec979..c5df60627bcf30e73e4a798c4d6aa65dacf9ea90 100644 |
--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc |
+++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc |
@@ -5,12 +5,14 @@ |
#include "sandbox/linux/seccomp-bpf-helpers/baseline_policy.h" |
#include <errno.h> |
+#include <linux/futex.h> |
#include <sched.h> |
#include <signal.h> |
#include <string.h> |
#include <sys/socket.h> |
#include <sys/stat.h> |
#include <sys/syscall.h> |
+#include <sys/time.h> |
#include <sys/types.h> |
#include <sys/wait.h> |
#include <unistd.h> |
@@ -23,6 +25,7 @@ |
#include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" |
#include "sandbox/linux/seccomp-bpf/bpf_tests.h" |
#include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" |
+#include "sandbox/linux/services/android_futex.h" |
#include "sandbox/linux/services/linux_syscalls.h" |
#include "sandbox/linux/services/thread_helpers.h" |
#include "sandbox/linux/tests/unit_tests.h" |
@@ -241,6 +244,24 @@ TEST_BASELINE_SIGSYS(__NR_getcpu); |
TEST_BASELINE_SIGSYS(__NR_setpgid); |
TEST_BASELINE_SIGSYS(__NR_getitimer); |
+#if !defined(OS_ANDROID) |
+BPF_DEATH_TEST_C(BaselinePolicy, |
+ FutexWithRequeuePriorityInheritence, |
+ DEATH_MESSAGE(GetFutexErrorMessageContentForTests()), |
+ BaselinePolicy) { |
+ syscall(__NR_futex, NULL, FUTEX_CMP_REQUEUE_PI, 0, NULL, NULL, 0); |
+ _exit(1); |
+} |
+ |
+BPF_DEATH_TEST_C(BaselinePolicy, |
+ FutexWithRequeuePriorityInheritencePrivate, |
+ DEATH_MESSAGE(GetFutexErrorMessageContentForTests()), |
+ BaselinePolicy) { |
+ syscall(__NR_futex, NULL, FUTEX_CMP_REQUEUE_PI_PRIVATE, 0, NULL, NULL, 0); |
+ _exit(1); |
+} |
+#endif // !defined(OS_ANDROID) |
+ |
} // namespace |
} // namespace sandbox |