DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Abdullah Sevincer <abdullah.sevincer@intel.com>,
	stable@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH] event/dlb2: fix name check in selftest
Date: Tue,  7 Nov 2023 16:37:13 +0000	[thread overview]
Message-ID: <20231107163713.55037-1-bruce.richardson@intel.com> (raw)

When running the dlb2 selftests the driver name check was incorrect,
causing all checks to be skipped for a dlb2 device. We use the
"event_dlb2" only as a prefix check, as driver may have suffixes, e.g.
appear as "event_dlb2_pf".

Fixes: 6f1b82886e8a ("event/dlb2: add self-tests")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/event/dlb2/dlb2_selftest.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/event/dlb2/dlb2_selftest.c b/drivers/event/dlb2/dlb2_selftest.c
index 1863ffe049..62aa11d981 100644
--- a/drivers/event/dlb2/dlb2_selftest.c
+++ b/drivers/event/dlb2/dlb2_selftest.c
@@ -1475,7 +1475,7 @@ do_selftest(void)
 int
 test_dlb2_eventdev(void)
 {
-	const char *dlb2_eventdev_name = "dlb2_event";
+	const char *dlb2_eventdev_name = "event_dlb2";
 	uint8_t num_evdevs = rte_event_dev_count();
 	int i, ret = 0;
 	int found = 0, skipped = 0, passed = 0, failed = 0;
@@ -1489,7 +1489,7 @@ test_dlb2_eventdev(void)
 
 		/* skip non-dlb2 event devices */
 		if (strncmp(info.driver_name, dlb2_eventdev_name,
-			    sizeof(*info.driver_name)) != 0) {
+				strlen(dlb2_eventdev_name)) != 0) {
 			skipped++;
 			continue;
 		}
-- 
2.39.2


             reply	other threads:[~2023-11-07 16:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07 16:37 Bruce Richardson [this message]
2023-11-07 17:14 ` Sevincer, Abdullah
2023-11-09 10:34   ` 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=20231107163713.55037-1-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=abdullah.sevincer@intel.com \
    --cc=dev@dpdk.org \
    --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).