aboutsummaryrefslogtreecommitdiffstats
path: root/test/seccomp-errno.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-09-26 09:54:55 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2015-09-26 09:54:55 -0400
commit444207531c1280803dca864fad5c7208fade90d7 (patch)
treed434ecafcefc2f7fc17a637c792e2ee98055389e /test/seccomp-errno.exp
parent./configure --enable-fatal-warnings (diff)
downloadfirejail-444207531c1280803dca864fad5c7208fade90d7.tar.gz
firejail-444207531c1280803dca864fad5c7208fade90d7.tar.zst
firejail-444207531c1280803dca864fad5c7208fade90d7.zip
seccomp testing
Diffstat (limited to 'test/seccomp-errno.exp')
-rwxr-xr-xtest/seccomp-errno.exp28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/seccomp-errno.exp b/test/seccomp-errno.exp
new file mode 100755
index 000000000..e69b89c7a
--- /dev/null
+++ b/test/seccomp-errno.exp
@@ -0,0 +1,28 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "touch seccomp-test-file\r"
8sleep 1
9
10send -- "firejail --seccomp.enoent=unlinkat rm seccomp-test-file\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "No such file or directory"
14}
15
16sleep 1
17
18send -- "firejail --seccomp.enoent=unlinkat --debug rm seccomp-test-file\r"
19expect {
20 timeout {puts "TESTING ERROR 0\n";exit}
21 "ERRNO 263 unlinkat 2 ENOENT"
22}
23
24sleep 1
25
26send -- "rm seccomp-test-file\r"
27sleep 1
28puts "all done\n"