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

Aaron Conole aconole at redhat.com
Fri Aug 2 23:25:51 CEST 2019

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):

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
@@ -297,6 +297,19 @@ dump_test_names = [
+# 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'
+if dpdk_conf.has('RTE_LIBRTE_STACK_MEMPOOL')
+	test_deps += 'mempool_stack'
+	test_deps += 'pmd_skeleton_event'
 if dpdk_conf.has('RTE_LIBRTE_PDUMP')
 	test_deps += 'pdump'

More information about the dev mailing list