ut/blob: always refer to local bs pointer, rather than g_bs
Couple unit tests were still refering to g_bs pointer, rather than the one local to particular UT. This patch fixes this. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: If343eb561a48c4547d499139d76e1db6b2d7f3bf Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1090 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
8b27fbba38
commit
9e6b5aa4c2
@ -2964,8 +2964,8 @@ bs_load_custom_cluster_size(void)
|
||||
CU_ASSERT(g_bserrno == 0);
|
||||
SPDK_CU_ASSERT_FATAL(g_bs != NULL);
|
||||
bs = g_bs;
|
||||
cluster_sz = g_bs->cluster_sz;
|
||||
total_clusters = g_bs->total_clusters;
|
||||
cluster_sz = bs->cluster_sz;
|
||||
total_clusters = bs->total_clusters;
|
||||
|
||||
/* Unload the blob store */
|
||||
spdk_bs_unload(bs, bs_op_complete, NULL);
|
||||
@ -2988,8 +2988,8 @@ bs_load_custom_cluster_size(void)
|
||||
SPDK_CU_ASSERT_FATAL(g_bs != NULL);
|
||||
bs = g_bs;
|
||||
/* Compare cluster size and number to one after initialization */
|
||||
CU_ASSERT(cluster_sz == g_bs->cluster_sz);
|
||||
CU_ASSERT(total_clusters == g_bs->total_clusters);
|
||||
CU_ASSERT(cluster_sz == bs->cluster_sz);
|
||||
CU_ASSERT(total_clusters == bs->total_clusters);
|
||||
|
||||
super_block = (struct spdk_bs_super_block *)g_dev_buffer;
|
||||
CU_ASSERT(super_block->clean == 1);
|
||||
@ -4056,7 +4056,7 @@ blob_dirty_shutdown(void)
|
||||
/* Mark second blob as invalid */
|
||||
page_num = _spdk_bs_blobid_to_page(blobid2);
|
||||
|
||||
index = DEV_BUFFER_BLOCKLEN * (g_bs->md_start + page_num);
|
||||
index = DEV_BUFFER_BLOCKLEN * (bs->md_start + page_num);
|
||||
page = (struct spdk_blob_md_page *)&g_dev_buffer[index];
|
||||
page->sequence_num = 1;
|
||||
page->crc = _spdk_blob_md_page_calc_crc(page);
|
||||
|
Loading…
x
Reference in New Issue
Block a user