From 159703c9dc6f7ff6750c6a6a59c86a15e06b4390 Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Tue, 31 Dec 2019 07:18:14 -0500 Subject: [PATCH] ut/blob: added poll_threads() after deleting blob For deletion to actually deliver results, poll_threads() has to be called. g_bserrno came from previous API call, not delete itself. This patch fixes it so that g_bserrno is from the delete itself. Next patch in series adds checks for number of clones. Having such checks in first place, would allow to notice lack of poll_threads() here before. Signed-off-by: Tomasz Zawadzki Change-Id: I3477f5c5b99106b70ee3d5706906a4dc94283180 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478975 Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto Tested-by: SPDK CI Jenkins --- test/unit/lib/blob/blob.c/blob_ut.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/unit/lib/blob/blob.c/blob_ut.c b/test/unit/lib/blob/blob.c/blob_ut.c index 3a2ef71a26..37982f95f8 100644 --- a/test/unit/lib/blob/blob.c/blob_ut.c +++ b/test/unit/lib/blob/blob.c/blob_ut.c @@ -695,6 +695,7 @@ blob_snapshot(void) CU_ASSERT(g_bserrno == 0); spdk_bs_delete_blob(bs, blobid, blob_op_complete, NULL); + poll_threads(); CU_ASSERT(g_bserrno == 0); CU_ASSERT_EQUAL(_get_snapshots_count(bs), 2);