[dpdk-dev] [PATCH] test/eal: add ut cases for in-memory and single-file-segment
Burakov, Anatoly
anatoly.burakov at intel.com
Tue Jun 25 12:22:55 CEST 2019
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 <pallantlax.poornima at intel.com>
> ---
> 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 <anatoly.burakov at intel.com>
--
Thanks,
Anatoly
More information about the dev
mailing list