Re: [PATCH] test/event_eth_tx_adapter: skip tests if no eventdev

David Marchand <[email protected]>
Newsgroups org.dpdk.dev
Message-ID <CAJFAV8wu5ZF9gtG55eZKvSz_J-sE4DShoEX=_ZKXWC48+MMG7g@mail.gmail.com>
On Tue, 21 Jul 2026 at 13:57, Bruce Richardson
<[email protected]> wrote:
>
> If there is no eventdev present, and the SW eventdev driver is not
> available, skip the eth tx adapter tests, rather than failing on event
> creation.
>
> Note: We keep the failure case where we do have the event/sw driver
> built, but fail to create an instance of it.
>
> Signed-off-by: Bruce Richardson <[email protected]>
> ---
>  app/test/test_event_eth_tx_adapter.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/app/test/test_event_eth_tx_adapter.c b/app/test/test_event_eth_tx_adapter.c
> index bec298a8b8..18801028ce 100644
> --- a/app/test/test_event_eth_tx_adapter.c
> +++ b/app/test/test_event_eth_tx_adapter.c
> @@ -202,12 +202,13 @@ deinit_ports(void)
>  static int
>  testsuite_setup(void)
>  {
> -       const char *vdev_name = "event_sw0";
> -
>         int err = init_ports();
>         TEST_ASSERT(err == 0, "Port initialization failed err %d\n", err);
>
> +#ifdef RTE_EVENT_SW
>         if (rte_event_dev_count() == 0) {
> +               const char *vdev_name = "event_sw0";
> +
>                 printf("Failed to find a valid event device,"
>                         " testing with event_sw0 device\n");
>                 err = rte_vdev_init(vdev_name, NULL);
> @@ -215,6 +216,11 @@ testsuite_setup(void)
>                         vdev_name, err);
>                 event_dev_delete = 1;
>         }
> +#endif
> +       if (rte_event_dev_count() == 0) {
> +               printf("Failed to find a valid event device, skipping test\n");
> +               return TEST_SKIPPED;
> +       }

It seems strange to reevaluate this part here.

rte_vdev_init succeeded but we still have no eventdev object?
That should be a failure to me.


-- 
David Marchand
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.