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.7.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.7.exp')
-rwxr-xr-x | test/features/3.7.exp | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/test/features/3.7.exp b/test/features/3.7.exp new file mode 100755 index 000000000..d8236b851 --- /dev/null +++ b/test/features/3.7.exp | |||
@@ -0,0 +1,91 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # | ||
3 | # private-tmp | ||
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 -- "touch /tmp/test1\r" | ||
16 | sleep 1 | ||
17 | send -- "touch /tmp/test2\r" | ||
18 | sleep 1 | ||
19 | send -- "firejail --noprofile --private-tmp\r" | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 0\n";exit} | ||
22 | "Child process initialized" | ||
23 | } | ||
24 | sleep 1 | ||
25 | |||
26 | send -- "ls -al /tmp | wc -l\r" | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
29 | "3" | ||
30 | } | ||
31 | |||
32 | |||
33 | after 100 | ||
34 | send -- "exit\r" | ||
35 | sleep 1 | ||
36 | |||
37 | # | ||
38 | # O | ||
39 | # | ||
40 | if { $overlay == "overlay" } { | ||
41 | send -- "touch /tmp/test1\r" | ||
42 | sleep 1 | ||
43 | send -- "touch /tmp/test2\r" | ||
44 | sleep 1 | ||
45 | send -- "firejail --noprofile --overlay --private-tmp\r" | ||
46 | expect { | ||
47 | timeout {puts "TESTING ERROR 2\n";exit} | ||
48 | "Child process initialized" | ||
49 | } | ||
50 | sleep 1 | ||
51 | |||
52 | send -- "ls -al /tmp | wc -l\r" | ||
53 | expect { | ||
54 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
55 | "3" | ||
56 | } | ||
57 | |||
58 | |||
59 | after 100 | ||
60 | send -- "exit\r" | ||
61 | sleep 1 | ||
62 | } | ||
63 | |||
64 | # | ||
65 | # C | ||
66 | # | ||
67 | if { $chroot == "chroot" } { | ||
68 | send -- "touch /tmp/test1\r" | ||
69 | sleep 1 | ||
70 | send -- "touch /tmp/test2\r" | ||
71 | sleep 1 | ||
72 | send -- "firejail --noprofile --chroot=/tmp/chroot --private-tmp\r" | ||
73 | expect { | ||
74 | timeout {puts "TESTING ERROR 4\n";exit} | ||
75 | "Child process initialized" | ||
76 | } | ||
77 | sleep 1 | ||
78 | |||
79 | send -- "ls -al /tmp | wc -l\r" | ||
80 | expect { | ||
81 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
82 | "3" | ||
83 | } | ||
84 | |||
85 | after 100 | ||
86 | send -- "exit\r" | ||
87 | sleep 1 | ||
88 | } | ||
89 | |||
90 | |||
91 | puts "\nall done\n" | ||