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 <matias.elo@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
  • Loading branch information
MatiasElo committed Oct 9, 2024
1 parent 40d7ec3 commit 9d9a067
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 @@ -325,6 +325,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 @@ -340,10 +343,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 @@ -643,10 +644,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 9d9a067

Please sign in to comment.