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 2C265A0487 for ; Tue, 2 Jul 2019 09:48:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 03AB11B955; Tue, 2 Jul 2019 09:48:18 +0200 (CEST) Received: from mail-vs1-f67.google.com (mail-vs1-f67.google.com [209.85.217.67]) by dpdk.org (Postfix) with ESMTP id 951A01B94F for ; Tue, 2 Jul 2019 09:48:16 +0200 (CEST) Received: by mail-vs1-f67.google.com with SMTP id r3so2789221vsr.13 for ; Tue, 02 Jul 2019 00:48:16 -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=cfecPTqm7QDglshr67UBQ1y3EY85a1CpSV0+k0sLF1A=; b=G0Wbty4yHM1DXow3ab+gINkxP+1JANPUiZWGscx853ewfv+Sw2eCULd2WPc2eRTgXD y394oDkY3acmWaIBrsCMq4oGjuQGEHiGBDHYUxHbiR3f/VGOefjC8341lgABIydhWyIR WX/B2rVNJfr6a16Uah0RgGl0mzlXVZXQPoXRdqOGr+mN0nbc+eLUjeU20wkF6QKMYngr dtwoxGA8dbEbu7N7OSYtEjrOBKNTc3xhofDntUcpg55XaLQwg42RaYTcIaZlm5mduvPT Nk7ovdnW3X2J8cQVcp+Jxbpd/ZpRdQ1ALABxPgjeCYbThYd4ZVfFVGlw6TaKzgg+fIjG +Elg== X-Gm-Message-State: APjAAAXmWJvg7pEwHndhwpxUzoVgS5qYfbWT39sZzQdWpTnSSswnfNQC 2/d8018+RUSKzklAwmQ8Fc+N8gtIHv7++m75Gb6haA== X-Google-Smtp-Source: APXvYqxCw7FGmwQ/YTR3cEiV/SPPqmhp1mYdDOhuEYxG6E6ZF3IZfm7aNkfXCdTNGP4bdRHskYRy6IuqEdiMJzJWclE= X-Received: by 2002:a67:da99:: with SMTP id w25mr17529537vsj.141.1562053696000; Tue, 02 Jul 2019 00:48:16 -0700 (PDT) MIME-Version: 1.0 References: <1561556725-6671-1-git-send-email-pallantlax.poornima@intel.com> <1561640820-32434-1-git-send-email-pallantlax.poornima@intel.com> In-Reply-To: <1561640820-32434-1-git-send-email-pallantlax.poornima@intel.com> From: David Marchand Date: Tue, 2 Jul 2019 09:48:05 +0200 Message-ID: To: Pallantla Poornima Cc: dev , "Pattan, Reshma" , "Burakov, Anatoly" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v3] 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 Thu, Jun 27, 2019 at 3:09 PM Pallantla Poornima < pallantlax.poornima@intel.com> 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 > Reviewed-by: Anatoly Burakov > --- > v3: Removed -c , -n options as suggested > v2: Removed snprintf as suggested > --- > app/test/test_eal_flags.c | 66 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 66 insertions(+) > > diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c > index 9112c96d0..0d5eef727 100644 > --- a/app/test/test_eal_flags.c > +++ b/app/test/test_eal_flags.c > @@ -1010,6 +1010,24 @@ 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, "-m", > + DEFAULT_MEM_SIZE, "--in-memory" }; > + > + /* primary process with memtest1 and inmemory mode */ > + const char * const argv6[] = {prgname, "-m", > + DEFAULT_MEM_SIZE, "--in-memory", > + "--file-prefix=" memtest1 }; > + > + /* primary process with parent file-prefix and inmemory mode */ > + const char * const argv7[] = {prgname, "-m", > + DEFAULT_MEM_SIZE, "--in-memory", "--file-prefix", prefix }; > + > + /* primary process with memtest1 and single-file-segments mode */ > + const char * const argv8[] = {prgname, "-m", > + DEFAULT_MEM_SIZE, "--single-file-segments", > + "--file-prefix=" memtest1 }; > + > /* check if files for current prefix are present */ > if (process_hugefiles(prefix, HUGEPAGE_CHECK_EXISTS) != 1) { > printf("Error - hugepage files for %s were not > created!\n", prefix); > @@ -1130,6 +1148,54 @@ test_file_prefix(void) > return -1; > } > > + /* this process will run in in-memory mode, so it should not leave > any > + * hugepage files behind. > + */ > + > + /* test case to check eal-options with --in-memory mode */ > + if (launch_proc(argv5) != 0) { > + printf("Error - failed to run with in-memory mode\n"); > + return -1; > + } > + > + /*test case to check eal-options with --in-memory mode with > missing space. + * custom file-prefix. > + */ > + if (launch_proc(argv6) != 0) { > + printf("Error - failed to run with in-memory mode\n"); > + return -1; > + } > + > + /* check if hugefiles for memtest1 are present */ > + if (process_hugefiles(memtest1, HUGEPAGE_CHECK_EXISTS) != 0) { > + printf("Error - hugepage files for %s were created and not > deleted!\n", > + memtest1); > + return -1; > + } > + > + /* test case to check eal-options with --in-memory mode with > + * parent file-prefix. > + */ > + if (launch_proc(argv7) != 0) { > + printf("Error - failed to run with --file-prefix=%s\n", > prefix); > + return -1; > + } > + > + /* this process will run in single file mode, so it should not > leave any > + * hugepage files behind. > + */ > + if (launch_proc(argv8) != 0) { > + printf("Error - failed to run with single-file-segments > mode\n"); > + return -1; > + } > + > + /* check if hugefiles for memtest1 are present */ > + if (process_hugefiles(memtest1, HUGEPAGE_CHECK_EXISTS) != 0) { > + printf("Error - hugepage files for %s were not deleted!\n", > + memtest1); > + return -1; > + } > + > return 0; > } > > -- > 2.17.2 > > There are a couple of inconsistencies between inmemory, in-memory, --in-memory. Could you make this consistent? Then you can add my review tag. Thanks. -- David Marchand