X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_debug.c;h=0a3b2c468ad7d1ea6f0c3c878f1c632c2ab3951a;hb=7b0983c26c0257b0a4627c31621dab14b1898598;hp=135b75db25d5ee1676f2fce97e3c2171556dc5b7;hpb=3031749c2df04a63cdcef186dcce3781e61436e8;p=dpdk.git diff --git a/app/test/test_debug.c b/app/test/test_debug.c index 135b75db25..0a3b2c468a 100644 --- a/app/test/test_debug.c +++ b/app/test/test_debug.c @@ -45,31 +45,9 @@ /* * Debug test * ========== - * - * - Call rte_dump_stack() and rte_dump_registers(). The result is not checked - * currently, as the functions are not implemented on baremetal. - * - Check that rte_panic() terminates the program using a non-zero error code. - * (Only implemented on linux, since it requires the fork() system call) */ -#ifdef RTE_EXEC_ENV_BAREMETAL - -/* baremetal - don't test rte_panic or rte_exit */ -static int -test_panic(void) -{ - return 0; -} - -static int -test_exit(void) -{ - return 0; -} - -#else - -/* linuxapp - use fork() to test rte_panic() */ +/* use fork() to test rte_panic() */ static int test_panic(void) { @@ -94,7 +72,7 @@ test_panic(void) return 0; } -/* linuxapp - use fork() to test rte_exit() */ +/* use fork() to test rte_exit() */ static int test_exit_val(int exit_val) { @@ -134,8 +112,6 @@ test_exit(void) return 0; } -#endif - static void dummy_app_usage(const char *progname) { @@ -156,7 +132,7 @@ test_usage(void) return 0; } -int +static int test_debug(void) { rte_dump_stack(); @@ -169,3 +145,5 @@ test_debug(void) return -1; return 0; } + +REGISTER_TEST_COMMAND(debug_autotest, test_debug);