aboutsummaryrefslogtreecommitdiffstats
path: root/test/stress/blacklist.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2017-03-29 12:09:26 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2017-03-29 12:09:26 -0400
commitb2b603eac941d2cdea97d7886dc7181c179a8160 (patch)
treeafb0c44459b96f331e07772959bd7e983a082a05 /test/stress/blacklist.exp
parentmerges (diff)
downloadfirejail-b2b603eac941d2cdea97d7886dc7181c179a8160.tar.gz
firejail-b2b603eac941d2cdea97d7886dc7181c179a8160.tar.zst
firejail-b2b603eac941d2cdea97d7886dc7181c179a8160.zip
testing
Diffstat (limited to 'test/stress/blacklist.exp')
-rwxr-xr-xtest/stress/blacklist.exp60
1 files changed, 60 insertions, 0 deletions
diff --git a/test/stress/blacklist.exp b/test/stress/blacklist.exp
new file mode 100755
index 000000000..33e2c262e
--- /dev/null
+++ b/test/stress/blacklist.exp
@@ -0,0 +1,60 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2017 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10set MAXi 100
11
12# blacklist testing
13set i 1
14send -- "firejail --profile=blacklist.profile\r"
15expect {
16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized"
18}
19
20while { $i <= $MAXi } {
21 send -- "cat ~/fj-stress-test/testfile$i\r"
22 expect {
23 timeout {puts "TESTING ERROR 1\n";exit}
24 "denied"
25 }
26 incr i
27 after 100
28}
29after 100
30
31send -- "exit\r"
32sleep 1
33
34# noblacklist testing
35set i 1
36send -- "firejail --profile=noblacklist.profile\r"
37expect {
38 timeout {puts "TESTING ERROR 1\n";exit}
39 "Child process initialized"
40}
41
42while { $i <= $MAXi } {
43 send -- "cat ~/fj-stress-test/testfile$i\r"
44 expect {
45 timeout {puts "TESTING ERROR 1\n";exit}
46 "hello"
47 }
48 incr i
49 after 100
50}
51after 100
52
53send -- "exit\r"
54sleep 1
55
56
57
58after 100
59puts "\nall done\n"
60