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 #ifndef SANDBOX_LINUX_SECCOMP_BPF_BPF_TESTS_H__ | 5 #ifndef SANDBOX_LINUX_SECCOMP_BPF_BPF_TESTS_H__ |
6 #define SANDBOX_LINUX_SECCOMP_BPF_BPF_TESTS_H__ | 6 #define SANDBOX_LINUX_SECCOMP_BPF_BPF_TESTS_H__ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/macros.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h" | 10 #include "sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h" |
11 #include "sandbox/linux/tests/unit_tests.h" | 11 #include "sandbox/linux/tests/unit_tests.h" |
12 | 12 |
13 namespace sandbox { | 13 namespace sandbox { |
14 | 14 |
15 // BPF_TEST_C() is a special version of SANDBOX_TEST(). It runs a test function | 15 // BPF_TEST_C() is a special version of SANDBOX_TEST(). It runs a test function |
16 // in a sub-process, under a seccomp-bpf policy specified in | 16 // in a sub-process, under a seccomp-bpf policy specified in |
17 // |bpf_policy_class_name| without failing on configurations that are allowed | 17 // |bpf_policy_class_name| without failing on configurations that are allowed |
18 // to not support seccomp-bpf in their kernels. | 18 // to not support seccomp-bpf in their kernels. |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 } | 115 } |
116 | 116 |
117 private: | 117 private: |
118 void (*test_function_)(void); | 118 void (*test_function_)(void); |
119 DISALLOW_COPY_AND_ASSIGN(BPFTesterSimpleDelegate); | 119 DISALLOW_COPY_AND_ASSIGN(BPFTesterSimpleDelegate); |
120 }; | 120 }; |
121 | 121 |
122 } // namespace sandbox | 122 } // namespace sandbox |
123 | 123 |
124 #endif // SANDBOX_LINUX_SECCOMP_BPF_BPF_TESTS_H__ | 124 #endif // SANDBOX_LINUX_SECCOMP_BPF_BPF_TESTS_H__ |
OLD | NEW |