[dpdk-dev] [PATCH v2 1/2] tests: Fix unit tests for shared builds

Thomas Monjalon thomas at monjalon.net
Fri Aug 2 23:51:45 CEST 2019


02/08/2019 23:25, Aaron Conole:
> From: Michael Santana <msantana at redhat.com>
> 
> Currently many unit tests fail when running tests under shared builds.
> This happens because of missing driver dependencies. This is fixed by
> explicitly linking in missing drivers for the test application.
> 
> before and after (clang):
> https://travis-ci.com/Maickii/dpdk-2/jobs/212329160#L623
> https://travis-ci.com/Maickii/dpdk-2/jobs/212335912#L620
> 
> Suggested-by: Bruce Richardson <bruce.richardson at intel.com>
> Suggested-by: David Marchand <david.marchand at redhat.com>
> Signed-off-by: Michael Santana <msantana at redhat.com>
> Signed-off-by: Aaron Conole <aconole at redhat.com>
> Acked-by: Bruce Richardson <bruce.richardson at intel.com>
> Reviewed-by: David Marchand <david.marchand at redhat.com>
> ---
>  app/test/meson.build | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/app/test/meson.build b/app/test/meson.build
> index e8a898eb6..8afd21dff 100644
> --- a/app/test/meson.build
> +++ b/app/test/meson.build
> +# The following linkages are an exception to allow running the
> +# unit tests without requiring that the developer install the
> +# DPDK libraries.  Explicit linkage in applications should not
> +# be used.
> +if dpdk_conf.has('RTE_LIBRTE_RING_MEMPOOL')
> +	test_deps += 'mempool_ring'
> +endif
> +if dpdk_conf.has('RTE_LIBRTE_STACK_MEMPOOL')
> +	test_deps += 'mempool_stack'
> +endif
> +if dpdk_conf.has('RTE_LIBRTE_SKELETON_EVENTDEV_PMD')
> +	test_deps += 'pmd_skeleton_event'
> +endif
>  if dpdk_conf.has('RTE_LIBRTE_PDUMP')
>  	test_deps += 'pdump'
>  endif

I did some changes in comments and line spacing, so it looks like below.
Sorry for doing this change myself, I want to allow you running this CI
as soon as possible.

# The following linkages are an exception to allow running the
# unit tests without requiring that the developer install the
# DPDK libraries.  Explicit linkage of drivers (plugin libraries)
# in applications should not be used.
if dpdk_conf.has('RTE_LIBRTE_RING_MEMPOOL')
    test_deps += 'mempool_ring'
endif
if dpdk_conf.has('RTE_LIBRTE_STACK_MEMPOOL')
    test_deps += 'mempool_stack'
endif
if dpdk_conf.has('RTE_LIBRTE_SKELETON_EVENTDEV_PMD')
    test_deps += 'pmd_skeleton_event'
endif

# The following linkages of drivers are required because
# they are used via a driver-specific API.
if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
    test_deps += 'pmd_bond'
endif
if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
    test_deps += 'pmd_ring'
endif

if dpdk_conf.has('RTE_LIBRTE_POWER')
    test_deps += 'power'
endif
if dpdk_conf.has('RTE_LIBRTE_KNI')
    test_deps += 'kni'
endif
if dpdk_conf.has('RTE_LIBRTE_PDUMP')
    test_deps += 'pdump'
endif





More information about the dev mailing list