From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: alosadag@redhat.com, stable@dpdk.org,
Jerin Jacob <jerinj@marvell.com>,
Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH] test/event: skip test if no driver is present
Date: Wed, 24 Jan 2024 13:33:38 +0100 [thread overview]
Message-ID: <20240124123338.551436-1-david.marchand@redhat.com> (raw)
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
next reply other threads:[~2024-01-24 12:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 12:33 David Marchand [this message]
2024-02-01 17:44 ` Jerin Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240124123338.551436-1-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=alosadag@redhat.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).