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

Unified Diff: sandbox/linux/seccomp-bpf/bpf_tests.h

Issue 196793023: Add seccomp sandbox for non-SFI NaCl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
Index: sandbox/linux/seccomp-bpf/bpf_tests.h
diff --git a/sandbox/linux/seccomp-bpf/bpf_tests.h b/sandbox/linux/seccomp-bpf/bpf_tests.h
index cc3fc252fbfd70d3d3764434108817a22349d1f1..478808b97ffa0696eac9d8fb7841513dcb7e90c1 100644
--- a/sandbox/linux/seccomp-bpf/bpf_tests.h
+++ b/sandbox/linux/seccomp-bpf/bpf_tests.h
@@ -44,6 +44,12 @@ namespace sandbox {
// Assertions are handled exactly the same as with a normal SANDBOX_TEST()
#define BPF_ASSERT SANDBOX_ASSERT
+#define BPF_ASSERT_EQ(x, y) BPF_ASSERT(x == y)
jln (very slow on Chromium) 2014/04/11 20:19:47 Don't forget parentheses around (x) and (y)
hamaji 2014/04/15 15:09:25 Done.
+#define BPF_ASSERT_NE(x, y) BPF_ASSERT(x != y)
+#define BPF_ASSERT_LT(x, y) BPF_ASSERT(x < y)
+#define BPF_ASSERT_GT(x, y) BPF_ASSERT(x > y)
+#define BPF_ASSERT_LE(x, y) BPF_ASSERT(x <= y)
+#define BPF_ASSERT_GE(x, y) BPF_ASSERT(x >= y)
// The "Aux" type is optional. We use an "empty" type by default, so that if
// the caller doesn't provide any type, all the BPF_AUX related data compiles

Powered by Google App Engine
This is Rietveld 408576698