app/test: shorten execution time
[dpdk.git] / app / test / test_per_lcore.c
index 2241ed5..f452cdb 100644 (file)
@@ -40,7 +40,6 @@
 #include <rte_memzone.h>
 #include <rte_per_lcore.h>
 #include <rte_launch.h>
-#include <rte_tailq.h>
 #include <rte_eal.h>
 #include <rte_per_lcore.h>
 #include <rte_lcore.h>
@@ -93,13 +92,13 @@ display_vars(__attribute__((unused)) void *arg)
 static int
 test_per_lcore_delay(__attribute__((unused)) void *arg)
 {
-       rte_delay_ms(5000);
-       printf("wait 5000ms on lcore %u\n", rte_lcore_id());
+       rte_delay_ms(100);
+       printf("wait 100ms on lcore %u\n", rte_lcore_id());
 
        return 0;
 }
 
-int
+static int
 test_per_lcore(void)
 {
        unsigned lcore_id;
@@ -136,3 +135,9 @@ test_per_lcore(void)
 
        return 0;
 }
+
+static struct test_command per_lcore_cmd = {
+       .command = "per_lcore_autotest",
+       .callback = test_per_lcore,
+};
+REGISTER_TEST_COMMAND(per_lcore_cmd);