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 D6857A046B for ; Thu, 27 Jun 2019 14:18:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0E03D4CA9; Thu, 27 Jun 2019 14:18:14 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 2641F4C99 for ; Thu, 27 Jun 2019 14:18:12 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jun 2019 05:18:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,423,1557212400"; d="scan'208";a="162618004" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga008.fm.intel.com with ESMTP; 27 Jun 2019 05:18:10 -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 x5RCI910022198; Thu, 27 Jun 2019 13:18:09 +0100 Received: from wgcvswdev001.ir.intel.com (localhost [127.0.0.1]) by wgcvswdev001.ir.intel.com with ESMTP id x5RCHg0X027503; Thu, 27 Jun 2019 13:17:42 +0100 Received: (from lgovin3x@localhost) by wgcvswdev001.ir.intel.com with œ id x5RCHgBu027499; Thu, 27 Jun 2019 13:17:42 +0100 From: Lavanya Govindarajan To: dev@dpdk.org Cc: reshma.pattan@intel.com, anatoly.burakov@intel.com, jananeex.m.parthasarathy@intel.com, Lavanya Govindarajan Date: Thu, 27 Jun 2019 13:12:39 +0100 Message-Id: <1561637559-27164-1-git-send-email-lavanyax.govindarajan@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1561125028-21003-1-git-send-email-lavanyax.govindarajan@intel.com> References: <1561125028-21003-1-git-send-email-lavanyax.govindarajan@intel.com> Subject: [dpdk-dev] [PATCH v2] 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 Acked-by: Anatoly Burakov --- v2: Removed core and channels eal options as they are not significant --- app/test/test_eal_flags.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index 9112c96d0..17c0e43d2 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -880,6 +880,18 @@ test_misc_flags(void) const char *argv15[] = {prgname, "--file-prefix=intr", "-c", "1", "-n", "2", "--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) { @@ -956,6 +968,21 @@ 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 as auto - 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