Skip to content

Commit

Permalink
event/dlb2: fix name check in self-test
Browse files Browse the repository at this point in the history
[ upstream commit 3dd079fae9f0b210ed0fd9a192fb0586822ad9a5 ]

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: 6f1b828 ("event/dlb2: add self-tests")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Abdullah Sevincer <abdullah.sevincer@intel.com>
  • Loading branch information
bruce-richardson authored and bluca committed Nov 15, 2023
1 parent 248ea5c commit 2d5c287
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/event/dlb2/dlb2_selftest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit 2d5c287

Please sign in to comment.