From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 222B8A0471 for ; Fri, 21 Jun 2019 15:51:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 04D821D55F; Fri, 21 Jun 2019 15:51:30 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 24B2D1D4D1 for ; Fri, 21 Jun 2019 15:51:27 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jun 2019 06:51:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,400,1557212400"; d="scan'208";a="183414742" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga004.fm.intel.com with ESMTP; 21 Jun 2019 06:51:23 -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 x5LDpMOA017949; Fri, 21 Jun 2019 14:51:22 +0100 Received: from wgcvswdev001.ir.intel.com (localhost [127.0.0.1]) by wgcvswdev001.ir.intel.com with ESMTP id x5LDoubt021338; Fri, 21 Jun 2019 14:50:56 +0100 Received: (from lgovin3x@localhost) by wgcvswdev001.ir.intel.com with œ id x5LDotfU021334; Fri, 21 Jun 2019 14:50:55 +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: Fri, 21 Jun 2019 14:50:28 +0100 Message-Id: <1561125028-21003-1-git-send-email-lavanyax.govindarajan@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] 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 --- 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..82d24e1a8 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", + "-c", "1", "-n", "2", "--proc-type=auto"}; + + /* With process type as auto-detect with no-shconf */ + const char * const argv17[] = {prgname, "-c", "1", "-n", "2", + "--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", + "-c", "1", "-n", "2", "--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