tests: spsc_pbuf: Check return code

Make check_buffer() call useful.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
Andrei Emeltchenko 2023-01-11 15:48:02 +02:00 committed by Fabio Baltieri
commit 8f4d8c5cce

View file

@ -436,7 +436,7 @@ bool stress_read(void *user_data, uint32_t cnt, bool last, int prio)
zassert_true(false, "Unexpected error: %d, cnt:%d", len, ctx->read_cnt);
}
check_buffer(buf, len, ctx->read_cnt);
zassert_ok(check_buffer(buf, len, ctx->read_cnt));
ctx->read_cnt++;
}
@ -499,7 +499,7 @@ bool stress_claim_free(void *user_data, uint32_t cnt, bool last, int prio)
return true;
}
check_buffer(buf, len, ctx->read_cnt);
zassert_ok(check_buffer(buf, len, ctx->read_cnt));
spsc_pbuf_free(ctx->pbuf, len);