net/iavf: add GTPU in default hash
[dpdk.git] / app / test / test_timer_secondary.c
index 31e4a7f..7a3bc87 100644 (file)
@@ -23,8 +23,7 @@
 #define TEST_INFO_MZ_NAME      "test_timer_info_mz"
 #define MSECPERSEC             1E3
 
-#define launch_proc(ARGV) \
-       process_dup(ARGV, sizeof(ARGV)/(sizeof(ARGV[0])), __func__)
+#define launch_proc(ARGV) process_dup(ARGV, RTE_DIM(ARGV), __func__)
 
 struct test_info {
        unsigned int mstr_lcore;
@@ -118,16 +117,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);