| 379 | } |
| 380 | |
| 381 | static int |
| 382 | test_lcores(void) |
| 383 | { |
| 384 | unsigned int eal_threads_count = 0; |
| 385 | unsigned int i; |
| 386 | |
| 387 | for (i = 0; i < RTE_MAX_LCORE; i++) { |
| 388 | if (!rte_lcore_has_role(i, ROLE_OFF)) |
| 389 | eal_threads_count++; |
| 390 | } |
| 391 | if (eal_threads_count == 0) { |
| 392 | printf("Error: something is broken, no EAL thread detected.\n"); |
| 393 | return TEST_FAILED; |
| 394 | } |
| 395 | printf("EAL threads count: %u, RTE_MAX_LCORE=%u\n", eal_threads_count, |
| 396 | RTE_MAX_LCORE); |
| 397 | rte_lcore_dump(stdout); |
| 398 | |
| 399 | if (test_non_eal_lcores(eal_threads_count) < 0) |
| 400 | return TEST_FAILED; |
| 401 | |
| 402 | if (test_lcores_callback(eal_threads_count) < 0) |
| 403 | return TEST_FAILED; |
| 404 | |
| 405 | if (test_non_eal_lcores_callback(eal_threads_count) < 0) |
| 406 | return TEST_FAILED; |
| 407 | |
| 408 | if (test_ctrl_thread() < 0) |
| 409 | return TEST_FAILED; |
| 410 | |
| 411 | return TEST_SUCCESS; |
| 412 | } |
| 413 | |
| 414 | REGISTER_FAST_TEST(lcores_autotest, true, true, test_lcores); |
nothing calls this directly
no test coverage detected