Clean up syscall stub/seccomp filter generation.
Test: treehugger
Change-Id: Iceb1c22d82b4d402166c3712b5b8b48a30937c6d
diff --git a/libc/tools/test_genseccomp.py b/libc/tools/test_genseccomp.py
index 71a78d1..0c2699a 100755
--- a/libc/tools/test_genseccomp.py
+++ b/libc/tools/test_genseccomp.py
@@ -25,8 +25,8 @@
def test_get_names(self):
bionic = cStringIO.StringIO(textwrap.dedent("""\
-int __llseek:_llseek(int, unsigned long, unsigned long, off64_t*, int) arm,mips,x86
-int fchown:fchown(int, uid_t, gid_t) arm64,mips,mips64,x86_64
+int __llseek:_llseek(int, unsigned long, unsigned long, off64_t*, int) arm,x86
+int fchown:fchown(int, uid_t, gid_t) arm64,x86_64
"""))
whitelist = cStringIO.StringIO(textwrap.dedent("""\
@@ -54,7 +54,7 @@
# Blacklist item must be in bionic
blacklist = cStringIO.StringIO(textwrap.dedent("""\
-int fchown2:fchown2(int, uid_t, gid_t) arm64,mips,mips64,x86_64
+int fchown2:fchown2(int, uid_t, gid_t) arm64,x86_64
"""))
with self.assertRaises(RuntimeError):
genseccomp.get_names([bionic, whitelist, blacklist], "arm")
@@ -64,7 +64,7 @@
# Test blacklist item is removed
blacklist = cStringIO.StringIO(textwrap.dedent("""\
-int fchown:fchown(int, uid_t, gid_t) arm64,mips,mips64,x86_64
+int fchown:fchown(int, uid_t, gid_t) arm64,x86_64
"""))
names = genseccomp.get_names([bionic, whitelist, blacklist], "arm64")
bionic.seek(0)
@@ -75,7 +75,7 @@
# Blacklist item must not be in whitelist
whitelist = cStringIO.StringIO(textwrap.dedent("""\
-int fchown:fchown(int, uid_t, gid_t) arm64,mips,mips64,x86_64
+int fchown:fchown(int, uid_t, gid_t) arm64,x86_64
"""))
with self.assertRaises(RuntimeError):
genseccomp.get_names([empty, whitelist, blacklist], "arm")
@@ -85,7 +85,7 @@
# No dups in bionic and whitelist
whitelist = cStringIO.StringIO(textwrap.dedent("""\
-int __llseek:_llseek(int, unsigned long, unsigned long, off64_t*, int) arm,mips,x86
+int __llseek:_llseek(int, unsigned long, unsigned long, off64_t*, int) arm,x86
"""))
with self.assertRaises(RuntimeError):
genseccomp.get_names([bionic, whitelist, empty], "arm")
@@ -119,16 +119,6 @@
self.get_switches("x86_64")),
[("openat", 257)])
- self.assertEquals(genseccomp.convert_names_to_NRs(["openat"],
- self.get_headers("mips"),
- self.get_switches("mips")),
- [("openat", 4288)])
-
- self.assertEquals(genseccomp.convert_names_to_NRs(["openat"],
- self.get_headers("mips64"),
- self.get_switches("mips64")),
- [("openat", 5247)])
-
def test_convert_NRs_to_ranges(self):
ranges = genseccomp.convert_NRs_to_ranges([("b", 2), ("a", 1)])
@@ -192,8 +182,8 @@
def test_construct_bpf(self):
syscalls = cStringIO.StringIO(textwrap.dedent("""\
- int __llseek:_llseek(int, unsigned long, unsigned long, off64_t*, int) arm,mips,x86
- int fchown:fchown(int, uid_t, gid_t) arm64,mips,mips64,x86_64
+ int __llseek:_llseek(int, unsigned long, unsigned long, off64_t*, int) arm,x86
+ int fchown:fchown(int, uid_t, gid_t) arm64,x86_64
"""))
whitelist = cStringIO.StringIO(textwrap.dedent("""\