DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] test/event: skip test if no driver is present
@ 2024-01-24 12:33 David Marchand
  2024-02-01 17:44 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: David Marchand @ 2024-01-24 12:33 UTC (permalink / raw)
  To: dev; +Cc: alosadag, stable, Jerin Jacob, Bruce Richardson

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@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] test/event: skip test if no driver is present
  2024-01-24 12:33 [PATCH] test/event: skip test if no driver is present David Marchand
@ 2024-02-01 17:44 ` Jerin Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2024-02-01 17:44 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, alosadag, stable, Jerin Jacob, Bruce Richardson

On Wed, Jan 24, 2024 at 6:03 PM David Marchand
<david.marchand@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@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-01 17:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-24 12:33 [PATCH] test/event: skip test if no driver is present David Marchand
2024-02-01 17:44 ` Jerin Jacob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).