[PATCH v2 4/4] build/tests: add warning for missing NULL PMD dependency

Bruce Richardson
2026-02-19T17:40:36Z

In developer builds, warn the user if they are building the unit tests
but don't have net_null enabled, since a number of suites and test cases
within suites depend on that to create dummy ethdev devices for testing.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
app/test/meson.build | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/app/test/meson.build b/app/test/meson.build
index 31c966d97e..5dde50b181 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -218,6 +218,12 @@ source_file_ext_deps = {
'test_pcapng.c': ['pcap'],
}

+# the NULL ethdev is used by a number of tests, in some cases as an optional dependency.
+# for developer builds, warn user if its missing and we are building the tests.
+if not dpdk_conf.has('RTE_NET_NULL') and developer_mode
+ warning('For unit testing, the net/null PMD should be enabled in the build to enable tests that depend on it.')
+endif
+
def_lib = get_option('default_library')
foreach f, f_deps : source_file_deps
has_deps = true
--
2.51.0