aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2018-04-12 22:23:23 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2018-04-12 22:23:23 -0400
commitd5b3b13b66f0188fdf61a2fb2dd0d36ac665ab57 (patch)
tree62f5a4f0835021d1b77c9e321ca6cde471ccd307 /test
parentMerge branch 'master' of http://github.com/netblue30/firejail (diff)
downloadfirejail-d5b3b13b66f0188fdf61a2fb2dd0d36ac665ab57.tar.gz
firejail-d5b3b13b66f0188fdf61a2fb2dd0d36ac665ab57.tar.zst
firejail-d5b3b13b66f0188fdf61a2fb2dd0d36ac665ab57.zip
seccomp postexec testing
Diffstat (limited to 'test')
-rwxr-xr-xtest/filters/filters.sh3
-rwxr-xr-xtest/filters/seccomp-postexec.exp33
2 files changed, 36 insertions, 0 deletions
diff --git a/test/filters/filters.sh b/test/filters/filters.sh
index 12f13606b..97ecc8be0 100755
--- a/test/filters/filters.sh
+++ b/test/filters/filters.sh
@@ -31,6 +31,9 @@ echo "TESTING: debug options (test/filters/debug.exp)"
31echo "TESTING: seccomp run files (test/filters/seccomp-run-files.exp)" 31echo "TESTING: seccomp run files (test/filters/seccomp-run-files.exp)"
32./seccomp-run-files.exp 32./seccomp-run-files.exp
33 33
34echo "TESTING: seccomp postexec (test/filters/seccomp-postexec.exp)"
35./seccomp-postexec.exp
36
34echo "TESTING: noroot (test/filters/noroot.exp)" 37echo "TESTING: noroot (test/filters/noroot.exp)"
35./noroot.exp 38./noroot.exp
36 39
diff --git a/test/filters/seccomp-postexec.exp b/test/filters/seccomp-postexec.exp
new file mode 100755
index 000000000..4302aec5e
--- /dev/null
+++ b/test/filters/seccomp-postexec.exp
@@ -0,0 +1,33 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2018 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --debug --seccomp=execve\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "configuring postexec seccomp filter in"
14}
15expect {
16 timeout {puts "TESTING ERROR 1\n";exit}
17 "data.architecture"
18}
19expect {
20 timeout {puts "TESTING ERROR 2\n";exit}
21 "monitoring pid"
22}
23expect {
24 timeout {puts "TESTING ERROR 3\n";exit}
25 "Sandbox monitor: waitpid"
26}
27expect {
28 timeout {puts "TESTING ERROR 4\n";exit}
29 "Parent is shutting down"
30}
31sleep 1
32
33puts "all done\n"