* [PATCH] test/event_eth_tx_adapter: skip tests if no eventdev
@ 2026-07-21 11:56 Bruce Richardson
2026-07-21 12:07 ` David Marchand
2026-07-21 13:23 ` [PATCH v2] " Bruce Richardson
0 siblings, 2 replies; 4+ messages in thread
From: Bruce Richardson @ 2026-07-21 11:56 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson, Naga Harish K S V
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 <bruce.richardson@intel.com>
---
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;
+ }
return err;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] test/event_eth_tx_adapter: skip tests if no eventdev
2026-07-21 11:56 [PATCH] test/event_eth_tx_adapter: skip tests if no eventdev Bruce Richardson
@ 2026-07-21 12:07 ` David Marchand
2026-07-21 12:31 ` Bruce Richardson
2026-07-21 13:23 ` [PATCH v2] " Bruce Richardson
1 sibling, 1 reply; 4+ messages in thread
From: David Marchand @ 2026-07-21 12:07 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, Naga Harish K S V
On Tue, 21 Jul 2026 at 13:57, Bruce Richardson
<bruce.richardson@intel.com> 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 <bruce.richardson@intel.com>
> ---
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] test/event_eth_tx_adapter: skip tests if no eventdev
2026-07-21 12:07 ` David Marchand
@ 2026-07-21 12:31 ` Bruce Richardson
0 siblings, 0 replies; 4+ messages in thread
From: Bruce Richardson @ 2026-07-21 12:31 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Naga Harish K S V
On Tue, Jul 21, 2026 at 02:07:23PM +0200, David Marchand wrote:
> On Tue, 21 Jul 2026 at 13:57, Bruce Richardson
> <bruce.richardson@intel.com> 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 <bruce.richardson@intel.com>
> > ---
> > 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.
>
This is meant to catch the case where we don't have RTE_EVENT_SW. However,
I can rework the change to avoid checking twice in the case we do have it.
/Bruce
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] test/event_eth_tx_adapter: skip tests if no eventdev
2026-07-21 11:56 [PATCH] test/event_eth_tx_adapter: skip tests if no eventdev Bruce Richardson
2026-07-21 12:07 ` David Marchand
@ 2026-07-21 13:23 ` Bruce Richardson
1 sibling, 0 replies; 4+ messages in thread
From: Bruce Richardson @ 2026-07-21 13:23 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson, Naga Harish K S V
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 <bruce.richardson@intel.com>
---
app/test/test_event_eth_tx_adapter.c | 9 +++++++--
1 file changed, 7 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..0c161897ce 100644
--- a/app/test/test_event_eth_tx_adapter.c
+++ b/app/test/test_event_eth_tx_adapter.c
@@ -202,18 +202,23 @@ 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);
if (rte_event_dev_count() == 0) {
+#ifdef RTE_EVENT_SW
+ 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);
TEST_ASSERT(err == 0, "vdev %s creation failed %d\n",
vdev_name, err);
event_dev_delete = 1;
+#else
+ printf("Failed to find a valid event device, skipping test\n");
+ return TEST_SKIPPED;
+#endif
}
return err;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-07-21 13:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-21 11:56 [PATCH] test/event_eth_tx_adapter: skip tests if no eventdev Bruce Richardson
2026-07-21 12:07 ` David Marchand
2026-07-21 12:31 ` Bruce Richardson
2026-07-21 13:23 ` [PATCH v2] " Bruce Richardson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox