From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6A16EA0487 for ; Wed, 3 Jul 2019 15:07:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5593AF04; Wed, 3 Jul 2019 15:07:06 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 6DBC23DC for ; Wed, 3 Jul 2019 15:07:04 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jul 2019 06:07:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,446,1557212400"; d="scan'208";a="169131953" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga006.jf.intel.com with ESMTP; 03 Jul 2019 06:07:01 -0700 Received: from wgcvswdev001.ir.intel.com (wgcvswdev001.ir.intel.com [10.102.246.100]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id x63D70NC028329; Wed, 3 Jul 2019 14:07:00 +0100 Received: from wgcvswdev001.ir.intel.com (localhost [127.0.0.1]) by wgcvswdev001.ir.intel.com with ESMTP id x63D6WBQ012801; Wed, 3 Jul 2019 14:06:32 +0100 Received: (from lgovin3x@localhost) by wgcvswdev001.ir.intel.com with œ id x63D6WAM012797; Wed, 3 Jul 2019 14:06:32 +0100 From: Lavanya Govindarajan To: dev@dpdk.org Cc: reshma.pattan@intel.com, anatoly.burakov@intel.com, david.marchand@redhat.com, jananeex.m.parthasarathy@intel.com, Lavanya Govindarajan Date: Wed, 3 Jul 2019 14:06:14 +0100 Message-Id: <1562159174-12183-1-git-send-email-lavanyax.govindarajan@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1561637559-27164-1-git-send-email-lavanyax.govindarajan@intel.com> References: <1561637559-27164-1-git-send-email-lavanyax.govindarajan@intel.com> Subject: [dpdk-dev] [PATCH v3] test/eal: add ut for eal options proc-type and uio X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Added unit test cases for EAL flags --proc-type=auto and --create-uio-dev in order to cover the below functions eal_proc_type_detect() rte_eal_create_uio_dev() Signed-off-by: Lavanya Govindarajan Reviewed-by: David Marchand Acked-by: Anatoly Burakov --- v3: Corrected error log message to be consistent v2: Removed core and channels eal options as they are not significant --- app/test/test_eal_flags.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index 9985ee979..3766c4cfc 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -903,6 +903,18 @@ test_misc_flags(void) const char *argv15[] = {prgname, "--file-prefix=intr", "--vfio-intr=invalid"}; + /* With process type as auto-detect */ + const char * const argv16[] = {prgname, "--file-prefix=auto", + "--proc-type=auto"}; + + /* With process type as auto-detect with no-shconf */ + const char * const argv17[] = {prgname, "--proc-type=auto", + no_shconf, nosh_prefix, no_huge}; + + /* With process type as --create-uio-dev flag */ + const char * const argv18[] = {prgname, "--file-prefix=uiodev", + "--create-uio-dev"}; + /* run all tests also applicable to FreeBSD first */ if (launch_proc(argv0) == 0) { @@ -979,6 +991,22 @@ test_misc_flags(void) "--vfio-intr invalid parameter\n"); return -1; } + if (launch_proc(argv16) != 0) { + printf("Error - process did not run ok with " + "--proc-type as auto parameter\n"); + return -1; + } + if (launch_proc(argv17) != 0) { + printf("Error - process did not run ok with " + "--proc-type and --no-shconf parameter\n"); + return -1; + } + if (launch_proc(argv18) != 0) { + printf("Error - process did not run ok with " + "--create-uio-dev parameter\n"); + return -1; + } + return 0; } -- 2.14.1