diff options
Diffstat (limited to 'test/features/1.7.exp')
-rwxr-xr-x | test/features/1.7.exp | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/test/features/1.7.exp b/test/features/1.7.exp new file mode 100755 index 000000000..0de3e224d --- /dev/null +++ b/test/features/1.7.exp | |||
@@ -0,0 +1,71 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # | ||
3 | # new /var/tmp | ||
4 | # | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | # | ||
11 | # N | ||
12 | # | ||
13 | send -- "touch /var/tmp/somefile\r" | ||
14 | sleep 1 | ||
15 | send -- "firejail --noprofile\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 0\n";exit} | ||
18 | "Child process initialized" | ||
19 | } | ||
20 | sleep 1 | ||
21 | |||
22 | send -- "ls -l /var/tmp/somefile | wc -l\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 1\n";exit} | ||
25 | "0" | ||
26 | } | ||
27 | after 100 | ||
28 | send -- "exit\r" | ||
29 | sleep 1 | ||
30 | |||
31 | |||
32 | # | ||
33 | # O | ||
34 | # | ||
35 | send -- "firejail --noprofile --overlay\r" | ||
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 2\n";exit} | ||
38 | "Child process initialized" | ||
39 | } | ||
40 | sleep 1 | ||
41 | |||
42 | send -- "ls -l /var/tmp/somefile | wc -l\r" | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 3\n";exit} | ||
45 | "0" | ||
46 | } | ||
47 | after 100 | ||
48 | send -- "exit\r" | ||
49 | sleep 1 | ||
50 | |||
51 | # | ||
52 | # C | ||
53 | # | ||
54 | send -- "firejail --noprofile --chroot=/tmp/chroot\r" | ||
55 | expect { | ||
56 | timeout {puts "TESTING ERROR 3\n";exit} | ||
57 | "Child process initialized" | ||
58 | } | ||
59 | sleep 1 | ||
60 | |||
61 | send -- "ls -l /var/tmp/somefile | wc -l\r" | ||
62 | expect { | ||
63 | timeout {puts "TESTING ERROR 4\n";exit} | ||
64 | "0" | ||
65 | } | ||
66 | after 100 | ||
67 | send -- "exit\r" | ||
68 | sleep 1 | ||
69 | |||
70 | |||
71 | puts "\nall done\n" | ||