]>
Commit | Line | Data |
---|---|---|
83d290c5 | 1 | // SPDX-License-Identifier: GPL-2.0+ |
e5a9d27f SG |
2 | /* |
3 | * Copyright (c) 2012, The Chromium Authors | |
e5a9d27f SG |
4 | */ |
5 | ||
e5a9d27f | 6 | #include <common.h> |
09140113 | 7 | #include <command.h> |
256060e4 | 8 | #include <efi_api.h> |
e5a9d27f | 9 | #include <display_options.h> |
f7ae49fc | 10 | #include <log.h> |
c614ddf2 | 11 | #include <mapmem.h> |
bdfb6d70 | 12 | #include <version_string.h> |
3bfb0f71 | 13 | #include <vsprintf.h> |
fbb99dce SG |
14 | #include <test/suites.h> |
15 | #include <test/test.h> | |
16 | #include <test/ut.h> | |
e5a9d27f | 17 | |
c614ddf2 SG |
18 | #define BUF_SIZE 0x100 |
19 | ||
e5a9d27f SG |
20 | #define FAKE_BUILD_TAG "jenkins-u-boot-denx_uboot_dm-master-build-aarch64" \ |
21 | "and a lot more text to come" | |
22 | ||
fbb99dce SG |
23 | /* Declare a new print test */ |
24 | #define PRINT_TEST(_name, _flags) UNIT_TEST(_name, _flags, print_test) | |
25 | ||
26 | #if CONFIG_IS_ENABLED(LIB_UUID) | |
3bad256f | 27 | /* Test printing GUIDs */ |
fbb99dce | 28 | static int print_guid(struct unit_test_state *uts) |
3bad256f | 29 | { |
3bad256f HS |
30 | unsigned char guid[16] = { |
31 | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 | |
32 | }; | |
04641c14 HS |
33 | unsigned char guid_esp[16] = { |
34 | 0x28, 0x73, 0x2a, 0xc1, 0x1f, 0xf8, 0xd2, 0x11, | |
35 | 0xBA, 0x4B, 0x00, 0xA0, 0xC9, 0x3E, 0xC9, 0x3B | |
36 | }; | |
3bad256f | 37 | char str[40]; |
0c9e8bf2 | 38 | int ret; |
3bad256f HS |
39 | |
40 | sprintf(str, "%pUb", guid); | |
04641c14 | 41 | ut_asserteq_str("01020304-0506-0708-090a-0b0c0d0e0f10", str); |
3bad256f | 42 | sprintf(str, "%pUB", guid); |
04641c14 | 43 | ut_asserteq_str("01020304-0506-0708-090A-0B0C0D0E0F10", str); |
3bad256f | 44 | sprintf(str, "%pUl", guid); |
04641c14 HS |
45 | ut_asserteq_str("04030201-0605-0807-090a-0b0c0d0e0f10", str); |
46 | sprintf(str, "%pUs", guid); | |
47 | ut_asserteq_str("04030201-0605-0807-090a-0b0c0d0e0f10", str); | |
3bad256f | 48 | sprintf(str, "%pUL", guid); |
04641c14 HS |
49 | ut_asserteq_str("04030201-0605-0807-090A-0B0C0D0E0F10", str); |
50 | sprintf(str, "%pUs", guid_esp); | |
51 | if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID)) { /* brace needed */ | |
52 | ut_asserteq_str("system", str); | |
53 | } else { | |
54 | ut_asserteq_str("c12a7328-f81f-11d2-ba4b-00a0c93ec93b", str); | |
55 | } | |
0c9e8bf2 HS |
56 | ret = snprintf(str, 4, "%pUL", guid); |
57 | ut_asserteq(0, str[3]); | |
58 | ut_asserteq(36, ret); | |
fbb99dce SG |
59 | |
60 | return 0; | |
3bad256f | 61 | } |
fbb99dce SG |
62 | PRINT_TEST(print_guid, 0); |
63 | #endif | |
3bad256f | 64 | |
fbb99dce | 65 | #if CONFIG_IS_ENABLED(EFI_LOADER) && !defined(API_BUILD) |
256060e4 | 66 | /* Test efi_loader specific printing */ |
fbb99dce | 67 | static int print_efi_ut(struct unit_test_state *uts) |
256060e4 | 68 | { |
256060e4 HS |
69 | char str[10]; |
70 | u8 buf[sizeof(struct efi_device_path_sd_mmc_path) + | |
71 | sizeof(struct efi_device_path)]; | |
72 | u8 *pos = buf; | |
73 | struct efi_device_path *dp_end; | |
74 | struct efi_device_path_sd_mmc_path *dp_sd = | |
75 | (struct efi_device_path_sd_mmc_path *)pos; | |
76 | ||
77 | /* Create a device path for an SD card */ | |
78 | dp_sd->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; | |
79 | dp_sd->dp.sub_type = DEVICE_PATH_SUB_TYPE_MSG_SD; | |
80 | dp_sd->dp.length = sizeof(struct efi_device_path_sd_mmc_path); | |
81 | dp_sd->slot_number = 3; | |
82 | pos += sizeof(struct efi_device_path_sd_mmc_path); | |
83 | /* Append end node */ | |
84 | dp_end = (struct efi_device_path *)pos; | |
85 | dp_end->type = DEVICE_PATH_TYPE_END; | |
86 | dp_end->sub_type = DEVICE_PATH_SUB_TYPE_END; | |
87 | dp_end->length = sizeof(struct efi_device_path); | |
88 | ||
89 | snprintf(str, sizeof(str), "_%pD_", buf); | |
fbb99dce | 90 | ut_assertok(strcmp("_/SD(3)_", str)); |
5f1ce1d4 HS |
91 | |
92 | /* NULL device path */ | |
93 | snprintf(str, sizeof(str), "_%pD_", NULL); | |
fbb99dce SG |
94 | ut_assertok(strcmp("_<NULL>_", str)); |
95 | ||
96 | return 0; | |
256060e4 | 97 | } |
fbb99dce SG |
98 | PRINT_TEST(print_efi_ut, 0); |
99 | #endif | |
256060e4 | 100 | |
fbb99dce | 101 | static int print_printf(struct unit_test_state *uts) |
e5a9d27f SG |
102 | { |
103 | char big_str[400]; | |
104 | int big_str_len; | |
105 | char str[10], *s; | |
106 | int len; | |
107 | ||
e5a9d27f | 108 | snprintf(str, sizeof(str), "testing"); |
fbb99dce | 109 | ut_assertok(strcmp("testing", str)); |
e5a9d27f SG |
110 | |
111 | snprintf(str, sizeof(str), "testing but too long"); | |
fbb99dce | 112 | ut_assertok(strcmp("testing b", str)); |
e5a9d27f SG |
113 | |
114 | snprintf(str, 1, "testing none"); | |
fbb99dce | 115 | ut_assertok(strcmp("", str)); |
e5a9d27f SG |
116 | |
117 | *str = 'x'; | |
118 | snprintf(str, 0, "testing none"); | |
fbb99dce | 119 | ut_asserteq('x', *str); |
e5a9d27f | 120 | |
5b9a5b2b | 121 | sprintf(big_str, "_%ls_", u"foo"); |
fbb99dce | 122 | ut_assertok(strcmp("_foo_", big_str)); |
085391b2 | 123 | |
e5a9d27f SG |
124 | /* Test the banner function */ |
125 | s = display_options_get_banner(true, str, sizeof(str)); | |
fbb99dce SG |
126 | ut_asserteq_ptr(str, s); |
127 | ut_assertok(strcmp("\n\nU-Boo\n\n", s)); | |
e5a9d27f | 128 | |
6c74e94a HS |
129 | /* Assert that we do not overwrite memory before the buffer */ |
130 | str[0] = '`'; | |
131 | s = display_options_get_banner(true, str + 1, 1); | |
fbb99dce SG |
132 | ut_asserteq_ptr(str + 1, s); |
133 | ut_assertok(strcmp("`", str)); | |
6c74e94a HS |
134 | |
135 | str[0] = '~'; | |
136 | s = display_options_get_banner(true, str + 1, 2); | |
fbb99dce SG |
137 | ut_asserteq_ptr(str + 1, s); |
138 | ut_assertok(strcmp("~\n", str)); | |
6c74e94a HS |
139 | |
140 | /* The last two characters are set to \n\n for all buffer sizes > 2 */ | |
e5a9d27f | 141 | s = display_options_get_banner(false, str, sizeof(str)); |
fbb99dce SG |
142 | ut_asserteq_ptr(str, s); |
143 | ut_assertok(strcmp("U-Boot \n\n", s)); | |
e5a9d27f SG |
144 | |
145 | /* Give it enough space for some of the version */ | |
146 | big_str_len = strlen(version_string) - 5; | |
147 | s = display_options_get_banner_priv(false, FAKE_BUILD_TAG, big_str, | |
148 | big_str_len); | |
fbb99dce SG |
149 | ut_asserteq_ptr(big_str, s); |
150 | ut_assertok(strncmp(version_string, s, big_str_len - 3)); | |
151 | ut_assertok(strcmp("\n\n", s + big_str_len - 3)); | |
e5a9d27f SG |
152 | |
153 | /* Give it enough space for the version and some of the build tag */ | |
154 | big_str_len = strlen(version_string) + 9 + 20; | |
155 | s = display_options_get_banner_priv(false, FAKE_BUILD_TAG, big_str, | |
156 | big_str_len); | |
fbb99dce | 157 | ut_asserteq_ptr(big_str, s); |
e5a9d27f | 158 | len = strlen(version_string); |
fbb99dce SG |
159 | ut_assertok(strncmp(version_string, s, len)); |
160 | ut_assertok(strncmp(", Build: ", s + len, 9)); | |
161 | ut_assertok(strncmp(FAKE_BUILD_TAG, s + 9 + len, 12)); | |
162 | ut_assertok(strcmp("\n\n", s + big_str_len - 3)); | |
e5a9d27f | 163 | |
e5a9d27f SG |
164 | return 0; |
165 | } | |
fbb99dce | 166 | PRINT_TEST(print_printf, 0); |
e5a9d27f | 167 | |
c614ddf2 SG |
168 | static int print_display_buffer(struct unit_test_state *uts) |
169 | { | |
170 | u8 *buf; | |
171 | int i; | |
172 | ||
c0e708eb SG |
173 | /* This test requires writable memory at zero */ |
174 | if (IS_ENABLED(CONFIG_X86)) | |
175 | return -EAGAIN; | |
176 | ||
c614ddf2 SG |
177 | buf = map_sysmem(0, BUF_SIZE); |
178 | memset(buf, '\0', BUF_SIZE); | |
179 | for (i = 0; i < 0x11; i++) | |
180 | buf[i] = i * 0x11; | |
181 | ||
182 | /* bytes */ | |
183 | console_record_reset(); | |
184 | print_buffer(0, buf, 1, 0x12, 0); | |
c7b16d83 SG |
185 | ut_assert_nextline("00000000: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff ..\"3DUfw........"); |
186 | ut_assert_nextline("00000010: 10 00 .."); | |
c614ddf2 SG |
187 | ut_assert_console_end(); |
188 | ||
189 | /* line length */ | |
190 | console_record_reset(); | |
191 | print_buffer(0, buf, 1, 0x12, 8); | |
c7b16d83 SG |
192 | ut_assert_nextline("00000000: 00 11 22 33 44 55 66 77 ..\"3DUfw"); |
193 | ut_assert_nextline("00000008: 88 99 aa bb cc dd ee ff ........"); | |
194 | ut_assert_nextline("00000010: 10 00 .."); | |
c614ddf2 SG |
195 | ut_assert_console_end(); |
196 | ||
197 | /* long line */ | |
198 | console_record_reset(); | |
199 | buf[0x41] = 0x41; | |
200 | print_buffer(0, buf, 1, 0x42, 0x40); | |
c7b16d83 SG |
201 | ut_assert_nextline("00000000: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..\"3DUfw........................................................"); |
202 | ut_assert_nextline("00000040: 00 41 .A"); | |
c614ddf2 SG |
203 | ut_assert_console_end(); |
204 | ||
205 | /* address */ | |
206 | console_record_reset(); | |
207 | print_buffer(0x12345678, buf, 1, 0x12, 0); | |
c7b16d83 SG |
208 | ut_assert_nextline("12345678: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff ..\"3DUfw........"); |
209 | ut_assert_nextline("12345688: 10 00 .."); | |
c614ddf2 SG |
210 | ut_assert_console_end(); |
211 | ||
212 | /* 16-bit */ | |
213 | console_record_reset(); | |
214 | print_buffer(0, buf, 2, 9, 0); | |
c7b16d83 SG |
215 | ut_assert_nextline("00000000: 1100 3322 5544 7766 9988 bbaa ddcc ffee ..\"3DUfw........"); |
216 | ut_assert_nextline("00000010: 0010 .."); | |
c614ddf2 SG |
217 | ut_assert_console_end(); |
218 | ||
219 | /* 32-bit */ | |
220 | console_record_reset(); | |
221 | print_buffer(0, buf, 4, 5, 0); | |
c7b16d83 SG |
222 | ut_assert_nextline("00000000: 33221100 77665544 bbaa9988 ffeeddcc ..\"3DUfw........"); |
223 | ut_assert_nextline("00000010: 00000010 ...."); | |
c614ddf2 SG |
224 | ut_assert_console_end(); |
225 | ||
226 | /* 64-bit */ | |
227 | console_record_reset(); | |
228 | print_buffer(0, buf, 8, 3, 0); | |
c7b16d83 SG |
229 | ut_assert_nextline("00000000: 7766554433221100 ffeeddccbbaa9988 ..\"3DUfw........"); |
230 | ut_assert_nextline("00000010: 0000000000000010 ........"); | |
c614ddf2 SG |
231 | ut_assert_console_end(); |
232 | ||
233 | /* ASCII */ | |
234 | console_record_reset(); | |
235 | buf[1] = 31; | |
236 | buf[2] = 32; | |
237 | buf[3] = 33; | |
238 | for (i = 0; i < 4; i++) | |
239 | buf[4 + i] = 126 + i; | |
240 | buf[8] = 255; | |
241 | print_buffer(0, buf, 1, 10, 0); | |
c7b16d83 | 242 | ut_assert_nextline("00000000: 00 1f 20 21 7e 7f 80 81 ff 99 .. !~....."); |
c614ddf2 SG |
243 | ut_assert_console_end(); |
244 | ||
245 | unmap_sysmem(buf); | |
246 | ||
247 | return 0; | |
248 | } | |
249 | PRINT_TEST(print_display_buffer, UT_TESTF_CONSOLE_REC); | |
250 | ||
0cceb99a SG |
251 | static int print_hexdump_line(struct unit_test_state *uts) |
252 | { | |
253 | char *linebuf; | |
254 | u8 *buf; | |
255 | int i; | |
256 | ||
257 | buf = map_sysmem(0, BUF_SIZE); | |
258 | memset(buf, '\0', BUF_SIZE); | |
259 | for (i = 0; i < 0x11; i++) | |
260 | buf[i] = i * 0x11; | |
261 | ||
262 | /* Check buffer size calculations */ | |
263 | linebuf = map_sysmem(0x400, BUF_SIZE); | |
264 | memset(linebuf, '\xff', BUF_SIZE); | |
265 | ut_asserteq(-ENOSPC, hexdump_line(0, buf, 1, 0x10, 0, linebuf, 75)); | |
266 | ut_asserteq(-1, linebuf[0]); | |
267 | ut_asserteq(0x10, hexdump_line(0, buf, 1, 0x10, 0, linebuf, 76)); | |
268 | ut_asserteq(0, linebuf[75]); | |
269 | ut_asserteq(-1, linebuf[76]); | |
270 | ||
271 | unmap_sysmem(buf); | |
272 | ||
273 | return 0; | |
274 | } | |
275 | PRINT_TEST(print_hexdump_line, UT_TESTF_CONSOLE_REC); | |
276 | ||
19edf139 SG |
277 | static int print_do_hex_dump(struct unit_test_state *uts) |
278 | { | |
279 | u8 *buf; | |
280 | int i; | |
281 | ||
c0e708eb SG |
282 | /* This test requires writable memory at zero */ |
283 | if (IS_ENABLED(CONFIG_X86)) | |
284 | return -EAGAIN; | |
285 | ||
19edf139 SG |
286 | buf = map_sysmem(0, BUF_SIZE); |
287 | memset(buf, '\0', BUF_SIZE); | |
288 | for (i = 0; i < 0x11; i++) | |
289 | buf[i] = i * 0x11; | |
290 | ||
291 | /* bytes */ | |
292 | console_record_reset(); | |
293 | print_hex_dump_bytes("", DUMP_PREFIX_ADDRESS, buf, 0x12); | |
8b3694aa MV |
294 | ut_assert_nextline("%0*lx: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff ..\"3DUfw........", |
295 | IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x0UL); | |
296 | ut_assert_nextline("%0*lx: 10 00 ..", | |
297 | IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x10UL); | |
19edf139 SG |
298 | ut_assert_console_end(); |
299 | ||
5d6d2b88 SG |
300 | /* line length */ |
301 | console_record_reset(); | |
302 | print_hex_dump("", DUMP_PREFIX_ADDRESS, 8, 1, buf, 0x12, true); | |
8b3694aa MV |
303 | ut_assert_nextline("%0*lx: 00 11 22 33 44 55 66 77 ..\"3DUfw", |
304 | IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x0UL); | |
305 | ut_assert_nextline("%0*lx: 88 99 aa bb cc dd ee ff ........", | |
306 | IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x8UL); | |
307 | ut_assert_nextline("%0*lx: 10 00 ..", | |
308 | IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x10UL); | |
5d6d2b88 SG |
309 | ut_assert_console_end(); |
310 | unmap_sysmem(buf); | |
311 | ||
312 | /* long line */ | |
313 | console_record_reset(); | |
314 | buf[0x41] = 0x41; | |
315 | print_hex_dump("", DUMP_PREFIX_ADDRESS, 0x40, 1, buf, 0x42, true); | |
8b3694aa MV |
316 | ut_assert_nextline("%0*lx: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..\"3DUfw........................................................", |
317 | IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x0UL); | |
318 | ut_assert_nextline("%0*lx: 00 41 .A", | |
319 | IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x40UL); | |
5d6d2b88 SG |
320 | ut_assert_console_end(); |
321 | ||
19edf139 SG |
322 | /* 16-bit */ |
323 | console_record_reset(); | |
5d6d2b88 | 324 | print_hex_dump("", DUMP_PREFIX_ADDRESS, 0, 2, buf, 0x12, true); |
8b3694aa MV |
325 | ut_assert_nextline("%0*lx: 1100 3322 5544 7766 9988 bbaa ddcc ffee ..\"3DUfw........", |
326 | IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x0UL); | |
327 | ut_assert_nextline("%0*lx: 0010 ..", | |
328 | IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x10UL); | |
19edf139 SG |
329 | ut_assert_console_end(); |
330 | unmap_sysmem(buf); | |
331 | ||
332 | /* 32-bit */ | |
333 | console_record_reset(); | |
5d6d2b88 | 334 | print_hex_dump("", DUMP_PREFIX_ADDRESS, 0, 4, buf, 0x14, true); |
8b3694aa MV |
335 | ut_assert_nextline("%0*lx: 33221100 77665544 bbaa9988 ffeeddcc ..\"3DUfw........", |
336 | IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x0UL); | |
337 | ut_assert_nextline("%0*lx: 00000010 ....", | |
338 | IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x10UL); | |
19edf139 SG |
339 | ut_assert_console_end(); |
340 | unmap_sysmem(buf); | |
341 | ||
342 | /* 64-bit */ | |
343 | console_record_reset(); | |
344 | print_hex_dump("", DUMP_PREFIX_ADDRESS, 16, 8, buf, 0x18, true); | |
8b3694aa MV |
345 | ut_assert_nextline("%0*lx: 7766554433221100 ffeeddccbbaa9988 ..\"3DUfw........", |
346 | IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x0UL); | |
347 | ut_assert_nextline("%0*lx: 0000000000000010 ........", | |
348 | IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x10UL); | |
19edf139 SG |
349 | ut_assert_console_end(); |
350 | unmap_sysmem(buf); | |
351 | ||
352 | /* ASCII */ | |
353 | console_record_reset(); | |
354 | buf[1] = 31; | |
355 | buf[2] = 32; | |
356 | buf[3] = 33; | |
357 | for (i = 0; i < 4; i++) | |
358 | buf[4 + i] = 126 + i; | |
359 | buf[8] = 255; | |
5d6d2b88 | 360 | print_hex_dump("", DUMP_PREFIX_ADDRESS, 0, 1, buf, 10, true); |
8b3694aa MV |
361 | ut_assert_nextline("%0*lx: 00 1f 20 21 7e 7f 80 81 ff 99 .. !~.....", |
362 | IS_ENABLED(CONFIG_PHYS_64BIT) ? 16 : 8, 0x0UL); | |
19edf139 SG |
363 | ut_assert_console_end(); |
364 | unmap_sysmem(buf); | |
365 | ||
366 | return 0; | |
367 | } | |
368 | PRINT_TEST(print_do_hex_dump, UT_TESTF_CONSOLE_REC); | |
369 | ||
0c9e8bf2 HS |
370 | static int snprint(struct unit_test_state *uts) |
371 | { | |
372 | char buf[10] = "xxxxxxxxx"; | |
373 | int ret; | |
374 | ||
73cde90c HS |
375 | ret = snprintf(buf, 5, "%d", 12345678); |
376 | ut_asserteq_str("1234", buf); | |
377 | ut_asserteq(8, ret); | |
378 | ret = snprintf(buf, 5, "0x%x", 0x1234); | |
379 | ut_asserteq_str("0x12", buf); | |
380 | ut_asserteq(6, ret); | |
381 | ret = snprintf(buf, 5, "0x%08x", 0x1234); | |
382 | ut_asserteq_str("0x00", buf); | |
383 | ut_asserteq(10, ret); | |
384 | ret = snprintf(buf, 3, "%s", "abc"); | |
385 | ut_asserteq_str("ab", buf); | |
386 | ut_asserteq(3, ret); | |
0c9e8bf2 HS |
387 | ret = snprintf(buf, 4, "%s:%s", "abc", "def"); |
388 | ut_asserteq(0, buf[3]); | |
389 | ut_asserteq(7, ret); | |
390 | ret = snprintf(buf, 4, "%s:%d", "abc", 9999); | |
391 | ut_asserteq(8, ret); | |
392 | return 0; | |
393 | } | |
394 | PRINT_TEST(snprint, 0); | |
395 | ||
fbb99dce SG |
396 | int do_ut_print(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) |
397 | { | |
398 | struct unit_test *tests = UNIT_TEST_SUITE_START(print_test); | |
399 | const int n_ents = UNIT_TEST_SUITE_COUNT(print_test); | |
400 | ||
401 | return cmd_ut_category("print", "print_", tests, n_ents, argc, argv); | |
402 | } |