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

Side by Side Diff: sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc

Issue 693943003: Update from https://crrev.com/302630 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/DEPS ('k') | sandbox/linux/bpf_dsl/dump_bpf.h » ('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 (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/bpf_dsl/bpf_dsl.h" 5 #include "sandbox/linux/bpf_dsl/bpf_dsl.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <pthread.h> 9 #include <pthread.h>
10 #include <sched.h> 10 #include <sched.h>
(...skipping 22 matching lines...) Expand all
33 #include "base/threading/thread.h" 33 #include "base/threading/thread.h"
34 #include "build/build_config.h" 34 #include "build/build_config.h"
35 #include "sandbox/linux/bpf_dsl/policy.h" 35 #include "sandbox/linux/bpf_dsl/policy.h"
36 #include "sandbox/linux/seccomp-bpf/bpf_tests.h" 36 #include "sandbox/linux/seccomp-bpf/bpf_tests.h"
37 #include "sandbox/linux/seccomp-bpf/die.h" 37 #include "sandbox/linux/seccomp-bpf/die.h"
38 #include "sandbox/linux/seccomp-bpf/errorcode.h" 38 #include "sandbox/linux/seccomp-bpf/errorcode.h"
39 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h" 39 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h"
40 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" 40 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h"
41 #include "sandbox/linux/seccomp-bpf/syscall.h" 41 #include "sandbox/linux/seccomp-bpf/syscall.h"
42 #include "sandbox/linux/seccomp-bpf/trap.h" 42 #include "sandbox/linux/seccomp-bpf/trap.h"
43 #include "sandbox/linux/services/broker_process.h"
44 #include "sandbox/linux/services/linux_syscalls.h" 43 #include "sandbox/linux/services/linux_syscalls.h"
44 #include "sandbox/linux/syscall_broker/broker_process.h"
45 #include "sandbox/linux/tests/scoped_temporary_file.h" 45 #include "sandbox/linux/tests/scoped_temporary_file.h"
46 #include "sandbox/linux/tests/unit_tests.h" 46 #include "sandbox/linux/tests/unit_tests.h"
47 #include "testing/gtest/include/gtest/gtest.h" 47 #include "testing/gtest/include/gtest/gtest.h"
48 48
49 // Workaround for Android's prctl.h file. 49 // Workaround for Android's prctl.h file.
50 #ifndef PR_GET_ENDIAN 50 #ifndef PR_GET_ENDIAN
51 #define PR_GET_ENDIAN 19 51 #define PR_GET_ENDIAN 19
52 #endif 52 #endif
53 #ifndef PR_CAPBSET_READ 53 #ifndef PR_CAPBSET_READ
54 #define PR_CAPBSET_READ 23 54 #define PR_CAPBSET_READ 23
(...skipping 2335 matching lines...) Expand 10 before | Expand all | Expand 10 after
2390 BPF_ASSERT_EQ(ENOSYS, errno); 2390 BPF_ASSERT_EQ(ENOSYS, errno);
2391 2391
2392 BPF_ASSERT_EQ(-1, syscall(__NR_setgid, 300)); 2392 BPF_ASSERT_EQ(-1, syscall(__NR_setgid, 300));
2393 BPF_ASSERT_EQ(EPERM, errno); 2393 BPF_ASSERT_EQ(EPERM, errno);
2394 } 2394 }
2395 2395
2396 } // namespace 2396 } // namespace
2397 2397
2398 } // namespace bpf_dsl 2398 } // namespace bpf_dsl
2399 } // namespace sandbox 2399 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/linux/bpf_dsl/DEPS ('k') | sandbox/linux/bpf_dsl/dump_bpf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698