tailq: remove unneeded inclusions
[dpdk.git] / app / test / test_mp_secondary.c
index 7579e20..2f941b5 100644 (file)
@@ -35,7 +35,6 @@
 
 #include "test.h"
 
-#ifndef RTE_EXEC_ENV_BAREMETAL
 #include <stdint.h>
 #include <stdlib.h>
 #include <stdarg.h>
@@ -56,7 +55,6 @@
 #include <rte_common.h>
 #include <rte_memory.h>
 #include <rte_memzone.h>
-#include <rte_tailq.h>
 #include <rte_eal.h>
 #include <rte_launch.h>
 #include <rte_per_lcore.h>
@@ -85,6 +83,7 @@
 #define launch_proc(ARGV) process_dup(ARGV, \
                sizeof(ARGV)/(sizeof(ARGV[0])), __func__)
 
+#ifdef RTE_EXEC_ENV_LINUXAPP
 static char*
 get_current_prefix(char * prefix, int size)
 {
@@ -108,6 +107,7 @@ get_current_prefix(char * prefix, int size)
 
        return prefix;
 }
+#endif
 
 /*
  * This function is called in the primary i.e. main test, to spawn off secondary
@@ -119,12 +119,16 @@ run_secondary_instances(void)
        int ret = 0;
        char coremask[10];
 
+#ifdef RTE_EXEC_ENV_LINUXAPP
        char tmp[PATH_MAX] = {0};
        char prefix[PATH_MAX] = {0};
 
        get_current_prefix(tmp, sizeof(tmp));
 
        snprintf(prefix, sizeof(prefix), "--file-prefix=%s", tmp);
+#else
+       const char *prefix = "";
+#endif
 
        /* good case, using secondary */
        const char *argv1[] = {
@@ -141,11 +145,13 @@ run_secondary_instances(void)
                        prgname, "-c", coremask, "--proc-type=ERROR",
                        prefix
        };
+#ifdef RTE_EXEC_ENV_LINUXAPP
        /* bad case, using invalid file prefix */
        const char *argv4[]  = {
                        prgname, "-c", coremask, "--proc-type=secondary",
                                        "--file-prefix=ERROR"
        };
+#endif
 
        snprintf(coremask, sizeof(coremask), "%x", \
                        (1 << rte_get_master_lcore()));
@@ -154,7 +160,9 @@ run_secondary_instances(void)
        ret |= launch_proc(argv2);
 
        ret |= !(launch_proc(argv3));
+#ifdef RTE_EXEC_ENV_LINUXAPP
        ret |= !(launch_proc(argv4));
+#endif
 
        return ret;
 }
@@ -270,4 +278,3 @@ static struct test_command multiprocess_cmd = {
        .callback = test_mp_secondary,
 };
 REGISTER_TEST_COMMAND(multiprocess_cmd);
-#endif