OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <errno.h> | 5 #include <errno.h> |
6 #include <pthread.h> | 6 #include <pthread.h> |
7 #include <sched.h> | 7 #include <sched.h> |
8 #include <sys/prctl.h> | 8 #include <sys/prctl.h> |
9 #include <sys/syscall.h> | 9 #include <sys/syscall.h> |
10 #include <sys/time.h> | 10 #include <sys/time.h> |
11 #include <sys/types.h> | 11 #include <sys/types.h> |
12 #include <sys/utsname.h> | 12 #include <sys/utsname.h> |
13 #include <unistd.h> | 13 #include <unistd.h> |
14 | 14 |
15 #if defined(ANDROID) | 15 #if defined(ANDROID) |
16 // Work-around for buggy headers in Android's NDK | 16 // Work-around for buggy headers in Android's NDK |
17 #define __user | 17 #define __user |
18 #endif | 18 #endif |
19 #include <linux/futex.h> | 19 #include <linux/futex.h> |
20 | 20 |
21 #include <ostream> | 21 #include <ostream> |
22 | 22 |
23 #include "base/memory/scoped_ptr.h" | 23 #include "base/memory/scoped_ptr.h" |
24 #include "build/build_config.h" | 24 #include "build/build_config.h" |
| 25 #include "build/build_config_functions.h" |
25 #include "sandbox/linux/seccomp-bpf/bpf_tests.h" | 26 #include "sandbox/linux/seccomp-bpf/bpf_tests.h" |
26 #include "sandbox/linux/seccomp-bpf/syscall.h" | 27 #include "sandbox/linux/seccomp-bpf/syscall.h" |
27 #include "sandbox/linux/seccomp-bpf/trap.h" | 28 #include "sandbox/linux/seccomp-bpf/trap.h" |
28 #include "sandbox/linux/seccomp-bpf/verifier.h" | 29 #include "sandbox/linux/seccomp-bpf/verifier.h" |
29 #include "sandbox/linux/services/broker_process.h" | 30 #include "sandbox/linux/services/broker_process.h" |
30 #include "sandbox/linux/services/build_config_functions.h" | |
31 #include "sandbox/linux/services/linux_syscalls.h" | 31 #include "sandbox/linux/services/linux_syscalls.h" |
32 #include "sandbox/linux/tests/unit_tests.h" | 32 #include "sandbox/linux/tests/unit_tests.h" |
33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
34 | 34 |
35 // Workaround for Android's prctl.h file. | 35 // Workaround for Android's prctl.h file. |
36 #ifndef PR_GET_ENDIAN | 36 #ifndef PR_GET_ENDIAN |
37 #define PR_GET_ENDIAN 19 | 37 #define PR_GET_ENDIAN 19 |
38 #endif | 38 #endif |
39 #ifndef PR_CAPBSET_READ | 39 #ifndef PR_CAPBSET_READ |
40 #define PR_CAPBSET_READ 23 | 40 #define PR_CAPBSET_READ 23 |
(...skipping 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1774 0, | 1774 0, |
1775 0, | 1775 0, |
1776 &pid) == -EPERM); | 1776 &pid) == -EPERM); |
1777 } | 1777 } |
1778 | 1778 |
1779 BPF_TEST(SandboxBpf, PthreadEquality, PthreadPolicyEquality) { PthreadTest(); } | 1779 BPF_TEST(SandboxBpf, PthreadEquality, PthreadPolicyEquality) { PthreadTest(); } |
1780 | 1780 |
1781 BPF_TEST(SandboxBpf, PthreadBitMask, PthreadPolicyBitMask) { PthreadTest(); } | 1781 BPF_TEST(SandboxBpf, PthreadBitMask, PthreadPolicyBitMask) { PthreadTest(); } |
1782 | 1782 |
1783 } // namespace | 1783 } // namespace |
OLD | NEW |