Cherry-pick patch to fix test suite failures
Reiner Herrmann
3 years ago
0 | From a3bf167404043700ec3b561c3c9b1f7a10f35632 Mon Sep 17 00:00:00 2001 | |
1 | From: netblue30 <netblue30@yahoo.com> | |
2 | Date: Mon, 5 Oct 2020 11:20:43 -0400 | |
3 | Subject: [PATCH] testing | |
4 | ||
5 | --- | |
6 | test/apps-x11-xorg/apps-x11-xorg.sh | 9 +++++++++ | |
7 | test/apps-x11-xorg/firefox.exp | 4 ++-- | |
8 | test/apps-x11-xorg/thunderbird.exp | 4 ++-- | |
9 | test/apps-x11-xorg/transmission-gtk.exp | 4 ++-- | |
10 | .../{transmission-gtk.exp => transmission-qt.exp} | 12 ++++++------ | |
11 | test/filters/seccomp-chmod-profile.exp | 2 +- | |
12 | test/filters/seccomp-chmod.exp | 2 +- | |
13 | test/filters/seccomp-run-files.exp | 4 ++-- | |
14 | 10 files changed, 29 insertions(+), 20 deletions(-) | |
15 | copy test/apps-x11-xorg/{transmission-gtk.exp => transmission-qt.exp} (89%) | |
16 | ||
17 | diff --git a/test/apps-x11-xorg/apps-x11-xorg.sh b/test/apps-x11-xorg/apps-x11-xorg.sh | |
18 | index 843fdc50..568dee85 100755 | |
19 | --- a/test/apps-x11-xorg/apps-x11-xorg.sh | |
20 | +++ b/test/apps-x11-xorg/apps-x11-xorg.sh | |
21 | @@ -25,6 +25,15 @@ else | |
22 | echo "TESTING SKIP: transmission-gtk not found" | |
23 | fi | |
24 | ||
25 | +which transmission-qt 2>/dev/null | |
26 | +if [ "$?" -eq 0 ]; | |
27 | +then | |
28 | + echo "TESTING: transmission-qt x11 xorg" | |
29 | + ./transmission-qt.exp | |
30 | +else | |
31 | + echo "TESTING SKIP: transmission-qt not found" | |
32 | +fi | |
33 | + | |
34 | which thunderbird 2>/dev/null | |
35 | if [ "$?" -eq 0 ]; | |
36 | then | |
37 | diff --git a/test/apps-x11-xorg/firefox.exp b/test/apps-x11-xorg/firefox.exp | |
38 | index 0a43db56..8322e2d0 100755 | |
39 | --- a/test/apps-x11-xorg/firefox.exp | |
40 | +++ b/test/apps-x11-xorg/firefox.exp | |
41 | @@ -41,7 +41,7 @@ expect { | |
42 | sleep 2 | |
43 | ||
44 | spawn $env(SHELL) | |
45 | -send -- "firemon --seccomp --nowrap\r" | |
46 | +send -- "firemon --seccomp --wrap\r" | |
47 | expect { | |
48 | timeout {puts "TESTING ERROR 5\n";exit} | |
49 | "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit} | |
50 | @@ -61,7 +61,7 @@ expect { | |
51 | "name=blablabla" | |
52 | } | |
53 | sleep 1 | |
54 | -send -- "firemon --caps --nowrap\r" | |
55 | +send -- "firemon --caps --wrap\r" | |
56 | expect { | |
57 | timeout {puts "TESTING ERROR 6\n";exit} | |
58 | " firefox" {puts "firefox detected\n";} | |
59 | diff --git a/test/apps-x11-xorg/thunderbird.exp b/test/apps-x11-xorg/thunderbird.exp | |
60 | index 8cf0ac24..24549e6c 100755 | |
61 | --- a/test/apps-x11-xorg/thunderbird.exp | |
62 | +++ b/test/apps-x11-xorg/thunderbird.exp | |
63 | @@ -38,7 +38,7 @@ expect { | |
64 | sleep 2 | |
65 | ||
66 | spawn $env(SHELL) | |
67 | -send -- "firemon --seccomp --nowrap\r" | |
68 | +send -- "firemon --seccomp --wrap\r" | |
69 | expect { | |
70 | timeout {puts "TESTING ERROR 5\n";exit} | |
71 | "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit} | |
72 | @@ -57,7 +57,7 @@ expect { | |
73 | "name=blablabla" | |
74 | } | |
75 | sleep 2 | |
76 | -send -- "firemon --caps --nowrap\r" | |
77 | +send -- "firemon --caps --wrap\r" | |
78 | expect { | |
79 | timeout {puts "TESTING ERROR 6\n";exit} | |
80 | ":firejail" | |
81 | diff --git a/test/apps-x11-xorg/transmission-gtk.exp b/test/apps-x11-xorg/transmission-gtk.exp | |
82 | index fdbf388e..b688bc61 100755 | |
83 | --- a/test/apps-x11-xorg/transmission-gtk.exp | |
84 | +++ b/test/apps-x11-xorg/transmission-gtk.exp | |
85 | @@ -38,7 +38,7 @@ expect { | |
86 | sleep 2 | |
87 | ||
88 | spawn $env(SHELL) | |
89 | -send -- "firemon --seccomp --nowrap\r" | |
90 | +send -- "firemon --seccomp --wrap\r" | |
91 | expect { | |
92 | timeout {puts "TESTING ERROR 5\n";exit} | |
93 | "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit} | |
94 | @@ -57,7 +57,7 @@ expect { | |
95 | "name=blablabla" | |
96 | } | |
97 | sleep 1 | |
98 | -send -- "firemon --caps --nowrap\r" | |
99 | +send -- "firemon --caps --wrap\r" | |
100 | expect { | |
101 | timeout {puts "TESTING ERROR 6\n";exit} | |
102 | ":firejail" | |
103 | diff --git a/test/apps-x11-xorg/transmission-gtk.exp b/test/apps-x11-xorg/transmission-qt.exp | |
104 | similarity index 89% | |
105 | copy from test/apps-x11-xorg/transmission-gtk.exp | |
106 | copy to test/apps-x11-xorg/transmission-qt.exp | |
107 | index fdbf388e..5864bb84 100755 | |
108 | --- a/test/apps-x11-xorg/transmission-gtk.exp | |
109 | +++ b/test/apps-x11-xorg/transmission-qt.exp | |
110 | @@ -7,7 +7,7 @@ set timeout 10 | |
111 | spawn $env(SHELL) | |
112 | match_max 100000 | |
113 | ||
114 | -send -- "firejail --name=test --x11=xorg --ignore=net --ignore=netfilter --ignore=iprange transmission-gtk\r" | |
115 | +send -- "firejail --name=test --x11=xorg --ignore=net --ignore=netfilter --ignore=iprange transmission-qt\r" | |
116 | sleep 10 | |
117 | ||
118 | spawn $env(SHELL) | |
119 | @@ -18,7 +18,7 @@ expect { | |
120 | } | |
121 | expect { | |
122 | timeout {puts "TESTING ERROR 3.1\n";exit} | |
123 | - "transmission-gtk" | |
124 | + "transmission-qt" | |
125 | } | |
126 | sleep 1 | |
127 | ||
128 | @@ -38,7 +38,7 @@ expect { | |
129 | sleep 2 | |
130 | ||
131 | spawn $env(SHELL) | |
132 | -send -- "firemon --seccomp --nowrap\r" | |
133 | +send -- "firemon --seccomp --wrap\r" | |
134 | expect { | |
135 | timeout {puts "TESTING ERROR 5\n";exit} | |
136 | "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit} | |
137 | @@ -46,7 +46,7 @@ expect { | |
138 | } | |
139 | expect { | |
140 | timeout {puts "TESTING ERROR 5.0\n";exit} | |
141 | - "transmission-gtk" | |
142 | + "transmission-qt" | |
143 | } | |
144 | expect { | |
145 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} | |
146 | @@ -57,14 +57,14 @@ expect { | |
147 | "name=blablabla" | |
148 | } | |
149 | sleep 1 | |
150 | -send -- "firemon --caps --nowrap\r" | |
151 | +send -- "firemon --caps --wrap\r" | |
152 | expect { | |
153 | timeout {puts "TESTING ERROR 6\n";exit} | |
154 | ":firejail" | |
155 | } | |
156 | expect { | |
157 | timeout {puts "TESTING ERROR 6.0\n";exit} | |
158 | - "transmission-gtk" | |
159 | + "transmission-qt" | |
160 | } | |
161 | expect { | |
162 | timeout {puts "TESTING ERROR 6.1\n";exit} | |
163 | diff --git a/test/filters/seccomp-chmod-profile.exp b/test/filters/seccomp-chmod-profile.exp | |
164 | index 9b61397c..22392f88 100755 | |
165 | --- a/test/filters/seccomp-chmod-profile.exp | |
166 | +++ b/test/filters/seccomp-chmod-profile.exp | |
167 | @@ -41,7 +41,7 @@ expect { | |
168 | send -- "chmod +x testfile; echo done\r" | |
169 | expect { | |
170 | timeout {puts "TESTING ERROR 5\n";exit} | |
171 | - "Bad system call" | |
172 | + "Operation not permitted" | |
173 | } | |
174 | expect { | |
175 | timeout {puts "TESTING ERROR 6\n";exit} | |
176 | diff --git a/test/filters/seccomp-chmod.exp b/test/filters/seccomp-chmod.exp | |
177 | index 01b9cbaa..c72a68c8 100755 | |
178 | --- a/test/filters/seccomp-chmod.exp | |
179 | +++ b/test/filters/seccomp-chmod.exp | |
180 | @@ -41,7 +41,7 @@ expect { | |
181 | send -- "chmod +x testfile; echo done\r" | |
182 | expect { | |
183 | timeout {puts "TESTING ERROR 5\n";exit} | |
184 | - "Bad system call" | |
185 | + "Operation not permitted" | |
186 | } | |
187 | expect { | |
188 | timeout {puts "TESTING ERROR 6\n";exit} | |
189 | diff --git a/test/filters/seccomp-run-files.exp b/test/filters/seccomp-run-files.exp | |
190 | index fd3033a6..5f468cf2 100755 | |
191 | --- a/test/filters/seccomp-run-files.exp | |
192 | +++ b/test/filters/seccomp-run-files.exp | |
193 | @@ -24,7 +24,7 @@ after 100 | |
194 | send -- "ls -l /run/firejail/mnt/seccomp | grep -c seccomp\r" | |
195 | expect { | |
196 | timeout {puts "TESTING ERROR 3\n";exit} | |
197 | - "5" | |
198 | + "6" | |
199 | } | |
200 | send -- "exit\r" | |
201 | sleep 1 | |
202 | @@ -90,7 +90,7 @@ after 100 | |
203 | send -- "ls -l /run/firejail/mnt/seccomp | grep -c seccomp\r" | |
204 | expect { | |
205 | timeout {puts "TESTING ERROR 18\n";exit} | |
206 | - "6" | |
207 | + "8" | |
208 | } | |
209 | send -- "exit\r" | |
210 | sleep 1 | |
211 | -- | |
212 | 2.28.0 | |
213 |