From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 196B47F11 for ; Sat, 15 Nov 2014 21:24:02 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 15 Nov 2014 12:32:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,392,1413270000"; d="scan'208";a="608445096" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 15 Nov 2014 12:34:10 -0800 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id sAFKY9g8032523 for ; Sat, 15 Nov 2014 20:34:09 GMT Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id sAFKY9Mb006121 for ; Sat, 15 Nov 2014 20:34:09 GMT Received: (from pdelarax@localhost) by sivswdev02.ir.intel.com with id sAFKY92h006117 for dev@dpdk.org; Sat, 15 Nov 2014 20:34:09 GMT From: Pablo de Lara To: dev@dpdk.org Date: Sat, 15 Nov 2014 20:34:09 +0000 Message-Id: <1416083649-6085-1-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] app/test: Removed file-prefix option in eal_flags and multiprocess unit tests for FreeBSD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2014 20:24:03 -0000 eal_flags and multiprocess unit tests use --file-prefix option which is not supported in FreeBSD, so it has been removed if compiled for this OS Signed-off-by: Pablo de Lara --- app/test/test_eal_flags.c | 16 ++++++++++++---- app/test/test_mp_secondary.c | 10 ++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index 1f95d7f..2d7f726 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -400,18 +400,26 @@ test_invalid_b_flag(void) static int test_invalid_vdev_flag(void) { +#ifdef RTE_EXEC_ENV_BSDAPP + /* BSD target doesn't support prefixes at this point, and we also need to + * run another primary process here */ + const char * prefix = no_shconf; +#else + const char * prefix = "--file-prefix=vdev"; +#endif + /* Test with invalid vdev option */ - const char *vdevinval[] = {prgname, "--file-prefix=vdev","-n", "1", + const char *vdevinval[] = {prgname, prefix, "-n", "1", "-c", "1", vdev, "eth_dummy"}; /* Test with valid vdev option */ - const char *vdevval1[] = {prgname, "--file-prefix=vdev", "-n", "1", + const char *vdevval1[] = {prgname, prefix, "-n", "1", "-c", "1", vdev, "eth_ring0"}; - const char *vdevval2[] = {prgname, "--file-prefix=vdev", "-n", "1", + const char *vdevval2[] = {prgname, prefix, "-n", "1", "-c", "1", vdev, "eth_ring0,args=test"}; - const char *vdevval3[] = {prgname, "--file-prefix=vdev", "-n", "1", + const char *vdevval3[] = {prgname, prefix, "-n", "1", "-c", "1", vdev, "eth_ring0,nodeaction=r1:0:CREATE"}; if (launch_proc(vdevinval) == 0) { diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c index 95a12e2..b5d6802 100644 --- a/app/test/test_mp_secondary.c +++ b/app/test/test_mp_secondary.c @@ -84,6 +84,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) { @@ -107,6 +108,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 @@ -118,12 +120,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[] = { @@ -140,11 +146,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())); @@ -153,7 +161,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; } -- 1.7.4.1