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 2FC31A046B for ; Tue, 25 Jun 2019 12:23:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 59D981BB71; Tue, 25 Jun 2019 12:23:03 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 26F3A1BB3B for ; Tue, 25 Jun 2019 12:23:01 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jun 2019 03:22:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,415,1557212400"; d="scan'208";a="359895392" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.101]) ([10.237.220.101]) by fmsmga005.fm.intel.com with ESMTP; 25 Jun 2019 03:22:55 -0700 To: Pallantla Poornima , dev@dpdk.org Cc: reshma.pattan@intel.com References: <1560519475-9666-1-git-send-email-pallantlax.poornima@intel.com> From: "Burakov, Anatoly" Message-ID: Date: Tue, 25 Jun 2019 11:22:55 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <1560519475-9666-1-git-send-email-pallantlax.poornima@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] test/eal: add ut cases for in-memory and single-file-segment 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 14-Jun-19 2:37 PM, Pallantla Poornima wrote: > Added unit test case for eal command line 'in-memory' option > which will cover below functions. > get_seg_memfd() > test_memfd_create() > pagesz_flags() > > Added unit test case for eal command line 'single-file-segments' option > which will cover resize_hugefile(). > > Signed-off-by: Pallantla Poornima > --- > app/test/test_eal_flags.c | 69 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 69 insertions(+) > > diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c > index 9112c96d0..2b2cccaec 100644 > --- a/app/test/test_eal_flags.c > +++ b/app/test/test_eal_flags.c > @@ -978,6 +978,7 @@ test_file_prefix(void) > * mem mode > */ > char prefix[PATH_MAX] = ""; > + char tmp[PATH_MAX]; > > #ifdef RTE_EXEC_ENV_FREEBSD > return 0; > @@ -1010,6 +1011,26 @@ test_file_prefix(void) > const char *argv4[] = {prgname, "-c", "1", "-n", "2", "-m", > DEFAULT_MEM_SIZE, "--file-prefix=" memtest2 }; > > + /* primary process with inmemory mode */ > + const char * const argv5[] = {prgname, "-c", "1", "-n", "2", "-m", > + DEFAULT_MEM_SIZE, "--in-memory" }; > + > + /* primary process with memtest1 and inmemory mode */ > + const char * const argv6[] = {prgname, "-c", "1", "-n", "2", "-m", > + DEFAULT_MEM_SIZE, "--in-memory", > + "--file-prefix=" memtest1 }; > + > + snprintf(tmp, PATH_MAX, "--file-prefix=%s", prefix); No need to do this, you can just add `"--file-prefix", prefix` into below line and it'll work. The syntax is either "--flag=param" or "--flag param" - both are valid. Otherwise, Reviewed-by: Anatoly Burakov -- Thanks, Anatoly