[dpdk-dev] [PATCH v2] app/test: fix vdev test in test_eal_flags

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Tue Jul 1 13:44:49 CEST 2014


Hi Olivier,

> -----Original Message-----
> From: Olivier Matz [mailto:olivier.matz at 6wind.com]
> Sent: Tuesday, July 01, 2014 10:21 AM
> To: dev at dpdk.org; De Lara Guarch, Pablo
> Cc: olivier.matz at 6wind.com
> Subject: [PATCH v2] app/test: fix vdev test in test_eal_flags
> 
> In whitelist test, within EAL flags unit test, the vdev flag test fails
> because it is started in a secondary process, which is not able to
> allocate memzones and this is required to instanciate a pmd_ring.
> 
> This patch changes the vdev flag test to run it in a primary process.
> 
> Patch "app/test: fix build switches to enable cmdline tests"
> from Thomas Monjalon is needed for this patch.
> 
> Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
> ---
>  app/test/test_eal_flags.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
> index 1b80b80..4a50d37 100644
> --- a/app/test/test_eal_flags.c
> +++ b/app/test/test_eal_flags.c
> @@ -59,6 +59,7 @@
>  #define no_shconf "--no-shconf"
>  #define pci_whitelist "--pci-whitelist"
>  #define vdev "--vdev"
> +#define whitelist_prefix "whitelist"
>  #define memtest "memtest"
>  #define memtest1 "memtest1"
>  #define memtest2 "memtest2"
> @@ -314,7 +315,8 @@ test_whitelist_flag(void)
>  			pci_whitelist, "00FF:09:0B.3"};
>  	const char *wlval2[] = {prgname, prefix, mp_flag, "-n", "1", "-c", "1",
>  			pci_whitelist, "09:0B.3", pci_whitelist, "0a:0b.1"};
> -	const char *wlval3[] = {prgname, prefix, mp_flag, "-n", "1", "-c", "1",
> +	const char *wlval3[] = {prgname, "--file-prefix=" whitelist_prefix,
> +			"-n", "1", "-c", "1",
>  			pci_whitelist, "09:0B.3,type=test",
>  			pci_whitelist, "08:00.1,type=normal",
>  #ifdef RTE_LIBRTE_PMD_RING
> --
> 1.9.2

Thanks for this. It works fine :) Actually, I am thinking of creating a separate test
for vdev, out of whitelist test, as it has no relation with it. Do you agree on this?
Thanks,
Pablo


More information about the dev mailing list