aboutsummaryrefslogtreecommitdiffstats
path: root/test/profiles/ignore.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-04-23 08:53:07 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-04-23 08:53:07 -0400
commit2905b9f9ab5c5ed6f9210d1d843a8bcf41451854 (patch)
treed3bb968dbcb9f22856de345d0df5ecf2a44d594f /test/profiles/ignore.exp
parentquiterss profile (diff)
downloadfirejail-2905b9f9ab5c5ed6f9210d1d843a8bcf41451854.tar.gz
firejail-2905b9f9ab5c5ed6f9210d1d843a8bcf41451854.tar.zst
firejail-2905b9f9ab5c5ed6f9210d1d843a8bcf41451854.zip
make test-utils
Diffstat (limited to 'test/profiles/ignore.exp')
-rwxr-xr-xtest/profiles/ignore.exp50
1 files changed, 50 insertions, 0 deletions
diff --git a/test/profiles/ignore.exp b/test/profiles/ignore.exp
new file mode 100755
index 000000000..281697b26
--- /dev/null
+++ b/test/profiles/ignore.exp
@@ -0,0 +1,50 @@
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 -- "firejail --profile=ignore.profile --ignore=seccomp \r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Error: please use --profile after --ignore"
14}
15
16send -- "firejail --debug --ignore=seccomp\r"
17expect {
18 timeout {puts "TESTING ERROR 1\n";exit}
19 BLACKLIST {puts "TESTING ERROR 2\n";exit}
20 "Child process initialized"
21}
22sleep 1
23send -- "exit\r"
24sleep 1
25
26send -- "firejail --ignore=seccomp --ignore=shell --profile=ignore.profile \r"
27expect {
28 timeout {puts "TESTING ERROR 3\n";exit}
29 "Child process initialized"
30}
31sleep 1
32
33send -- "ps aux | wc -l\r"
34expect {
35 timeout {puts "TESTING ERROR 4\n";exit}
36 "5"
37}
38sleep 1
39send -- "exit\r"
40sleep 1
41
42send -- "firejail --debug --profile=ignore2.profile\r"
43expect {
44 timeout {puts "TESTING ERROR 5\n";exit}
45 BLACKLIST {puts "TESTING ERROR 6\n";exit}
46 "Child process initialized"
47}
48
49
50puts "\nall done\n"