app/test: convert all tests to register system
[dpdk.git] / app / test / test_kni.c
index 962bfad..60683d2 100644 (file)
@@ -488,7 +488,7 @@ fail_kni:
        return ret;
 }
 
-int
+static int
 test_kni(void)
 {
        int ret = -1;
@@ -680,13 +680,9 @@ fail:
        return ret;
 }
 
-#else /* RTE_LIBRTE_KNI */
-
-int
-test_kni(void)
-{
-       printf("The KNI library is not included in this build\n");
-       return 0;
-}
-
+static struct test_command kni_cmd = {
+       .command = "kni_autotest",
+       .callback = test_kni,
+};
+REGISTER_TEST_COMMAND(kni_cmd);
 #endif /* RTE_LIBRTE_KNI */