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

Side by Side Diff: sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc

Issue 25849004: Clean up unused constant globals (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chrome/app/breakpad_linux.cc Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/server_log_entry.cc ('k') | tools/gn/command_gyp.cc » ('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 <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>
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 args[3], args[4], args[5]) == -err); 1103 args[3], args[4], args[5]) == -err);
1104 } 1104 }
1105 1105
1106 // Vector of ArgValue trees. These trees define all the possible boolean 1106 // Vector of ArgValue trees. These trees define all the possible boolean
1107 // expressions that we want to turn into a BPF filter program. 1107 // expressions that we want to turn into a BPF filter program.
1108 std::vector<ArgValue *> arg_values_; 1108 std::vector<ArgValue *> arg_values_;
1109 1109
1110 // Don't increase these values. We are pushing the limits of the maximum 1110 // Don't increase these values. We are pushing the limits of the maximum
1111 // BPF program that the kernel will allow us to load. If the values are 1111 // BPF program that the kernel will allow us to load. If the values are
1112 // increased too much, the test will start failing. 1112 // increased too much, the test will start failing.
1113 static const int kNumIterations = 3;
1114 static const int kNumTestCases = 40; 1113 static const int kNumTestCases = 40;
1115 static const int kMaxFanOut = 3; 1114 static const int kMaxFanOut = 3;
1116 static const int kMaxArgs = 6; 1115 static const int kMaxArgs = 6;
1117 }; 1116 };
1118 1117
1119 ErrorCode EqualityStressTestPolicy(Sandbox *sandbox, int sysno, void *aux) { 1118 ErrorCode EqualityStressTestPolicy(Sandbox *sandbox, int sysno, void *aux) {
1120 return reinterpret_cast<EqualityStressTest *>(aux)->Policy(sandbox, sysno); 1119 return reinterpret_cast<EqualityStressTest *>(aux)->Policy(sandbox, sysno);
1121 } 1120 }
1122 1121
1123 BPF_TEST(SandboxBpf, EqualityTests, EqualityStressTestPolicy, 1122 BPF_TEST(SandboxBpf, EqualityTests, EqualityStressTestPolicy,
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1729 1728
1730 BPF_TEST(SandboxBpf, PthreadEquality, PthreadPolicyEquality) { 1729 BPF_TEST(SandboxBpf, PthreadEquality, PthreadPolicyEquality) {
1731 PthreadTest(); 1730 PthreadTest();
1732 } 1731 }
1733 1732
1734 BPF_TEST(SandboxBpf, PthreadBitMask, PthreadPolicyBitMask) { 1733 BPF_TEST(SandboxBpf, PthreadBitMask, PthreadPolicyBitMask) {
1735 PthreadTest(); 1734 PthreadTest();
1736 } 1735 }
1737 1736
1738 } // namespace 1737 } // namespace
OLDNEW
« no previous file with comments | « remoting/host/server_log_entry.cc ('k') | tools/gn/command_gyp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698