summaryrefslogtreecommitdiffstats
path: root/test/seccomp-errno.exp
diff options
context:
space:
mode:
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"