[dpdk-dev] [PATCH v2] test/eal: add ut cases for in-memory and single-file-segment

David Marchand david.marchand at redhat.com
Wed Jun 26 15:54:03 CEST 2019


On Wed, Jun 26, 2019 at 3:47 PM Pallantla Poornima <
pallantlax.poornima at 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 <pallantlax.poornima at intel.com>
> Reviewed-by: Anatoly Burakov <anatoly.burakov at intel.com>
> ---
> 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..85f4fc64a 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, "-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 };
> +
> +       /* primary process with parent file-prefix and inmemory mode */
> +       const char * const argv7[] = {prgname, "-c", "1", "-n", "2", "-m",
> +               DEFAULT_MEM_SIZE, "--in-memory", "--file-prefix", prefix };
> +
> +       /* primary process with memtest1 and single-file-segments mode */
> +       const char * const argv8[] = {prgname, "-c", "1", "-n", "2", "-m",
> +               DEFAULT_MEM_SIZE, "--single-file-segments",
> +               "--file-prefix=" memtest1 };
> +
>

Same comment than http://patchwork.dpdk.org/patch/55169/

Please drop -n and -c options if there is no requirement for the tests to
run.


-- 
David Marchand


More information about the dev mailing list