]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/store_test: fix broken test case 42918/head
authorIgor Fedotov <ifedotov@suse.com>
Wed, 25 Aug 2021 12:37:19 +0000 (15:37 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Thu, 26 Aug 2021 11:02:35 +0000 (14:02 +0300)
After merging NCB stuff missed shared blob detection doesn't reveal
extent leak any more - which is expected. Hence we need to adjust the
relevant UT.

Fixes:https://tracker.ceph.com/issues/52398

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/test/objectstore/store_test.cc

index 950a326d127d18dee6665fc691d7ed9927d91d83..36f8efece999ddaa6884462cb9b0138bc915d0ce 100644 (file)
@@ -8624,8 +8624,16 @@ TEST_P(StoreTestSpecificAUSize, BluestoreBrokenNoSharedBlobRepairTest) {
   {
     cerr << "fscking/fixing" << std::endl;
     bstore->umount();
-    ASSERT_EQ(bstore->fsck(false), 3);
-    ASSERT_LE(bstore->repair(false), 3);
+    // 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 ?
+      2 :
+      3;
+    ASSERT_EQ(bstore->fsck(false), expected_error_count);
+    ASSERT_LE(bstore->repair(false), expected_error_count);
     ASSERT_EQ(bstore->fsck(false), 0);
   }