]>
Commit | Line | Data |
---|---|---|
48d0341c | 1 | #!/bin/sh |
9f6c1fc4 | 2 | # Test of fmtmsg function family. |
2b778ceb | 3 | # Copyright (C) 2000-2021 Free Software Foundation, Inc. |
9f6c1fc4 | 4 | # This file is part of the GNU C Library. |
41bdb6e2 | 5 | |
9f6c1fc4 | 6 | # The GNU C Library is free software; you can redistribute it and/or |
41bdb6e2 AJ |
7 | # modify it under the terms of the GNU Lesser General Public |
8 | # License as published by the Free Software Foundation; either | |
9 | # version 2.1 of the License, or (at your option) any later version. | |
10 | ||
9f6c1fc4 UD |
11 | # The GNU C Library is distributed in the hope that it will be useful, |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 AJ |
14 | # Lesser General Public License for more details. |
15 | ||
16 | # You should have received a copy of the GNU Lesser General Public | |
59ba27a6 | 17 | # License along with the GNU C Library; if not, see |
5a82c748 | 18 | # <https://www.gnu.org/licenses/>. |
9f6c1fc4 | 19 | |
57c69bef DL |
20 | set -e |
21 | ||
9f6c1fc4 | 22 | common_objpfx=$1 |
8540f6d2 JM |
23 | test_program_prefix_before_env=$2 |
24 | run_program_env=$3 | |
25 | test_program_prefix_after_env=$4 | |
26 | objpfx=$5 | |
9f6c1fc4 | 27 | |
8540f6d2 JM |
28 | test_pre="${test_program_prefix_before_env} ${run_program_env}" |
29 | test="${test_program_prefix_after_env} ${objpfx}tst-fmtmsg" | |
9f6c1fc4 UD |
30 | out=${objpfx}tst-fmtmsg.out |
31 | ||
8540f6d2 JM |
32 | ($test_pre MSGVERB= $test || exit 1; |
33 | $test_pre MSGVERB=label $test || exit 1; | |
34 | $test_pre MSGVERB=severity $test || exit 1; | |
35 | $test_pre MSGVERB=severity:label $test || exit 1; | |
36 | $test_pre MSGVERB=text $test || exit 1; | |
37 | $test_pre MSGVERB=text:label $test || exit 1; | |
38 | $test_pre MSGVERB=text:severity $test || exit 1; | |
39 | $test_pre MSGVERB=text:severity:label $test || exit 1; | |
40 | $test_pre MSGVERB=action $test || exit 1; | |
41 | $test_pre MSGVERB=action:label $test || exit 1; | |
42 | $test_pre MSGVERB=action:severity $test || exit 1; | |
43 | $test_pre MSGVERB=action:severity:label $test || exit 1; | |
44 | $test_pre MSGVERB=action:text $test || exit 1; | |
45 | $test_pre MSGVERB=action:text:label $test || exit 1; | |
46 | $test_pre MSGVERB=action:text:severity $test || exit 1; | |
47 | $test_pre MSGVERB=action:text:severity:label $test || exit 1; | |
48 | $test_pre MSGVERB=tag $test || exit 1; | |
49 | $test_pre MSGVERB=tag:label $test || exit 1; | |
50 | $test_pre MSGVERB=tag:severity $test || exit 1; | |
51 | $test_pre MSGVERB=tag:severity:label $test || exit 1; | |
52 | $test_pre MSGVERB=tag:text $test || exit 1; | |
53 | $test_pre MSGVERB=tag:text:label $test || exit 1; | |
54 | $test_pre MSGVERB=tag:text:severity $test || exit 1; | |
55 | $test_pre MSGVERB=tag:text:severity:label $test || exit 1; | |
56 | $test_pre MSGVERB=tag:action $test || exit 1; | |
57 | $test_pre MSGVERB=tag:action:label $test || exit 1; | |
58 | $test_pre MSGVERB=tag:action:severity $test || exit 1; | |
59 | $test_pre MSGVERB=tag:action:severity:label $test || exit 1; | |
60 | $test_pre MSGVERB=tag:action:text $test || exit 1; | |
61 | $test_pre MSGVERB=tag:action:text:label $test || exit 1; | |
62 | $test_pre MSGVERB=tag:action:text:severity $test || exit 1; | |
63 | $test_pre MSGVERB=tag:action:text:severity:label $test || exit 1;) 2> $out | |
9f6c1fc4 UD |
64 | |
65 | cmp $out <<EOF | |
66 | GLIBC:tst-fmtmsg: HALT: halt | |
67 | TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1 | |
68 | GLIBC:tst-fmtmsg: ERROR: halt | |
69 | TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2 | |
70 | GLIBC:tst-fmtmsg: WARNING: halt | |
71 | TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3 | |
72 | GLIBC:tst-fmtmsg: INFO: halt | |
73 | TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4 | |
74 | GLIBC:tst-fmtmsg: halt | |
75 | TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5 | |
76 | GLIBC:tst-fmtmsg: TEST: halt | |
77 | TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6 | |
78 | GLIBC:tst-fmtmsg | |
79 | GLIBC:tst-fmtmsg | |
80 | GLIBC:tst-fmtmsg | |
81 | GLIBC:tst-fmtmsg | |
82 | GLIBC:tst-fmtmsg | |
83 | GLIBC:tst-fmtmsg | |
84 | HALT | |
85 | ERROR | |
86 | WARNING | |
87 | INFO | |
88 | ||
89 | TEST | |
90 | GLIBC:tst-fmtmsg: HALT | |
91 | GLIBC:tst-fmtmsg: ERROR | |
92 | GLIBC:tst-fmtmsg: WARNING | |
93 | GLIBC:tst-fmtmsg: INFO | |
94 | GLIBC:tst-fmtmsg | |
95 | GLIBC:tst-fmtmsg: TEST | |
96 | halt | |
97 | halt | |
98 | halt | |
99 | halt | |
100 | halt | |
101 | halt | |
102 | GLIBC:tst-fmtmsg: halt | |
103 | GLIBC:tst-fmtmsg: halt | |
104 | GLIBC:tst-fmtmsg: halt | |
105 | GLIBC:tst-fmtmsg: halt | |
106 | GLIBC:tst-fmtmsg: halt | |
107 | GLIBC:tst-fmtmsg: halt | |
108 | HALT: halt | |
109 | ERROR: halt | |
110 | WARNING: halt | |
111 | INFO: halt | |
112 | halt | |
113 | TEST: halt | |
114 | GLIBC:tst-fmtmsg: HALT: halt | |
115 | GLIBC:tst-fmtmsg: ERROR: halt | |
116 | GLIBC:tst-fmtmsg: WARNING: halt | |
117 | GLIBC:tst-fmtmsg: INFO: halt | |
118 | GLIBC:tst-fmtmsg: halt | |
119 | GLIBC:tst-fmtmsg: TEST: halt | |
120 | TO FIX: should print message for MM_HALT | |
121 | TO FIX: should print message for MM_ERROR | |
122 | TO FIX: should print message for MM_WARNING | |
123 | TO FIX: should print message for MM_INFO | |
124 | TO FIX: should print message for MM_NOSEV | |
125 | TO FIX: should print message for MM_TEST | |
126 | GLIBC:tst-fmtmsg: TO FIX: should print message for MM_HALT | |
127 | GLIBC:tst-fmtmsg: TO FIX: should print message for MM_ERROR | |
128 | GLIBC:tst-fmtmsg: TO FIX: should print message for MM_WARNING | |
129 | GLIBC:tst-fmtmsg: TO FIX: should print message for MM_INFO | |
130 | GLIBC:tst-fmtmsg: TO FIX: should print message for MM_NOSEV | |
131 | GLIBC:tst-fmtmsg: TO FIX: should print message for MM_TEST | |
132 | HALT: TO FIX: should print message for MM_HALT | |
133 | ERROR: TO FIX: should print message for MM_ERROR | |
134 | WARNING: TO FIX: should print message for MM_WARNING | |
135 | INFO: TO FIX: should print message for MM_INFO | |
136 | TO FIX: should print message for MM_NOSEV | |
137 | TEST: TO FIX: should print message for MM_TEST | |
138 | GLIBC:tst-fmtmsg: HALT: TO FIX: should print message for MM_HALT | |
139 | GLIBC:tst-fmtmsg: ERROR: TO FIX: should print message for MM_ERROR | |
140 | GLIBC:tst-fmtmsg: WARNING: TO FIX: should print message for MM_WARNING | |
141 | GLIBC:tst-fmtmsg: INFO: TO FIX: should print message for MM_INFO | |
142 | GLIBC:tst-fmtmsg: TO FIX: should print message for MM_NOSEV | |
143 | GLIBC:tst-fmtmsg: TEST: TO FIX: should print message for MM_TEST | |
144 | halt | |
145 | TO FIX: should print message for MM_HALT | |
146 | halt | |
147 | TO FIX: should print message for MM_ERROR | |
148 | halt | |
149 | TO FIX: should print message for MM_WARNING | |
150 | halt | |
151 | TO FIX: should print message for MM_INFO | |
152 | halt | |
153 | TO FIX: should print message for MM_NOSEV | |
154 | halt | |
155 | TO FIX: should print message for MM_TEST | |
156 | GLIBC:tst-fmtmsg: halt | |
157 | TO FIX: should print message for MM_HALT | |
158 | GLIBC:tst-fmtmsg: halt | |
159 | TO FIX: should print message for MM_ERROR | |
160 | GLIBC:tst-fmtmsg: halt | |
161 | TO FIX: should print message for MM_WARNING | |
162 | GLIBC:tst-fmtmsg: halt | |
163 | TO FIX: should print message for MM_INFO | |
164 | GLIBC:tst-fmtmsg: halt | |
165 | TO FIX: should print message for MM_NOSEV | |
166 | GLIBC:tst-fmtmsg: halt | |
167 | TO FIX: should print message for MM_TEST | |
168 | HALT: halt | |
169 | TO FIX: should print message for MM_HALT | |
170 | ERROR: halt | |
171 | TO FIX: should print message for MM_ERROR | |
172 | WARNING: halt | |
173 | TO FIX: should print message for MM_WARNING | |
174 | INFO: halt | |
175 | TO FIX: should print message for MM_INFO | |
176 | halt | |
177 | TO FIX: should print message for MM_NOSEV | |
178 | TEST: halt | |
179 | TO FIX: should print message for MM_TEST | |
180 | GLIBC:tst-fmtmsg: HALT: halt | |
181 | TO FIX: should print message for MM_HALT | |
182 | GLIBC:tst-fmtmsg: ERROR: halt | |
183 | TO FIX: should print message for MM_ERROR | |
184 | GLIBC:tst-fmtmsg: WARNING: halt | |
185 | TO FIX: should print message for MM_WARNING | |
186 | GLIBC:tst-fmtmsg: INFO: halt | |
187 | TO FIX: should print message for MM_INFO | |
188 | GLIBC:tst-fmtmsg: halt | |
189 | TO FIX: should print message for MM_NOSEV | |
190 | GLIBC:tst-fmtmsg: TEST: halt | |
191 | TO FIX: should print message for MM_TEST | |
192 | GLIBC:tst-fmtmsg:1 | |
193 | GLIBC:tst-fmtmsg:2 | |
194 | GLIBC:tst-fmtmsg:3 | |
195 | GLIBC:tst-fmtmsg:4 | |
196 | GLIBC:tst-fmtmsg:5 | |
197 | GLIBC:tst-fmtmsg:6 | |
198 | GLIBC:tst-fmtmsg: GLIBC:tst-fmtmsg:1 | |
199 | GLIBC:tst-fmtmsg: GLIBC:tst-fmtmsg:2 | |
200 | GLIBC:tst-fmtmsg: GLIBC:tst-fmtmsg:3 | |
201 | GLIBC:tst-fmtmsg: GLIBC:tst-fmtmsg:4 | |
202 | GLIBC:tst-fmtmsg: GLIBC:tst-fmtmsg:5 | |
203 | GLIBC:tst-fmtmsg: GLIBC:tst-fmtmsg:6 | |
204 | HALT: GLIBC:tst-fmtmsg:1 | |
205 | ERROR: GLIBC:tst-fmtmsg:2 | |
206 | WARNING: GLIBC:tst-fmtmsg:3 | |
207 | INFO: GLIBC:tst-fmtmsg:4 | |
208 | GLIBC:tst-fmtmsg:5 | |
209 | TEST: GLIBC:tst-fmtmsg:6 | |
210 | GLIBC:tst-fmtmsg: HALT: GLIBC:tst-fmtmsg:1 | |
211 | GLIBC:tst-fmtmsg: ERROR: GLIBC:tst-fmtmsg:2 | |
212 | GLIBC:tst-fmtmsg: WARNING: GLIBC:tst-fmtmsg:3 | |
213 | GLIBC:tst-fmtmsg: INFO: GLIBC:tst-fmtmsg:4 | |
214 | GLIBC:tst-fmtmsg: GLIBC:tst-fmtmsg:5 | |
215 | GLIBC:tst-fmtmsg: TEST: GLIBC:tst-fmtmsg:6 | |
216 | halt | |
217 | GLIBC:tst-fmtmsg:1 | |
218 | halt | |
219 | GLIBC:tst-fmtmsg:2 | |
220 | halt | |
221 | GLIBC:tst-fmtmsg:3 | |
222 | halt | |
223 | GLIBC:tst-fmtmsg:4 | |
224 | halt | |
225 | GLIBC:tst-fmtmsg:5 | |
226 | halt | |
227 | GLIBC:tst-fmtmsg:6 | |
228 | GLIBC:tst-fmtmsg: halt | |
229 | GLIBC:tst-fmtmsg:1 | |
230 | GLIBC:tst-fmtmsg: halt | |
231 | GLIBC:tst-fmtmsg:2 | |
232 | GLIBC:tst-fmtmsg: halt | |
233 | GLIBC:tst-fmtmsg:3 | |
234 | GLIBC:tst-fmtmsg: halt | |
235 | GLIBC:tst-fmtmsg:4 | |
236 | GLIBC:tst-fmtmsg: halt | |
237 | GLIBC:tst-fmtmsg:5 | |
238 | GLIBC:tst-fmtmsg: halt | |
239 | GLIBC:tst-fmtmsg:6 | |
240 | HALT: halt | |
241 | GLIBC:tst-fmtmsg:1 | |
242 | ERROR: halt | |
243 | GLIBC:tst-fmtmsg:2 | |
244 | WARNING: halt | |
245 | GLIBC:tst-fmtmsg:3 | |
246 | INFO: halt | |
247 | GLIBC:tst-fmtmsg:4 | |
248 | halt | |
249 | GLIBC:tst-fmtmsg:5 | |
250 | TEST: halt | |
251 | GLIBC:tst-fmtmsg:6 | |
252 | GLIBC:tst-fmtmsg: HALT: halt | |
253 | GLIBC:tst-fmtmsg:1 | |
254 | GLIBC:tst-fmtmsg: ERROR: halt | |
255 | GLIBC:tst-fmtmsg:2 | |
256 | GLIBC:tst-fmtmsg: WARNING: halt | |
257 | GLIBC:tst-fmtmsg:3 | |
258 | GLIBC:tst-fmtmsg: INFO: halt | |
259 | GLIBC:tst-fmtmsg:4 | |
260 | GLIBC:tst-fmtmsg: halt | |
261 | GLIBC:tst-fmtmsg:5 | |
262 | GLIBC:tst-fmtmsg: TEST: halt | |
263 | GLIBC:tst-fmtmsg:6 | |
264 | TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1 | |
265 | TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2 | |
266 | TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3 | |
267 | TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4 | |
268 | TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5 | |
269 | TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6 | |
270 | GLIBC:tst-fmtmsg: TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1 | |
271 | GLIBC:tst-fmtmsg: TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2 | |
272 | GLIBC:tst-fmtmsg: TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3 | |
273 | GLIBC:tst-fmtmsg: TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4 | |
274 | GLIBC:tst-fmtmsg: TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5 | |
275 | GLIBC:tst-fmtmsg: TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6 | |
276 | HALT: TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1 | |
277 | ERROR: TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2 | |
278 | WARNING: TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3 | |
279 | INFO: TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4 | |
280 | TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5 | |
281 | TEST: TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6 | |
282 | GLIBC:tst-fmtmsg: HALT: TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1 | |
283 | GLIBC:tst-fmtmsg: ERROR: TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2 | |
284 | GLIBC:tst-fmtmsg: WARNING: TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3 | |
285 | GLIBC:tst-fmtmsg: INFO: TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4 | |
286 | GLIBC:tst-fmtmsg: TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5 | |
287 | GLIBC:tst-fmtmsg: TEST: TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6 | |
288 | halt | |
289 | TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1 | |
290 | halt | |
291 | TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2 | |
292 | halt | |
293 | TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3 | |
294 | halt | |
295 | TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4 | |
296 | halt | |
297 | TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5 | |
298 | halt | |
299 | TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6 | |
300 | GLIBC:tst-fmtmsg: halt | |
301 | TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1 | |
302 | GLIBC:tst-fmtmsg: halt | |
303 | TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2 | |
304 | GLIBC:tst-fmtmsg: halt | |
305 | TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3 | |
306 | GLIBC:tst-fmtmsg: halt | |
307 | TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4 | |
308 | GLIBC:tst-fmtmsg: halt | |
309 | TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5 | |
310 | GLIBC:tst-fmtmsg: halt | |
311 | TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6 | |
312 | HALT: halt | |
313 | TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1 | |
314 | ERROR: halt | |
315 | TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2 | |
316 | WARNING: halt | |
317 | TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3 | |
318 | INFO: halt | |
319 | TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4 | |
320 | halt | |
321 | TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5 | |
322 | TEST: halt | |
323 | TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6 | |
324 | GLIBC:tst-fmtmsg: HALT: halt | |
325 | TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1 | |
326 | GLIBC:tst-fmtmsg: ERROR: halt | |
327 | TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2 | |
328 | GLIBC:tst-fmtmsg: WARNING: halt | |
329 | TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3 | |
330 | GLIBC:tst-fmtmsg: INFO: halt | |
331 | TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4 | |
332 | GLIBC:tst-fmtmsg: halt | |
333 | TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5 | |
334 | GLIBC:tst-fmtmsg: TEST: halt | |
335 | TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6 | |
336 | EOF | |
337 | exit $? |