From: Igor Fedotov Date: Wed, 9 Oct 2019 19:28:53 +0000 (+0300) Subject: test/store_test: fix test case broken by unifying bluefs/bluestore X-Git-Tag: v16.1.0~1536^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5da1d1eb3a251f67052ece701819ac7e2a6d68aa;p=ceph.git test/store_test: fix test case broken by unifying bluefs/bluestore allocator. Signed-off-by: Igor Fedotov --- diff --git a/src/test/objectstore/store_test.cc b/src/test/objectstore/store_test.cc index 878ec447be4..d8276d47cbc 100644 --- a/src/test/objectstore/store_test.cc +++ b/src/test/objectstore/store_test.cc @@ -7852,6 +7852,16 @@ TEST_P(StoreTestSpecificAUSize, BluestoreRepairTest) { return; const size_t offs_base = 65536 / 2; + + // Now we need standalone db to pass "false free fix" section below + // Due to new BlueFS allocation model (single allocator for main device) + // it might cause "false free" blob overwrite by BlueFS/DB stuff + // and hence fail the test case and corrupt data. + // + + SetVal(g_conf(), "bluestore_block_db_create", "true"); + SetVal(g_conf(), "bluestore_block_db_size", "4294967296"); + SetVal(g_conf(), "bluestore_fsck_on_mount", "false"); SetVal(g_conf(), "bluestore_fsck_on_umount", "false"); SetVal(g_conf(), "bluestore_max_blob_size", @@ -7936,8 +7946,9 @@ TEST_P(StoreTestSpecificAUSize, BluestoreRepairTest) { ASSERT_EQ(bstore->fsck(false), 0); ASSERT_EQ(bstore->mount(), 0); ASSERT_EQ(bstore->statfs(&statfs), 0); - // adjust free space to success in comparison + // adjust free/internal meta space to success in comparison statfs0.available = statfs.available; + statfs0.internal_metadata = statfs.internal_metadata; ASSERT_EQ(statfs0, statfs); ///////// undecodable shared blob key / stray shared blob records ///////