common/sfc_efx/base: add NIC magic check on BAR lookup
[dpdk.git] / app / test / test_mp_secondary.c
index b597dfc..3a655c3 100644 (file)
@@ -47,8 +47,7 @@
 
 #include "process.h"
 
-#define launch_proc(ARGV) process_dup(ARGV, \
-               sizeof(ARGV)/(sizeof(ARGV[0])), __func__)
+#define launch_proc(ARGV) process_dup(ARGV, RTE_DIM(ARGV), __func__)
 
 /*
  * This function is called in the primary i.e. main test, to spawn off secondary
@@ -60,7 +59,7 @@ run_secondary_instances(void)
        int ret = 0;
        char coremask[10];
 
-#ifdef RTE_EXEC_ENV_LINUXAPP
+#ifdef RTE_EXEC_ENV_LINUX
        char tmp[PATH_MAX] = {0};
        char prefix[PATH_MAX] = {0};
 
@@ -86,7 +85,7 @@ run_secondary_instances(void)
                        prgname, "-c", coremask, "--proc-type=ERROR",
                        prefix
        };
-#ifdef RTE_EXEC_ENV_LINUXAPP
+#ifdef RTE_EXEC_ENV_LINUX
        /* bad case, using invalid file prefix */
        const char *argv4[]  = {
                        prgname, "-c", coremask, "--proc-type=secondary",
@@ -98,10 +97,17 @@ run_secondary_instances(void)
                        (1 << rte_get_master_lcore()));
 
        ret |= launch_proc(argv1);
+       printf("### Testing rte_mp_disable() reject:\n");
+       if (rte_mp_disable()) {
+               printf("Error: rte_mp_disable() has been accepted\n");
+               ret |= -1;
+       } else {
+               printf("# Checked rte_mp_disable() is refused\n");
+       }
        ret |= launch_proc(argv2);
 
        ret |= !(launch_proc(argv3));
-#ifdef RTE_EXEC_ENV_LINUXAPP
+#ifdef RTE_EXEC_ENV_LINUX
        ret |= !(launch_proc(argv4));
 #endif