X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=blobdiff_plain;f=app%2Ftest%2Ftest_timer_secondary.c;h=790f1805215215c9a732b4727ad0fdded3d03ae9;hp=31e4a7f083a97c92e29f23a744fb89093d8b86f9;hb=e0f4a0ed4237e273b78728b7c7a3bf71d2d5218f;hpb=ce33e2eaff61ca89c64d04e1775cc8b29f11c2e6 diff --git a/app/test/test_timer_secondary.c b/app/test/test_timer_secondary.c index 31e4a7f083..790f180521 100644 --- a/app/test/test_timer_secondary.c +++ b/app/test/test_timer_secondary.c @@ -118,16 +118,18 @@ test_timer_secondary(void) int ret; if (proc_type == RTE_PROC_PRIMARY) { + if (rte_lcore_count() < NUM_LCORES_NEEDED) { + printf("Not enough cores for test_timer_secondary, expecting at least %u\n", + NUM_LCORES_NEEDED); + return TEST_SKIPPED; + } + mz = rte_memzone_reserve(TEST_INFO_MZ_NAME, sizeof(*test_info), SOCKET_ID_ANY, 0); test_info = mz->addr; TEST_ASSERT_NOT_NULL(test_info, "Couldn't allocate memory for " "test data"); - TEST_ASSERT(rte_lcore_count() >= NUM_LCORES_NEEDED, - "at least %d lcores needed to run tests", - NUM_LCORES_NEEDED); - test_info->tim_mempool = rte_mempool_create("test_timer_mp", NUM_TIMERS, sizeof(struct rte_timer), 0, 0, NULL, NULL, NULL, NULL, rte_socket_id(), 0);