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 "sandbox/linux/seccomp-bpf/sandbox_bpf.h" | |
6 #include "sandbox/linux/seccomp-bpf/syscall_iterator.h" | 5 #include "sandbox/linux/seccomp-bpf/syscall_iterator.h" |
| 6 |
| 7 #include <stdint.h> |
| 8 |
| 9 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h" |
7 #include "sandbox/linux/tests/unit_tests.h" | 10 #include "sandbox/linux/tests/unit_tests.h" |
8 | 11 |
9 namespace sandbox { | 12 namespace sandbox { |
10 | 13 |
11 namespace { | 14 namespace { |
12 | 15 |
13 SANDBOX_TEST(SyscallIterator, Monotonous) { | 16 SANDBOX_TEST(SyscallIterator, Monotonous) { |
14 for (int i = 0; i < 2; ++i) { | 17 for (int i = 0; i < 2; ++i) { |
15 bool invalid_only = !i; // Testing both |invalid_only| cases. | 18 bool invalid_only = !i; // Testing both |invalid_only| cases. |
16 SyscallIterator iter(invalid_only); | 19 SyscallIterator iter(invalid_only); |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 next = iter.Next(); | 170 next = iter.Next(); |
168 } | 171 } |
169 SANDBOX_ASSERT(next == MAX_SYSCALL + 1); | 172 SANDBOX_ASSERT(next == MAX_SYSCALL + 1); |
170 #endif // defined(__arm__) | 173 #endif // defined(__arm__) |
171 } | 174 } |
172 #endif // defined(__mips__) | 175 #endif // defined(__mips__) |
173 | 176 |
174 } // namespace | 177 } // namespace |
175 | 178 |
176 } // namespace sandbox | 179 } // namespace sandbox |
OLD | NEW |