[PATCH] test/event: skip test if no driver is present

Jerin Jacob jerinjacobk at gmail.com
Thu Feb 1 18:44:44 CET 2024


On Wed, Jan 24, 2024 at 6:03 PM David Marchand
<david.marchand at redhat.com> wrote:
>
> Align eventdev with what other device abstraction libraries do: if no
> driver is present, skip the tests.
>
> Fixes: f8f9d233ea0e ("test/eventdev: add unit tests")
> Cc: stable at dpdk.org
>
> Signed-off-by: David Marchand <david.marchand at redhat.com>

Applied to dpdk-next-eventdev/for-main. Thanks


> ---
>  app/test/test_eventdev.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c
> index 71de947ce4..e4e234dc98 100644
> --- a/app/test/test_eventdev.c
> +++ b/app/test/test_eventdev.c
> @@ -33,9 +33,15 @@ testsuite_setup(void)
>         uint8_t count;
>         count = rte_event_dev_count();
>         if (!count) {
> +               int ret;
> +
>                 printf("Failed to find a valid event device,"
> -                       " testing with event_skeleton device\n");
> -               return rte_vdev_init("event_skeleton", NULL);
> +                       " trying with event_skeleton device\n");
> +               ret = rte_vdev_init("event_skeleton", NULL);
> +               if (ret != 0) {
> +                       printf("No event device, skipping\n");
> +                       return TEST_SKIPPED;
> +               }
>         }
>         return TEST_SUCCESS;
>  }
> --
> 2.43.0
>


More information about the stable mailing list