Skip to content

Commit

Permalink
test: queue_perf: clarify error messages
Browse files Browse the repository at this point in the history
Avoid misleading error messages when queue capabilities don't match given
application options.

Signed-off-by: Matias Elo <[email protected]>
  • Loading branch information
MatiasElo committed Oct 2, 2024
1 parent f489c7a commit 77703ee
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/performance/odp_queue_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ static int create_queues(test_global_t *global)
odp_event_free(event[i]);
}

if (ret)
ODPH_ERR("Initializing test queues failed.\n");

return ret;
}

Expand All @@ -343,10 +346,8 @@ static int destroy_queues(test_global_t *global)
odp_pool_t pool = global->pool;

for (i = 0; i < num_queue; i++) {
if (queue[i] == ODP_QUEUE_INVALID) {
ODPH_ERR("Invalid queue handle (i: %u).\n", i);
if (queue[i] == ODP_QUEUE_INVALID)
break;
}

for (j = 0; j < num_event; j++) {
ev = odp_queue_deq(queue[i]);
Expand Down Expand Up @@ -646,10 +647,8 @@ int main(int argc, char **argv)

global->instance = instance;

if (create_queues(global)) {
ODPH_ERR("Create queues failed.\n");
if (create_queues(global))
goto destroy;
}

if (start_workers(global)) {
ODPH_ERR("Test start failed.\n");
Expand Down

0 comments on commit 77703ee

Please sign in to comment.