diff options
author | netblue30 <netblue30@yahoo.com> | 2016-02-02 08:44:40 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-02-02 08:44:40 -0500 |
commit | e7486b39795847043cd16c55a1c8142770c77de8 (patch) | |
tree | d0f11ceffdbfde9c792ab856016d4219acfc21b2 /test/features/3.1.exp | |
parent | 0.9.38 testing (diff) | |
download | firejail-e7486b39795847043cd16c55a1c8142770c77de8.tar.gz firejail-e7486b39795847043cd16c55a1c8142770c77de8.tar.zst firejail-e7486b39795847043cd16c55a1c8142770c77de8.zip |
0.9.38 testing
Diffstat (limited to 'test/features/3.1.exp')
-rwxr-xr-x | test/features/3.1.exp | 117 |
1 files changed, 101 insertions, 16 deletions
diff --git a/test/features/3.1.exp b/test/features/3.1.exp index bcac4bf04..52a929651 100755 --- a/test/features/3.1.exp +++ b/test/features/3.1.exp | |||
@@ -12,20 +12,49 @@ set chroot [lindex $argv 1] | |||
12 | # | 12 | # |
13 | # N | 13 | # N |
14 | # | 14 | # |
15 | send -- "touch ~/.config/firejail-test-file\r" | 15 | send -- "firejail --noprofile --private\r" |
16 | sleep 1 | ||
17 | send -- "firejail --noprofile --tmpfs=/home/netblue/.config\r" | ||
18 | expect { | 16 | expect { |
19 | timeout {puts "TESTING ERROR 0\n";exit} | 17 | timeout {puts "TESTING ERROR 0\n";exit} |
20 | "Child process initialized" | 18 | "Child process initialized" |
21 | } | 19 | } |
22 | sleep 1 | 20 | sleep 1 |
23 | 21 | ||
24 | send -- "ls ~/.config | wc -l\r" | 22 | send -- "ls -al | wc -l\r" |
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
25 | "5" | ||
26 | } | ||
27 | |||
28 | send -- "ls -al .bashrc\r" | ||
29 | expect { | ||
30 | timeout {puts "TESTING ERROR 1.2\n";exit} | ||
31 | "netblue" | ||
32 | } | ||
33 | expect { | ||
34 | timeout {puts "TESTING ERROR 1.3\n";exit} | ||
35 | "netblue" | ||
36 | } | ||
37 | expect { | ||
38 | timeout {puts "TESTING ERROR 1.4\n";exit} | ||
39 | ".bashrc" | ||
40 | } | ||
41 | |||
42 | send -- "ls -al .Xauthority\r" | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 1.5\n";exit} | ||
45 | "netblue" | ||
46 | } | ||
25 | expect { | 47 | expect { |
26 | timeout {puts "TESTING ERROR 1\n";exit} | 48 | timeout {puts "TESTING ERROR 1.6\n";exit} |
27 | "0" | 49 | "netblue" |
28 | } | 50 | } |
51 | expect { | ||
52 | timeout {puts "TESTING ERROR 1.7\n";exit} | ||
53 | ".Xauthority" | ||
54 | } | ||
55 | |||
56 | |||
57 | |||
29 | after 100 | 58 | after 100 |
30 | send -- "exit\r" | 59 | send -- "exit\r" |
31 | sleep 1 | 60 | sleep 1 |
@@ -34,18 +63,47 @@ sleep 1 | |||
34 | # O | 63 | # O |
35 | # | 64 | # |
36 | if { $overlay == "overlay" } { | 65 | if { $overlay == "overlay" } { |
37 | send -- "firejail --noprofile --overlay --tmpfs=/home/netblue/.config\r" | 66 | send -- "firejail --noprofile --overlay --private\r" |
38 | expect { | 67 | expect { |
39 | timeout {puts "TESTING ERROR 2\n";exit} | 68 | timeout {puts "TESTING ERROR 2\n";exit} |
40 | "Child process initialized" | 69 | "Child process initialized" |
41 | } | 70 | } |
42 | sleep 1 | 71 | sleep 1 |
43 | 72 | ||
44 | send -- "ls ~/.config | wc -l\r" | 73 | send -- "ls -al | wc -l\r" |
74 | expect { | ||
75 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
76 | "5" | ||
77 | } | ||
78 | |||
79 | send -- "ls -al .bashrc\r" | ||
80 | expect { | ||
81 | timeout {puts "TESTING ERROR 3.2\n";exit} | ||
82 | "netblue" | ||
83 | } | ||
84 | expect { | ||
85 | timeout {puts "TESTING ERROR 3.3\n";exit} | ||
86 | "netblue" | ||
87 | } | ||
45 | expect { | 88 | expect { |
46 | timeout {puts "TESTING ERROR 3\n";exit} | 89 | timeout {puts "TESTING ERROR 3.4\n";exit} |
47 | "0" | 90 | ".bashrc" |
48 | } | 91 | } |
92 | |||
93 | send -- "ls -al .Xauthority\r" | ||
94 | expect { | ||
95 | timeout {puts "TESTING ERROR 3.5\n";exit} | ||
96 | "netblue" | ||
97 | } | ||
98 | expect { | ||
99 | timeout {puts "TESTING ERROR 3.6\n";exit} | ||
100 | "netblue" | ||
101 | } | ||
102 | expect { | ||
103 | timeout {puts "TESTING ERROR 3.7\n";exit} | ||
104 | ".Xauthority" | ||
105 | } | ||
106 | |||
49 | after 100 | 107 | after 100 |
50 | send -- "exit\r" | 108 | send -- "exit\r" |
51 | sleep 1 | 109 | sleep 1 |
@@ -55,20 +113,47 @@ if { $overlay == "overlay" } { | |||
55 | # C | 113 | # C |
56 | # | 114 | # |
57 | if { $chroot == "chroot" } { | 115 | if { $chroot == "chroot" } { |
58 | send -- "touch /tmp/chroot/home/netblue/.config/firejail-test-file\r" | 116 | send -- "firejail --noprofile --chroot=/tmp/chroot --private\r" |
59 | sleep 1 | ||
60 | send -- "firejail --noprofile --chroot=/tmp/chroot --tmpfs=/home/netblue/.config\r" | ||
61 | expect { | 117 | expect { |
62 | timeout {puts "TESTING ERROR 4\n";exit} | 118 | timeout {puts "TESTING ERROR 4\n";exit} |
63 | "Child process initialized" | 119 | "Child process initialized" |
64 | } | 120 | } |
65 | sleep 1 | 121 | sleep 1 |
66 | 122 | ||
67 | send -- "ls ~/.config | wc -l\r" | 123 | send -- "ls -al | wc -l\r" |
124 | expect { | ||
125 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
126 | "5" | ||
127 | } | ||
128 | |||
129 | send -- "ls -al .bashrc\r" | ||
68 | expect { | 130 | expect { |
69 | timeout {puts "TESTING ERROR 5\n";exit} | 131 | timeout {puts "TESTING ERROR 5.2\n";exit} |
70 | "0" | 132 | "netblue" |
71 | } | 133 | } |
134 | expect { | ||
135 | timeout {puts "TESTING ERROR 5.3\n";exit} | ||
136 | "netblue" | ||
137 | } | ||
138 | expect { | ||
139 | timeout {puts "TESTING ERROR 5.4\n";exit} | ||
140 | ".bashrc" | ||
141 | } | ||
142 | |||
143 | send -- "ls -al .Xauthority\r" | ||
144 | expect { | ||
145 | timeout {puts "TESTING ERROR 5.5\n";exit} | ||
146 | "netblue" | ||
147 | } | ||
148 | expect { | ||
149 | timeout {puts "TESTING ERROR 5.6\n";exit} | ||
150 | "netblue" | ||
151 | } | ||
152 | expect { | ||
153 | timeout {puts "TESTING ERROR 5.7\n";exit} | ||
154 | ".Xauthority" | ||
155 | } | ||
156 | |||
72 | after 100 | 157 | after 100 |
73 | send -- "exit\r" | 158 | send -- "exit\r" |
74 | sleep 1 | 159 | sleep 1 |