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

Side by Side Diff: sandbox/linux/integration_tests/bpf_dsl_seccomp_unittest.cc

Issue 1292753009: sandbox/linux: move ErrorCode into bpf_dsl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bpf_dsl-deps
Patch Set: Rebase and cleanup test code Created 5 years, 4 months 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 unified diff | Download patch
« no previous file with comments | « sandbox/linux/bpf_dsl/verifier.cc ('k') | sandbox/linux/sandbox_linux.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <fcntl.h> 6 #include <fcntl.h>
7 #include <pthread.h> 7 #include <pthread.h>
8 #include <sched.h> 8 #include <sched.h>
9 #include <signal.h> 9 #include <signal.h>
10 #include <sys/prctl.h> 10 #include <sys/prctl.h>
(...skipping 14 matching lines...) Expand all
25 #include "base/bind.h" 25 #include "base/bind.h"
26 #include "base/logging.h" 26 #include "base/logging.h"
27 #include "base/macros.h" 27 #include "base/macros.h"
28 #include "base/memory/scoped_ptr.h" 28 #include "base/memory/scoped_ptr.h"
29 #include "base/posix/eintr_wrapper.h" 29 #include "base/posix/eintr_wrapper.h"
30 #include "base/synchronization/waitable_event.h" 30 #include "base/synchronization/waitable_event.h"
31 #include "base/sys_info.h" 31 #include "base/sys_info.h"
32 #include "base/threading/thread.h" 32 #include "base/threading/thread.h"
33 #include "build/build_config.h" 33 #include "build/build_config.h"
34 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" 34 #include "sandbox/linux/bpf_dsl/bpf_dsl.h"
35 #include "sandbox/linux/bpf_dsl/errorcode.h"
35 #include "sandbox/linux/bpf_dsl/linux_syscall_ranges.h" 36 #include "sandbox/linux/bpf_dsl/linux_syscall_ranges.h"
36 #include "sandbox/linux/bpf_dsl/policy.h" 37 #include "sandbox/linux/bpf_dsl/policy.h"
37 #include "sandbox/linux/bpf_dsl/seccomp_macros.h" 38 #include "sandbox/linux/bpf_dsl/seccomp_macros.h"
38 #include "sandbox/linux/seccomp-bpf/bpf_tests.h" 39 #include "sandbox/linux/seccomp-bpf/bpf_tests.h"
39 #include "sandbox/linux/seccomp-bpf/die.h" 40 #include "sandbox/linux/seccomp-bpf/die.h"
40 #include "sandbox/linux/seccomp-bpf/errorcode.h"
41 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" 41 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h"
42 #include "sandbox/linux/seccomp-bpf/syscall.h" 42 #include "sandbox/linux/seccomp-bpf/syscall.h"
43 #include "sandbox/linux/seccomp-bpf/trap.h" 43 #include "sandbox/linux/seccomp-bpf/trap.h"
44 #include "sandbox/linux/services/syscall_wrappers.h" 44 #include "sandbox/linux/services/syscall_wrappers.h"
45 #include "sandbox/linux/services/thread_helpers.h" 45 #include "sandbox/linux/services/thread_helpers.h"
46 #include "sandbox/linux/system_headers/linux_syscalls.h" 46 #include "sandbox/linux/system_headers/linux_syscalls.h"
47 #include "sandbox/linux/tests/scoped_temporary_file.h" 47 #include "sandbox/linux/tests/scoped_temporary_file.h"
48 #include "sandbox/linux/tests/unit_tests.h" 48 #include "sandbox/linux/tests/unit_tests.h"
49 #include "testing/gtest/include/gtest/gtest.h" 49 #include "testing/gtest/include/gtest/gtest.h"
50 50
(...skipping 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after
2250 BPF_ASSERT_EQ(ENOSYS, errno); 2250 BPF_ASSERT_EQ(ENOSYS, errno);
2251 2251
2252 BPF_ASSERT_EQ(-1, syscall(__NR_setgid, 300)); 2252 BPF_ASSERT_EQ(-1, syscall(__NR_setgid, 300));
2253 BPF_ASSERT_EQ(EPERM, errno); 2253 BPF_ASSERT_EQ(EPERM, errno);
2254 } 2254 }
2255 2255
2256 } // namespace 2256 } // namespace
2257 2257
2258 } // namespace bpf_dsl 2258 } // namespace bpf_dsl
2259 } // namespace sandbox 2259 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/linux/bpf_dsl/verifier.cc ('k') | sandbox/linux/sandbox_linux.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698