diff options
author | netblue30 <netblue30@yahoo.com> | 2015-11-22 13:15:13 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2015-11-22 13:15:13 -0500 |
commit | a8d758ba9e7314de9208e4b7d4a5307d1b4fefd0 (patch) | |
tree | 4002cad80b79157ef2c300ca8f12625a5b0b8b17 /test/features/1.8.exp | |
parent | fixes (diff) | |
download | firejail-a8d758ba9e7314de9208e4b7d4a5307d1b4fefd0.tar.gz firejail-a8d758ba9e7314de9208e4b7d4a5307d1b4fefd0.tar.zst firejail-a8d758ba9e7314de9208e4b7d4a5307d1b4fefd0.zip |
feature test
Diffstat (limited to 'test/features/1.8.exp')
-rwxr-xr-x | test/features/1.8.exp | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/test/features/1.8.exp b/test/features/1.8.exp new file mode 100755 index 000000000..514dd3b81 --- /dev/null +++ b/test/features/1.8.exp | |||
@@ -0,0 +1,71 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # | ||
3 | # disable /etc/firejail and ~/.config/firejail | ||
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" | ||