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

Unified Diff: sandbox/linux/bpf_dsl/syscall_set_unittest.cc

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/linux/bpf_dsl/syscall_set.cc ('k') | sandbox/linux/sandbox_linux.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/bpf_dsl/syscall_set_unittest.cc
diff --git a/sandbox/linux/seccomp-bpf/syscall_iterator_unittest.cc b/sandbox/linux/bpf_dsl/syscall_set_unittest.cc
similarity index 88%
rename from sandbox/linux/seccomp-bpf/syscall_iterator_unittest.cc
rename to sandbox/linux/bpf_dsl/syscall_set_unittest.cc
index 3bc1eaa5b75a6551f3468ba51eeb2d0558820081..5730dc4584521aaa20c335bbe53b8396ebdbdd80 100644
--- a/sandbox/linux/seccomp-bpf/syscall_iterator_unittest.cc
+++ b/sandbox/linux/bpf_dsl/syscall_set_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "sandbox/linux/seccomp-bpf/syscall_iterator.h"
+#include "sandbox/linux/bpf_dsl/syscall_set.h"
#include <stdint.h>
@@ -18,7 +18,7 @@ const SyscallSet kSyscallSets[] = {
SyscallSet::InvalidOnly(),
};
-SANDBOX_TEST(SyscallIterator, Monotonous) {
+SANDBOX_TEST(SyscallSet, Monotonous) {
for (const SyscallSet& set : kSyscallSets) {
uint32_t prev = 0;
bool have_prev = false;
@@ -54,7 +54,7 @@ void AssertRange(uint32_t min, uint32_t max) {
SANDBOX_ASSERT(prev == max);
}
-SANDBOX_TEST(SyscallIterator, ValidSyscallRanges) {
+SANDBOX_TEST(SyscallSet, ValidSyscallRanges) {
AssertRange(MIN_SYSCALL, MAX_PUBLIC_SYSCALL);
#if defined(__arm__)
AssertRange(MIN_PRIVATE_SYSCALL, MAX_PRIVATE_SYSCALL);
@@ -62,7 +62,7 @@ SANDBOX_TEST(SyscallIterator, ValidSyscallRanges) {
#endif
}
-SANDBOX_TEST(SyscallIterator, InvalidSyscalls) {
+SANDBOX_TEST(SyscallSet, InvalidSyscalls) {
static const uint32_t kExpected[] = {
#if defined(__mips__)
0,
@@ -93,19 +93,19 @@ SANDBOX_TEST(SyscallIterator, InvalidSyscalls) {
}
}
-SANDBOX_TEST(SyscallIterator, ValidOnlyIsOnlyValid) {
+SANDBOX_TEST(SyscallSet, ValidOnlyIsOnlyValid) {
for (uint32_t sysnum : SyscallSet::ValidOnly()) {
SANDBOX_ASSERT(SyscallSet::IsValid(sysnum));
}
}
-SANDBOX_TEST(SyscallIterator, InvalidOnlyIsOnlyInvalid) {
+SANDBOX_TEST(SyscallSet, InvalidOnlyIsOnlyInvalid) {
for (uint32_t sysnum : SyscallSet::InvalidOnly()) {
SANDBOX_ASSERT(!SyscallSet::IsValid(sysnum));
}
}
-SANDBOX_TEST(SyscallIterator, AllIsValidOnlyPlusInvalidOnly) {
+SANDBOX_TEST(SyscallSet, AllIsValidOnlyPlusInvalidOnly) {
std::vector<uint32_t> merged;
const SyscallSet valid_only = SyscallSet::ValidOnly();
const SyscallSet invalid_only = SyscallSet::InvalidOnly();
« no previous file with comments | « sandbox/linux/bpf_dsl/syscall_set.cc ('k') | sandbox/linux/sandbox_linux.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698