aboutsummaryrefslogtreecommitdiffstats
path: root/test/filters/seccomp-umount.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/filters/seccomp-umount.exp')
-rwxr-xr-xtest/filters/seccomp-umount.exp31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/filters/seccomp-umount.exp b/test/filters/seccomp-umount.exp
new file mode 100755
index 000000000..6e2f8c6c2
--- /dev/null
+++ b/test/filters/seccomp-umount.exp
@@ -0,0 +1,31 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "sudo ls; sudo whoami; sudo pwd\r"
11expect {
12 timeout {puts "TESTING ERROR: you need to root run this test as root\n";exit}
13 "root"
14}
15
16send -- "firejail --net=br0 --ip=10.10.20.5 --seccomp --noprofile\r"
17expect {
18 timeout {puts "TESTING ERROR 0\n";exit}
19 "Child process initialized"
20}
21sleep 2
22
23send -- "umount /proc\r"
24expect {
25 timeout {puts "TESTING ERROR 1\n";exit}
26 "Bad system call"
27}
28
29send -- "exit\r"
30sleep 1
31puts "\n"