scsi_bdev_ut: add SPDK_CU_ASSERT_FATAL before put task.
Like other test, need to add SPDK_CU_ASSERT_FATAL(TAILQ_EMPTY(&g_bdev_io_queue)).
To avoid issue:
scsi_bdev_ut.c:956:2: warning: Address of stack memory associated with local
variable 'task' is still referred to by the global variable 'g_io_wait_queue'
upon returning to the caller. This will be a dangling reference
ut_put_task(&task);
^~~~~~~~~~~~~~~~~~
waiting exit from while loop in ut_bdev_io_flush.
This is related to issue #822.
Change-Id: If390f5076582a0149646f0c2a408c3bcd3b4fab6
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459534
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
9c9709b9b1
commit
310fc0b5d5
@ -953,6 +953,8 @@ _xfer_test(bool bdev_io_pool_full)
|
||||
CU_ASSERT(task.status == SPDK_SCSI_STATUS_GOOD);
|
||||
CU_ASSERT(g_scsi_cb_called == 1);
|
||||
g_scsi_cb_called = 0;
|
||||
SPDK_CU_ASSERT_FATAL(TAILQ_EMPTY(&g_bdev_io_queue));
|
||||
|
||||
ut_put_task(&task);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user