Re: [PATCH v7 6/7] test/pcapng: skip test if null driver missing

Stephen Hemminger
2026-02-16T16:26:27Z

On Mon, 16 Feb 2026 11:01:34 +0100
David Marchand <david.marchand@redhat.com> wrote:

> On Fri, 13 Feb 2026 at 20:21, Stephen Hemminger
> <stephen@networkplumber.org> wrote:
> >
> > If null PMD is disabled in the build via -Ddisable_drivers=null
> > then do not build pcapng test.
> >
> > Fixes: 6f01a3ca5c7f ("test: fix dependency on pcapng")
>
> There was no dependency on net/null at this point in git history.
> Instead, this fix is about:
> Fixes: 0c614a0fa6c6 ("test/pcapng: cleanup")
>
>
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>
>

The point is if the null driver is disabled the test would always fail.
The commit log is incorrect, the flag would be -Ddisable_drivers=net/null

Seemed better to just not build the test if the driver isn't there.
Alternative is to detect it and marked as SKIPPED. But vdev_init
error codes are very broad, and my preference is to save space/time.

# DPDK_TEST=pcapng_autotest ./build/app/dpdk-test --no-huge -m 2048
EAL: Detected CPU lcores: 32
EAL: Detected NUMA nodes: 1
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
APP: HPET is not enabled, using TSC as default timer
RTE>>pcapng_autotest
+ ------------------------------------------------------- +
+ Test Suite : Test Pcapng Unit Test Suite
Failed to create vdev 'net_null0'