[PATCH 06/10] test/devargs: check driver presence with public API
David Marchand
david.marchand at redhat.com
Fri Jul 17 12:08:01 CEST 2026
On Fri, 17 Jul 2026 at 11:56, Bruce Richardson
<bruce.richardson at intel.com> wrote:
>
> On Fri, Jul 17, 2026 at 11:30:01AM +0200, David Marchand wrote:
> > Let's avoid calling internal drivers API.
> >
> > Signed-off-by: David Marchand <david.marchand at redhat.com>
> > ---
> Acked-by: Bruce Richardson <bruce.richardson at intel.com>
>
> One suggestion inline below.
>
> > app/test/test_devargs.c | 10 +++++++---
> > 1 file changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c
> > index 0bd14c24ec..6c194ecfc6 100644
> > --- a/app/test/test_devargs.c
> > +++ b/app/test/test_devargs.c
> > @@ -10,7 +10,7 @@
> > #include <rte_common.h>
> > #include <rte_devargs.h>
> > #include <rte_kvargs.h>
> > -#include <bus_driver.h>
> > +#include <rte_bus.h>
> > #include <rte_class.h>
> >
> > #include "test.h"
> > @@ -167,14 +167,18 @@ test_valid_devargs(void)
> > { "net_ring0,iface=test,path=/class/bus/,queues=1",
> > 0, 0, 3, "vdev", "net_ring0", NULL },
> > };
> > - struct rte_bus *vdev_bus = rte_bus_find_by_name("vdev");
> > + struct rte_devargs da;
> > int ret;
> >
> > ret = test_valid_devargs_cases(list, RTE_DIM(list));
> > - if (vdev_bus != NULL && vdev_bus->parse("net_ring0", NULL) == 0)
> > +
> > + memset(&da, 0, sizeof(da));
> > + if (rte_devargs_parse(&da, "net_ring0") == 0)
>
> From what I/AI can see, there is nothing in this test case that requires
(you could write it as "From what A?I can see")
> the ring PMD specifically. I think it would be good if it were updated to
> use net/null, so that we standardize on our basic unit tests only relying
> upon that PMD, rather than requiring a variety of drivers. WDYT?
There may be a hidden (capillotracté) reason.
Passing path=/class/bus/ seems to be intended at catching errors in
devargs parsing.
No argument in net/null could accept such string.
--
David Marchand
More information about the dev
mailing list