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