summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@test-ubuntu_x86-1.lan>2019-03-01 17:01:23 -0500
committerPaul Moore <paul@paul-moore.com>2019-03-01 17:04:21 -0500
commit584ca7a5e69d87a4c2c4e4c07ce8415fa59e1351 (patch)
treec74c18da9961104459f4dfb08091e43f6d2dd04c
parent7bbba09c81e1ddf74e863cc14d31ad1dbd747475 (diff)
downloadlibseccomp-584ca7a5e69d87a4c2c4e4c07ce8415fa59e1351.tar.gz
tests: fix a number of problems with the tests on a 32-bit x86 system
Verified on a 32-bit x86 Ubuntu 16.04.6 system. Signed-off-by: Paul Moore <paul@paul-moore.com>
-rw-r--r--tests/06-sim-actions.tests3
-rw-r--r--tests/46-sim-kill_process.c4
-rwxr-xr-xtests/46-sim-kill_process.py1
-rw-r--r--tests/48-sim-32b_args.tests36
4 files changed, 25 insertions, 19 deletions
diff --git a/tests/06-sim-actions.tests b/tests/06-sim-actions.tests
index 40a93ae..0a7bc66 100644
--- a/tests/06-sim-actions.tests
+++ b/tests/06-sim-actions.tests
@@ -15,7 +15,8 @@ test type: bpf-sim
06-sim-actions all stat N N N N N N KILL_PROCESS
06-sim-actions all rt_sigreturn N N N N N N LOG
06-sim-actions x86 0-2 N N N N N N KILL
-06-sim-actions x86 7-172 N N N N N N KILL
+06-sim-actions x86 7-105 N N N N N N KILL
+06-sim-actions x86 107-172 N N N N N N KILL
06-sim-actions x86 174-350 N N N N N N KILL
06-sim-actions x86_64 5-14 N N N N N N KILL
06-sim-actions x86_64 16-350 N N N N N N KILL
diff --git a/tests/46-sim-kill_process.c b/tests/46-sim-kill_process.c
index 7ab0725..961a047 100644
--- a/tests/46-sim-kill_process.c
+++ b/tests/46-sim-kill_process.c
@@ -36,6 +36,10 @@ int main(int argc, char *argv[])
if (rc < 0)
goto out;
+ rc = seccomp_api_set(3);
+ if (rc != 0)
+ return -rc;
+
ctx = seccomp_init(SCMP_ACT_KILL_PROCESS);
if (ctx == NULL)
return ENOMEM;
diff --git a/tests/46-sim-kill_process.py b/tests/46-sim-kill_process.py
index 7b425bb..81b72be 100755
--- a/tests/46-sim-kill_process.py
+++ b/tests/46-sim-kill_process.py
@@ -29,6 +29,7 @@ import util
from seccomp import *
def test(args):
+ set_api(3)
f = SyscallFilter(KILL_PROCESS)
f.remove_arch(Arch())
f.add_arch(Arch("x86_64"))
diff --git a/tests/48-sim-32b_args.tests b/tests/48-sim-32b_args.tests
index b19fe5e..34ae608 100644
--- a/tests/48-sim-32b_args.tests
+++ b/tests/48-sim-32b_args.tests
@@ -8,24 +8,24 @@
test type: bpf-sim
# Testname Arch Syscall Arg0 Arg1 Arg2 Arg3 Arg4 Arg5 Result
-48-sim-32b_args all 1000 0x0 N N N N N KILL
-48-sim-32b_args all 1000 0xffffffff N N N N N KILL
-48-sim-32b_args all 1000 0xffffffffffffffff N N N N N ALLOW
-48-sim-32b_args all 1032 0x0 N N N N N KILL
-48-sim-32b_args all 1032 0xffffffff N N N N N ALLOW
-48-sim-32b_args all 1032 0xffffffffffffffff N N N N N KILL
-48-sim-32b_args all 1064 0x0 N N N N N KILL
-48-sim-32b_args all 1064 0xffffffff N N N N N KILL
-48-sim-32b_args all 1064 0xffffffffffffffff N N N N N ALLOW
-48-sim-32b_args all 2000 0x0 N N N N N KILL
-48-sim-32b_args all 2000 0xffffffff N N N N N KILL
-48-sim-32b_args all 2000 0xffffffffffffffff N N N N N ALLOW
-48-sim-32b_args all 2032 0x0 N N N N N KILL
-48-sim-32b_args all 2032 0xffffffff N N N N N ALLOW
-48-sim-32b_args all 2032 0xffffffffffffffff N N N N N KILL
-48-sim-32b_args all 2064 0x0 N N N N N KILL
-48-sim-32b_args all 2064 0xffffffff N N N N N KILL
-48-sim-32b_args all 2064 0xffffffffffffffff N N N N N ALLOW
+48-sim-32b_args x86_64 1000 0x0 N N N N N KILL
+48-sim-32b_args x86_64 1000 0xffffffff N N N N N KILL
+48-sim-32b_args x86_64 1000 0xffffffffffffffff N N N N N ALLOW
+48-sim-32b_args x86_64 1032 0x0 N N N N N KILL
+48-sim-32b_args x86_64 1032 0xffffffff N N N N N ALLOW
+48-sim-32b_args x86_64 1032 0xffffffffffffffff N N N N N KILL
+48-sim-32b_args x86_64 1064 0x0 N N N N N KILL
+48-sim-32b_args x86_64 1064 0xffffffff N N N N N KILL
+48-sim-32b_args x86_64 1064 0xffffffffffffffff N N N N N ALLOW
+48-sim-32b_args x86_64 2000 0x0 N N N N N KILL
+48-sim-32b_args x86_64 2000 0xffffffff N N N N N KILL
+48-sim-32b_args x86_64 2000 0xffffffffffffffff N N N N N ALLOW
+48-sim-32b_args x86_64 2032 0x0 N N N N N KILL
+48-sim-32b_args x86_64 2032 0xffffffff N N N N N ALLOW
+48-sim-32b_args x86_64 2032 0xffffffffffffffff N N N N N KILL
+48-sim-32b_args x86_64 2064 0x0 N N N N N KILL
+48-sim-32b_args x86_64 2064 0xffffffff N N N N N KILL
+48-sim-32b_args x86_64 2064 0xffffffffffffffff N N N N N ALLOW
test type: bpf-sim-fuzz