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 64C82A0487 for ; Tue, 2 Jul 2019 09:33:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 980A75B34; Tue, 2 Jul 2019 09:33:16 +0200 (CEST) Received: from mail-vs1-f65.google.com (mail-vs1-f65.google.com [209.85.217.65]) by dpdk.org (Postfix) with ESMTP id 960254C8F for ; Tue, 2 Jul 2019 09:33:15 +0200 (CEST) Received: by mail-vs1-f65.google.com with SMTP id r3so2766315vsr.13 for ; Tue, 02 Jul 2019 00:33:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UleanoSMom1M1GZGNIp9gBeFHZIDXY0hgUXofowJ9mo=; b=YQiO+gnVkdt95a+hFCvE3ub4e5o2k6Gde0QwGGZmLBGceXXEZU+hQXrBg6ugvYEsA4 wXAf34bl7pBrhIYGS721LMdG4iU37w7aN3ygZWwt5J7Hq7uOUUOTlDVyNbDwTtb2m3dY ZMBXC1/S4f1wo22YMczgOUYXtJGgGkcuTgsZSt0j4t4VIK9xkN50kidEo8VwTF2EHDnV IWI2IUFF9YptcIJtv5fRoYWgqu4HGT0RODKpGXwt25Ym9Ib3wpgcFAZgd4BHGty3QyQh rnrSeCTGeDdQC9VSFKF7a/6kSL9rZ0R0dVxaK+hc3Wr/9S1bs0zPO9venTHh83kXPwxy iFng== X-Gm-Message-State: APjAAAV+9bM2IW5jGhKDZASg2s3Oe2PdnYE4/OmQ7zJ29jnjYSYwC+np UHNnno/SNFwoFA6sEaik0gWygtNPIsrP8cbse2rm/w== X-Google-Smtp-Source: APXvYqw42dse4hrq9H31ZpYdfi4x9T175GPgT0PnQ0X4fFnogwfZpghRWPOsMSa7OwZoRsg6ld/S/gfCI/ygeiRCXtI= X-Received: by 2002:a67:e9ca:: with SMTP id q10mr17250816vso.105.1562052794995; Tue, 02 Jul 2019 00:33:14 -0700 (PDT) MIME-Version: 1.0 References: <1561125028-21003-1-git-send-email-lavanyax.govindarajan@intel.com> <1561637559-27164-1-git-send-email-lavanyax.govindarajan@intel.com> In-Reply-To: <1561637559-27164-1-git-send-email-lavanyax.govindarajan@intel.com> From: David Marchand Date: Tue, 2 Jul 2019 09:33:04 +0200 Message-ID: To: Lavanya Govindarajan Cc: dev , "Pattan, Reshma" , "Burakov, Anatoly" , "Parthasarathy, JananeeX M" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [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" On Thu, Jun 27, 2019 at 2:18 PM Lavanya Govindarajan < lavanyax.govindarajan@intel.com> wrote: > 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"); > Nit: those messages are not that useful, but at least let's make them consistent by using the full option names: --proc-type and --no-shconf. + 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 > > Reviewed-by: David Marchand -- David Marchand