ut/blob: add fatal asserts for allocations
Change-Id: I9b1c8a1be8e6bce705ba6c549957e82e492038cc Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/375623 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
34f66f237c
commit
8f10b6b875
@ -65,6 +65,7 @@ _bs_send_msg(spdk_thread_fn fn, void *ctx, void *thread_ctx)
|
||||
if (g_scheduler_delay) {
|
||||
struct scheduled_ops *ops = calloc(1, sizeof(*ops));
|
||||
|
||||
SPDK_CU_ASSERT_FATAL(ops != NULL);
|
||||
ops->fn = fn;
|
||||
ops->ctx = ctx;
|
||||
TAILQ_INSERT_TAIL(&g_scheduled_ops, ops, ops_queue);
|
||||
@ -630,6 +631,7 @@ blob_rw_verify_iov(void)
|
||||
CU_ASSERT(memcmp(payload_write, payload_read, 10 * 4096) == 0);
|
||||
|
||||
buf = calloc(1, 256 * 4096);
|
||||
SPDK_CU_ASSERT_FATAL(buf != NULL);
|
||||
/* Check that cluster 2 on "disk" was not modified. */
|
||||
CU_ASSERT(memcmp(buf, &g_dev_buffer[512 * 4096], 256 * 4096) == 0);
|
||||
free(buf);
|
||||
|
Loading…
Reference in New Issue
Block a user