From: Gabriel BenHanokh Date: Mon, 21 Mar 2022 10:54:10 +0000 (+0200) Subject: Fix a problem in store_test::BluestoreBrokenNoSharedBlobRepairTest where the check... X-Git-Tag: v18.0.0~1201^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F45340%2Fhead;p=ceph.git Fix a problem in store_test::BluestoreBrokenNoSharedBlobRepairTest where the check for active null-fm was wrong and so reporting bogus errors when null-fm was inactive The check need to access dynamic value and not config setting (which can be overridden) Signed-off-by: Gabriel BenHanokh --- diff --git a/src/test/objectstore/store_test.cc b/src/test/objectstore/store_test.cc index 661178879e2..64e6e60c0cd 100644 --- a/src/test/objectstore/store_test.cc +++ b/src/test/objectstore/store_test.cc @@ -9366,13 +9366,15 @@ TEST_P(StoreTestSpecificAUSize, BluestoreBrokenNoSharedBlobRepairTest) { { cerr << "fscking/fixing" << std::endl; + // we need to check for null-manager before umount() + bool has_null_manager = bstore->has_null_manager(); bstore->umount(); // depending on the allocation map's source we can // either observe or don't observe an additional // extent leak detection. Hence adjusting the expected // value size_t expected_error_count = - g_ceph_context->_conf->bluestore_allocation_from_file ? + has_null_manager ? 5: // 4 sb ref mismatch errors + 1 statfs mismatch 7; // 4 sb ref mismatch errors + 1 statfs + 1 block leak + 1 non-free ASSERT_EQ(bstore->fsck(false), expected_error_count);