]>
Commit | Line | Data |
---|---|---|
8ef0791c | 1 | /* |
42ea6851 JB |
2 | * BGP Multipath Unit Test |
3 | * Copyright (C) 2010 Google Inc. | |
4 | * | |
5 | * This file is part of Quagga | |
6 | * | |
7 | * Quagga is free software; you can redistribute it and/or modify it | |
8 | * under the terms of the GNU General Public License as published by the | |
9 | * Free Software Foundation; either version 2, or (at your option) any | |
10 | * later version. | |
11 | * | |
12 | * Quagga is distributed in the hope that it will be useful, but | |
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | * General Public License for more details. | |
16 | * | |
896014f4 DL |
17 | * You should have received a copy of the GNU General Public License along |
18 | * with this program; see the file COPYING; if not, write to the Free Software | |
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
42ea6851 JB |
20 | */ |
21 | ||
22 | #include <zebra.h> | |
23 | ||
1bf9f027 | 24 | #include "qobj.h" |
42ea6851 JB |
25 | #include "vty.h" |
26 | #include "stream.h" | |
27 | #include "privs.h" | |
28 | #include "linklist.h" | |
29 | #include "memory.h" | |
30 | #include "zclient.h" | |
3f9c7369 | 31 | #include "queue.h" |
039f3a34 | 32 | #include "filter.h" |
42ea6851 JB |
33 | |
34 | #include "bgpd/bgpd.h" | |
42ea6851 JB |
35 | #include "bgpd/bgp_table.h" |
36 | #include "bgpd/bgp_route.h" | |
96450faf | 37 | #include "bgpd/bgp_attr.h" |
37d361e7 | 38 | #include "bgpd/bgp_nexthop.h" |
96450faf | 39 | #include "bgpd/bgp_mpath.h" |
1525e99f | 40 | #include "bgpd/bgp_evpn.h" |
c2d020ad | 41 | #include "bgpd/bgp_network.h" |
42ea6851 JB |
42 | |
43 | #define VT100_RESET "\x1b[0m" | |
44 | #define VT100_RED "\x1b[31m" | |
45 | #define VT100_GREEN "\x1b[32m" | |
46 | #define VT100_YELLOW "\x1b[33m" | |
47 | #define OK VT100_GREEN "OK" VT100_RESET | |
48 | #define FAILED VT100_RED "failed" VT100_RESET | |
49 | ||
50 | #define TEST_PASSED 0 | |
51 | #define TEST_FAILED -1 | |
52 | ||
d62a17ae | 53 | #define EXPECT_TRUE(expr, res) \ |
54 | if (!(expr)) { \ | |
55 | printf("Test failure in %s line %u: %s\n", __FUNCTION__, \ | |
56 | __LINE__, #expr); \ | |
57 | (res) = TEST_FAILED; \ | |
58 | } | |
42ea6851 JB |
59 | |
60 | typedef struct testcase_t__ testcase_t; | |
61 | ||
62 | typedef int (*test_setup_func)(testcase_t *); | |
63 | typedef int (*test_run_func)(testcase_t *); | |
64 | typedef int (*test_cleanup_func)(testcase_t *); | |
65 | ||
66 | struct testcase_t__ { | |
d62a17ae | 67 | const char *desc; |
68 | void *test_data; | |
69 | void *verify_data; | |
70 | void *tmp_data; | |
71 | test_setup_func setup; | |
72 | test_run_func run; | |
73 | test_cleanup_func cleanup; | |
42ea6851 JB |
74 | }; |
75 | ||
76 | /* need these to link in libbgp */ | |
77 | struct thread_master *master = NULL; | |
78 | struct zclient *zclient; | |
d62a17ae | 79 | struct zebra_privs_t bgpd_privs = { |
80 | .user = NULL, | |
81 | .group = NULL, | |
82 | .vty_group = NULL, | |
42ea6851 JB |
83 | }; |
84 | ||
85 | static int tty = 0; | |
86 | ||
87 | /* Create fake bgp instance */ | |
d62a17ae | 88 | static struct bgp *bgp_create_fake(as_t *as, const char *name) |
42ea6851 | 89 | { |
d62a17ae | 90 | struct bgp *bgp; |
91 | afi_t afi; | |
92 | safi_t safi; | |
93 | ||
94 | if ((bgp = XCALLOC(MTYPE_BGP, sizeof(struct bgp))) == NULL) | |
95 | return NULL; | |
96 | ||
97 | bgp_lock(bgp); | |
98 | // bgp->peer_self = peer_new (bgp); | |
99 | // bgp->peer_self->host = XSTRDUP (MTYPE_BGP_PEER_HOST, "Static | |
100 | // announcement"); | |
101 | ||
102 | bgp->peer = list_new(); | |
103 | // bgp->peer->cmp = (int (*)(void *, void *)) peer_cmp; | |
104 | ||
105 | bgp->group = list_new(); | |
106 | // bgp->group->cmp = (int (*)(void *, void *)) peer_group_cmp; | |
107 | ||
1525e99f | 108 | bgp_evpn_init(bgp); |
d62a17ae | 109 | for (afi = AFI_IP; afi < AFI_MAX; afi++) |
110 | for (safi = SAFI_UNICAST; safi < SAFI_MAX; safi++) { | |
960035b2 PZ |
111 | bgp->route[afi][safi] = bgp_table_init(bgp, afi, safi); |
112 | bgp->aggregate[afi][safi] = bgp_table_init( | |
113 | bgp, afi, safi); | |
114 | bgp->rib[afi][safi] = bgp_table_init(bgp, afi, safi); | |
d62a17ae | 115 | bgp->maxpaths[afi][safi].maxpaths_ebgp = MULTIPATH_NUM; |
116 | bgp->maxpaths[afi][safi].maxpaths_ibgp = MULTIPATH_NUM; | |
117 | } | |
118 | ||
119 | bgp_scan_init(bgp); | |
120 | bgp->default_local_pref = BGP_DEFAULT_LOCAL_PREF; | |
121 | bgp->default_holdtime = BGP_DEFAULT_HOLDTIME; | |
122 | bgp->default_keepalive = BGP_DEFAULT_KEEPALIVE; | |
123 | bgp->restart_time = BGP_DEFAULT_RESTART_TIME; | |
124 | bgp->stalepath_time = BGP_DEFAULT_STALEPATH_TIME; | |
125 | ||
126 | bgp->as = *as; | |
127 | ||
128 | if (name) | |
129 | bgp->name = strdup(name); | |
130 | ||
131 | return bgp; | |
42ea6851 JB |
132 | } |
133 | ||
134 | /*========================================================= | |
135 | * Testcase for maximum-paths configuration | |
136 | */ | |
d62a17ae | 137 | static int setup_bgp_cfg_maximum_paths(testcase_t *t) |
42ea6851 | 138 | { |
d62a17ae | 139 | as_t asn = 1; |
140 | t->tmp_data = bgp_create_fake(&asn, NULL); | |
141 | if (!t->tmp_data) | |
142 | return -1; | |
143 | return 0; | |
42ea6851 JB |
144 | } |
145 | ||
d62a17ae | 146 | static int run_bgp_cfg_maximum_paths(testcase_t *t) |
42ea6851 | 147 | { |
d62a17ae | 148 | afi_t afi; |
149 | safi_t safi; | |
150 | struct bgp *bgp; | |
151 | int api_result; | |
152 | int test_result = TEST_PASSED; | |
153 | ||
154 | bgp = t->tmp_data; | |
155 | for (afi = AFI_IP; afi < AFI_MAX; afi++) | |
156 | for (safi = SAFI_UNICAST; safi < SAFI_MAX; safi++) { | |
157 | /* test bgp_maximum_paths_set */ | |
158 | api_result = bgp_maximum_paths_set( | |
159 | bgp, afi, safi, BGP_PEER_EBGP, 10, 0); | |
160 | EXPECT_TRUE(api_result == 0, test_result); | |
161 | api_result = bgp_maximum_paths_set( | |
162 | bgp, afi, safi, BGP_PEER_IBGP, 10, 0); | |
163 | EXPECT_TRUE(api_result == 0, test_result); | |
164 | EXPECT_TRUE(bgp->maxpaths[afi][safi].maxpaths_ebgp | |
165 | == 10, | |
166 | test_result); | |
167 | EXPECT_TRUE(bgp->maxpaths[afi][safi].maxpaths_ibgp | |
168 | == 10, | |
169 | test_result); | |
170 | ||
171 | /* test bgp_maximum_paths_unset */ | |
172 | api_result = bgp_maximum_paths_unset(bgp, afi, safi, | |
173 | BGP_PEER_EBGP); | |
174 | EXPECT_TRUE(api_result == 0, test_result); | |
175 | api_result = bgp_maximum_paths_unset(bgp, afi, safi, | |
176 | BGP_PEER_IBGP); | |
177 | EXPECT_TRUE(api_result == 0, test_result); | |
178 | EXPECT_TRUE((bgp->maxpaths[afi][safi].maxpaths_ebgp | |
179 | == MULTIPATH_NUM), | |
180 | test_result); | |
181 | EXPECT_TRUE((bgp->maxpaths[afi][safi].maxpaths_ibgp | |
182 | == MULTIPATH_NUM), | |
183 | test_result); | |
184 | } | |
185 | ||
186 | return test_result; | |
42ea6851 JB |
187 | } |
188 | ||
d62a17ae | 189 | static int cleanup_bgp_cfg_maximum_paths(testcase_t *t) |
42ea6851 | 190 | { |
d62a17ae | 191 | return bgp_delete((struct bgp *)t->tmp_data); |
42ea6851 JB |
192 | } |
193 | ||
194 | testcase_t test_bgp_cfg_maximum_paths = { | |
d62a17ae | 195 | .desc = "Test bgp maximum-paths config", |
196 | .setup = setup_bgp_cfg_maximum_paths, | |
197 | .run = run_bgp_cfg_maximum_paths, | |
198 | .cleanup = cleanup_bgp_cfg_maximum_paths, | |
42ea6851 JB |
199 | }; |
200 | ||
96450faf JB |
201 | /*========================================================= |
202 | * Testcase for bgp_mp_list | |
203 | */ | |
de8d5dff | 204 | struct peer test_mp_list_peer[] = { |
d62a17ae | 205 | {.local_as = 1, .as = 2}, {.local_as = 1, .as = 2}, |
206 | {.local_as = 1, .as = 2}, {.local_as = 1, .as = 2}, | |
207 | {.local_as = 1, .as = 2}, | |
de8d5dff | 208 | }; |
97b5d752 | 209 | int test_mp_list_peer_count = array_size(test_mp_list_peer); |
96450faf | 210 | struct attr test_mp_list_attr[4]; |
4b7e6066 | 211 | struct bgp_path_info test_mp_list_info[] = { |
d62a17ae | 212 | {.peer = &test_mp_list_peer[0], .attr = &test_mp_list_attr[0]}, |
213 | {.peer = &test_mp_list_peer[1], .attr = &test_mp_list_attr[1]}, | |
214 | {.peer = &test_mp_list_peer[2], .attr = &test_mp_list_attr[1]}, | |
215 | {.peer = &test_mp_list_peer[3], .attr = &test_mp_list_attr[2]}, | |
216 | {.peer = &test_mp_list_peer[4], .attr = &test_mp_list_attr[3]}, | |
96450faf | 217 | }; |
97b5d752 | 218 | int test_mp_list_info_count = array_size(test_mp_list_info); |
96450faf | 219 | |
d62a17ae | 220 | static int setup_bgp_mp_list(testcase_t *t) |
96450faf | 221 | { |
d62a17ae | 222 | test_mp_list_attr[0].nexthop.s_addr = 0x01010101; |
223 | test_mp_list_attr[1].nexthop.s_addr = 0x02020202; | |
224 | test_mp_list_attr[2].nexthop.s_addr = 0x03030303; | |
225 | test_mp_list_attr[3].nexthop.s_addr = 0x04040404; | |
226 | ||
227 | if ((test_mp_list_peer[0].su_remote = sockunion_str2su("1.1.1.1")) | |
228 | == NULL) | |
229 | return -1; | |
230 | if ((test_mp_list_peer[1].su_remote = sockunion_str2su("2.2.2.2")) | |
231 | == NULL) | |
232 | return -1; | |
233 | if ((test_mp_list_peer[2].su_remote = sockunion_str2su("3.3.3.3")) | |
234 | == NULL) | |
235 | return -1; | |
236 | if ((test_mp_list_peer[3].su_remote = sockunion_str2su("4.4.4.4")) | |
237 | == NULL) | |
238 | return -1; | |
239 | if ((test_mp_list_peer[4].su_remote = sockunion_str2su("5.5.5.5")) | |
240 | == NULL) | |
241 | return -1; | |
242 | ||
243 | return 0; | |
96450faf JB |
244 | } |
245 | ||
d62a17ae | 246 | static int run_bgp_mp_list(testcase_t *t) |
96450faf | 247 | { |
d62a17ae | 248 | struct list mp_list; |
249 | struct listnode *mp_node; | |
4b7e6066 | 250 | struct bgp_path_info *info; |
d62a17ae | 251 | int i; |
252 | int test_result = TEST_PASSED; | |
253 | bgp_mp_list_init(&mp_list); | |
254 | EXPECT_TRUE(listcount(&mp_list) == 0, test_result); | |
255 | ||
256 | bgp_mp_list_add(&mp_list, &test_mp_list_info[1]); | |
257 | bgp_mp_list_add(&mp_list, &test_mp_list_info[4]); | |
258 | bgp_mp_list_add(&mp_list, &test_mp_list_info[2]); | |
259 | bgp_mp_list_add(&mp_list, &test_mp_list_info[3]); | |
260 | bgp_mp_list_add(&mp_list, &test_mp_list_info[0]); | |
261 | ||
262 | for (i = 0, mp_node = mp_list.head; i < test_mp_list_info_count; | |
263 | i++, mp_node = listnextnode(mp_node)) { | |
264 | info = listgetdata(mp_node); | |
265 | EXPECT_TRUE(info == &test_mp_list_info[i], test_result); | |
266 | } | |
267 | ||
268 | bgp_mp_list_clear(&mp_list); | |
269 | EXPECT_TRUE(listcount(&mp_list) == 0, test_result); | |
270 | ||
271 | return test_result; | |
96450faf JB |
272 | } |
273 | ||
d62a17ae | 274 | static int cleanup_bgp_mp_list(testcase_t *t) |
96450faf | 275 | { |
d62a17ae | 276 | int i; |
96450faf | 277 | |
d62a17ae | 278 | for (i = 0; i < test_mp_list_peer_count; i++) |
279 | sockunion_free(test_mp_list_peer[i].su_remote); | |
96450faf | 280 | |
d62a17ae | 281 | return 0; |
96450faf JB |
282 | } |
283 | ||
284 | testcase_t test_bgp_mp_list = { | |
d62a17ae | 285 | .desc = "Test bgp_mp_list", |
286 | .setup = setup_bgp_mp_list, | |
287 | .run = run_bgp_mp_list, | |
288 | .cleanup = cleanup_bgp_mp_list, | |
96450faf JB |
289 | }; |
290 | ||
de8d5dff | 291 | /*========================================================= |
4b7e6066 | 292 | * Testcase for bgp_path_info_mpath_update |
de8d5dff JB |
293 | */ |
294 | ||
295 | struct bgp_node test_rn; | |
296 | ||
4b7e6066 | 297 | static int setup_bgp_path_info_mpath_update(testcase_t *t) |
de8d5dff | 298 | { |
d62a17ae | 299 | int i; |
300 | str2prefix("42.1.1.0/24", &test_rn.p); | |
301 | setup_bgp_mp_list(t); | |
302 | for (i = 0; i < test_mp_list_info_count; i++) | |
4b7e6066 | 303 | bgp_path_info_add(&test_rn, &test_mp_list_info[i]); |
d62a17ae | 304 | return 0; |
de8d5dff JB |
305 | } |
306 | ||
4b7e6066 | 307 | static int run_bgp_path_info_mpath_update(testcase_t *t) |
de8d5dff | 308 | { |
4b7e6066 | 309 | struct bgp_path_info *new_best, *old_best, *mpath; |
d62a17ae | 310 | struct list mp_list; |
311 | struct bgp_maxpaths_cfg mp_cfg = {3, 3}; | |
312 | int test_result = TEST_PASSED; | |
313 | bgp_mp_list_init(&mp_list); | |
314 | bgp_mp_list_add(&mp_list, &test_mp_list_info[4]); | |
315 | bgp_mp_list_add(&mp_list, &test_mp_list_info[3]); | |
316 | bgp_mp_list_add(&mp_list, &test_mp_list_info[0]); | |
317 | bgp_mp_list_add(&mp_list, &test_mp_list_info[1]); | |
318 | new_best = &test_mp_list_info[3]; | |
319 | old_best = NULL; | |
121e245d DS |
320 | bgp_path_info_mpath_update(&test_rn, new_best, old_best, &mp_list, |
321 | &mp_cfg); | |
d62a17ae | 322 | bgp_mp_list_clear(&mp_list); |
4b7e6066 DS |
323 | EXPECT_TRUE(bgp_path_info_mpath_count(new_best) == 2, test_result); |
324 | mpath = bgp_path_info_mpath_first(new_best); | |
d62a17ae | 325 | EXPECT_TRUE(mpath == &test_mp_list_info[0], test_result); |
1defdda8 | 326 | EXPECT_TRUE(CHECK_FLAG(mpath->flags, BGP_PATH_MULTIPATH), test_result); |
4b7e6066 | 327 | mpath = bgp_path_info_mpath_next(mpath); |
d62a17ae | 328 | EXPECT_TRUE(mpath == &test_mp_list_info[1], test_result); |
1defdda8 | 329 | EXPECT_TRUE(CHECK_FLAG(mpath->flags, BGP_PATH_MULTIPATH), test_result); |
d62a17ae | 330 | |
331 | bgp_mp_list_add(&mp_list, &test_mp_list_info[0]); | |
332 | bgp_mp_list_add(&mp_list, &test_mp_list_info[1]); | |
333 | new_best = &test_mp_list_info[0]; | |
334 | old_best = &test_mp_list_info[3]; | |
121e245d DS |
335 | bgp_path_info_mpath_update(&test_rn, new_best, old_best, &mp_list, |
336 | &mp_cfg); | |
d62a17ae | 337 | bgp_mp_list_clear(&mp_list); |
4b7e6066 DS |
338 | EXPECT_TRUE(bgp_path_info_mpath_count(new_best) == 1, test_result); |
339 | mpath = bgp_path_info_mpath_first(new_best); | |
d62a17ae | 340 | EXPECT_TRUE(mpath == &test_mp_list_info[1], test_result); |
1defdda8 DS |
341 | EXPECT_TRUE(CHECK_FLAG(mpath->flags, BGP_PATH_MULTIPATH), test_result); |
342 | EXPECT_TRUE(!CHECK_FLAG(test_mp_list_info[0].flags, BGP_PATH_MULTIPATH), | |
d62a17ae | 343 | test_result); |
344 | ||
345 | return test_result; | |
de8d5dff JB |
346 | } |
347 | ||
4b7e6066 | 348 | static int cleanup_bgp_path_info_mpath_update(testcase_t *t) |
de8d5dff | 349 | { |
d62a17ae | 350 | int i; |
de8d5dff | 351 | |
d62a17ae | 352 | for (i = 0; i < test_mp_list_peer_count; i++) |
353 | sockunion_free(test_mp_list_peer[i].su_remote); | |
de8d5dff | 354 | |
d62a17ae | 355 | return 0; |
de8d5dff JB |
356 | } |
357 | ||
4b7e6066 DS |
358 | testcase_t test_bgp_path_info_mpath_update = { |
359 | .desc = "Test bgp_path_info_mpath_update", | |
360 | .setup = setup_bgp_path_info_mpath_update, | |
361 | .run = run_bgp_path_info_mpath_update, | |
362 | .cleanup = cleanup_bgp_path_info_mpath_update, | |
de8d5dff JB |
363 | }; |
364 | ||
42ea6851 JB |
365 | /*========================================================= |
366 | * Set up testcase vector | |
367 | */ | |
368 | testcase_t *all_tests[] = { | |
9d303b37 | 369 | &test_bgp_cfg_maximum_paths, &test_bgp_mp_list, |
4b7e6066 | 370 | &test_bgp_path_info_mpath_update, |
42ea6851 JB |
371 | }; |
372 | ||
97b5d752 | 373 | int all_tests_count = array_size(all_tests); |
42ea6851 JB |
374 | |
375 | /*========================================================= | |
376 | * Test Driver Functions | |
377 | */ | |
d62a17ae | 378 | static int global_test_init(void) |
42ea6851 | 379 | { |
d62a17ae | 380 | qobj_init(); |
381 | master = thread_master_create(NULL); | |
26f63a1e | 382 | zclient = zclient_new(master, &zclient_options_default); |
c2d020ad | 383 | bgp_master_init(master, BGP_SOCKET_SNDBUF_SIZE); |
ecbc5a37 | 384 | vrf_init(NULL, NULL, NULL, NULL, NULL); |
d62a17ae | 385 | bgp_option_set(BGP_OPT_NO_LISTEN); |
386 | ||
387 | if (fileno(stdout) >= 0) | |
388 | tty = isatty(fileno(stdout)); | |
389 | return 0; | |
42ea6851 JB |
390 | } |
391 | ||
d62a17ae | 392 | static int global_test_cleanup(void) |
42ea6851 | 393 | { |
d62a17ae | 394 | if (zclient != NULL) |
395 | zclient_free(zclient); | |
396 | thread_master_free(master); | |
397 | return 0; | |
42ea6851 JB |
398 | } |
399 | ||
d62a17ae | 400 | static void display_result(testcase_t *test, int result) |
42ea6851 | 401 | { |
d62a17ae | 402 | if (tty) |
403 | printf("%s: %s\n", test->desc, | |
404 | result == TEST_PASSED ? OK : FAILED); | |
405 | else | |
406 | printf("%s: %s\n", test->desc, | |
407 | result == TEST_PASSED ? "OK" : "FAILED"); | |
42ea6851 JB |
408 | } |
409 | ||
d62a17ae | 410 | static int setup_test(testcase_t *t) |
42ea6851 | 411 | { |
d62a17ae | 412 | int res = 0; |
413 | if (t->setup) | |
414 | res = t->setup(t); | |
415 | return res; | |
42ea6851 JB |
416 | } |
417 | ||
d62a17ae | 418 | static int cleanup_test(testcase_t *t) |
42ea6851 | 419 | { |
d62a17ae | 420 | int res = 0; |
421 | if (t->cleanup) | |
422 | res = t->cleanup(t); | |
423 | return res; | |
42ea6851 JB |
424 | } |
425 | ||
d62a17ae | 426 | static void run_tests(testcase_t *tests[], int num_tests, int *pass_count, |
427 | int *fail_count) | |
42ea6851 | 428 | { |
d62a17ae | 429 | int test_index, result; |
430 | testcase_t *cur_test; | |
431 | ||
432 | *pass_count = *fail_count = 0; | |
433 | ||
434 | for (test_index = 0; test_index < num_tests; test_index++) { | |
435 | cur_test = tests[test_index]; | |
436 | if (!cur_test->desc) { | |
437 | printf("error: test %d has no description!\n", | |
438 | test_index); | |
439 | continue; | |
440 | } | |
441 | if (!cur_test->run) { | |
442 | printf("error: test %s has no run function!\n", | |
443 | cur_test->desc); | |
444 | continue; | |
445 | } | |
446 | if (setup_test(cur_test) != 0) { | |
447 | printf("error: setup failed for test %s\n", | |
448 | cur_test->desc); | |
449 | continue; | |
450 | } | |
451 | result = cur_test->run(cur_test); | |
452 | if (result == TEST_PASSED) | |
453 | *pass_count += 1; | |
454 | else | |
455 | *fail_count += 1; | |
456 | display_result(cur_test, result); | |
457 | if (cleanup_test(cur_test) != 0) { | |
458 | printf("error: cleanup failed for test %s\n", | |
459 | cur_test->desc); | |
460 | continue; | |
461 | } | |
462 | } | |
42ea6851 JB |
463 | } |
464 | ||
d62a17ae | 465 | int main(void) |
42ea6851 | 466 | { |
d62a17ae | 467 | int pass_count, fail_count; |
468 | time_t cur_time; | |
469 | ||
470 | time(&cur_time); | |
471 | printf("BGP Multipath Tests Run at %s", ctime(&cur_time)); | |
472 | if (global_test_init() != 0) { | |
473 | printf("Global init failed. Terminating.\n"); | |
474 | exit(1); | |
475 | } | |
476 | run_tests(all_tests, all_tests_count, &pass_count, &fail_count); | |
477 | global_test_cleanup(); | |
478 | printf("Total pass/fail: %d/%d\n", pass_count, fail_count); | |
479 | return fail_count; | |
42ea6851 | 480 | } |