summaryrefslogtreecommitdiff
path: root/tests/23-sim-arch_all_le_basic.py
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2014-04-25 16:44:14 -0400
committerPaul Moore <pmoore@redhat.com>2014-04-25 16:44:14 -0400
commit770b11d4d329194d98ab4fe4660fa41c5a08cc8d (patch)
tree9090e4207094b4893c2bb2dc3cae8da16a7cb97b /tests/23-sim-arch_all_le_basic.py
parentc23be79b7f2fe69e684b3f362ae911aa19e5d1a6 (diff)
downloadlibseccomp-770b11d4d329194d98ab4fe4660fa41c5a08cc8d.tar.gz
tests: remove assumptions about the native architecture
A number of the tests made assumptions about the native architecture which would cause problems when there was a byte-ordering mis-match between the native system and the architectures used in the test. Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'tests/23-sim-arch_all_le_basic.py')
-rwxr-xr-xtests/23-sim-arch_all_le_basic.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/23-sim-arch_all_le_basic.py b/tests/23-sim-arch_all_le_basic.py
index eb3f478..a126e7e 100755
--- a/tests/23-sim-arch_all_le_basic.py
+++ b/tests/23-sim-arch_all_le_basic.py
@@ -30,16 +30,12 @@ from seccomp import *
def test(args):
f = SyscallFilter(KILL)
- if not f.exist_arch(Arch.X86):
- f.add_arch(Arch.X86)
- if not f.exist_arch(Arch.X86_64):
- f.add_arch(Arch.X86_64)
- if not f.exist_arch(Arch.X32):
- f.add_arch(Arch.X32)
- if not f.exist_arch(Arch.ARM):
- f.add_arch(Arch.ARM)
- if not f.exist_arch(Arch.MIPSEL):
- f.add_arch(Arch.MIPSEL)
+ f.remove_arch(Arch.NATIVE)
+ f.add_arch(Arch.X86)
+ f.add_arch(Arch.X86_64)
+ f.add_arch(Arch.X32)
+ f.add_arch(Arch.ARM)
+ f.add_arch(Arch.MIPSEL)
f.add_rule(ALLOW, "read", Arg(0, EQ, sys.stdin.fileno()))
f.add_rule(ALLOW, "write", Arg(0, EQ, sys.stdout.fileno()))
f.add_rule(ALLOW, "write", Arg(0, EQ, sys.stderr.fileno()))