test/pdump: add unit test for pdump library
[dpdk.git] / test / test / test.c
index 24df629..351c7f2 100644 (file)
@@ -30,6 +30,7 @@ extern cmdline_parse_ctx_t main_ctx[];
 #endif
 
 #include "test.h"
+#include "test_pdump.h"
 
 #define RTE_LOGTYPE_APP RTE_LOGTYPE_USER1
 
@@ -49,6 +50,7 @@ do_recursive_call(void)
                int (*action_fn)(void);
        } actions[] =  {
                        { "run_secondary_instances", test_mp_secondary },
+                       { "run_pdump_server_tests", test_pdump },
                        { "test_missing_c_flag", no_action },
                        { "test_master_lcore_flag", no_action },
                        { "test_invalid_n_flag", no_action },
@@ -102,8 +104,10 @@ main(int argc, char **argv)
                /* merge argc/argv and the environment args */
                all_argc = argc + eargc;
                all_argv = malloc(sizeof(*all_argv) * (all_argc + 1));
-               if (all_argv == NULL)
-                       return -1;
+               if (all_argv == NULL) {
+                       ret = -1;
+                       goto out;
+               }
 
                for (i = 0; i < argc; i++)
                        all_argv[i] = argv[i];