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