diff options
author | netblue30 <netblue30@yahoo.com> | 2016-02-02 09:34:58 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-02-02 09:34:58 -0500 |
commit | 6d1e93c2aea17fa209779e768a57450b06dcfa14 (patch) | |
tree | 0456d1493c8ea1e82ce05b239a62855f230f56dd /test/features/3.8.exp | |
parent | 0.9.38 testing (diff) | |
download | firejail-6d1e93c2aea17fa209779e768a57450b06dcfa14.tar.gz firejail-6d1e93c2aea17fa209779e768a57450b06dcfa14.tar.zst firejail-6d1e93c2aea17fa209779e768a57450b06dcfa14.zip |
0.9.38 testing
Diffstat (limited to 'test/features/3.8.exp')
-rwxr-xr-x | test/features/3.8.exp | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/test/features/3.8.exp b/test/features/3.8.exp new file mode 100755 index 000000000..72953d159 --- /dev/null +++ b/test/features/3.8.exp | |||
@@ -0,0 +1,79 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # | ||
3 | # private-bin | ||
4 | # | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | set overlay [lindex $argv 0] | ||
10 | set chroot [lindex $argv 1] | ||
11 | |||
12 | # | ||
13 | # N | ||
14 | # | ||
15 | send -- "firejail --noprofile --private-bin=bash,cat,cp,ls,wc\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 0\n";exit} | ||
18 | "Child process initialized" | ||
19 | } | ||
20 | sleep 1 | ||
21 | |||
22 | send -- "ls -l /bin | wc -l\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
25 | "6" | ||
26 | } | ||
27 | |||
28 | |||
29 | after 100 | ||
30 | send -- "exit\r" | ||
31 | sleep 1 | ||
32 | |||
33 | # | ||
34 | # O | ||
35 | # | ||
36 | if { $overlay == "overlay" } { | ||
37 | send -- "firejail --noprofile --overlay --private-bin=bash,cat,cp,ls,wc\r" | ||
38 | expect { | ||
39 | timeout {puts "TESTING ERROR 2\n";exit} | ||
40 | "Child process initialized" | ||
41 | } | ||
42 | sleep 1 | ||
43 | |||
44 | send -- "ls -l /bin | wc -l\r" | ||
45 | expect { | ||
46 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
47 | "6" | ||
48 | } | ||
49 | |||
50 | |||
51 | after 100 | ||
52 | send -- "exit\r" | ||
53 | sleep 1 | ||
54 | } | ||
55 | |||
56 | # | ||
57 | # C | ||
58 | # | ||
59 | if { $chroot == "chroot" } { | ||
60 | send -- "firejail --noprofile --chroot=/tmp/chroot --private-bin=bash,cat,cp,ls,wc\r" | ||
61 | expect { | ||
62 | timeout {puts "TESTING ERROR 4\n";exit} | ||
63 | "Child process initialized" | ||
64 | } | ||
65 | sleep 1 | ||
66 | |||
67 | send -- "ls -l /bin | wc -l\r" | ||
68 | expect { | ||
69 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
70 | "6" | ||
71 | } | ||
72 | |||
73 | after 100 | ||
74 | send -- "exit\r" | ||
75 | sleep 1 | ||
76 | } | ||
77 | |||
78 | |||
79 | puts "\nall done\n" | ||