]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix a problem in store_test::BluestoreBrokenNoSharedBlobRepairTest where the check... 45615/head
authorGabriel BenHanokh <gbenhano@redhat.com>
Mon, 21 Mar 2022 10:54:10 +0000 (12:54 +0200)
committerGabriel BenHanokh <gbenhano@redhat.com>
Thu, 24 Mar 2022 08:33:20 +0000 (10:33 +0200)
The check need to access dynamic value and not config setting (which can be overridden)
Signed-off-by: Gabriel BenHanokh <gbenhano@redhat.com>
(cherry picked from commit 2969539d20a8157d62ae27f842c43b801efdc0ee)

src/test/objectstore/store_test.cc

index 661178879e23dcfb215c0559f2c082b3bd116c0b..64e6e60c0cdee5cae31c443107d0272d685a6bd2 100644 (file)
@@ -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);