Skip to content

Commit 4d6e7ac

Browse files
committed
test/objectstore/store_test: Adapt tests to write_v2
Tests that use original write path specific knowledge are failing now. Falling back to write_v1 in these tests. Signed-off-by: Adam Kupczyk <[email protected]>
1 parent 528813e commit 4d6e7ac

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

src/test/objectstore/store_test.cc

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,6 +1591,7 @@ TEST_P(StoreTestSpecificAUSize, ReproBug41901Test) {
15911591
if(string(GetParam()) != "bluestore")
15921592
return;
15931593

1594+
SetVal(g_conf(), "bluestore_write_v2", "false");
15941595
SetVal(g_conf(), "bluestore_max_blob_size", "524288");
15951596
SetVal(g_conf(), "bluestore_debug_enforce_settings", "hdd");
15961597
g_conf().apply_changes(nullptr);
@@ -1685,6 +1686,7 @@ TEST_P(StoreTestSpecificAUSize, ReproBug41901Test) {
16851686
TEST_P(StoreTestSpecificAUSize, BluestoreStatFSTest) {
16861687
if(string(GetParam()) != "bluestore")
16871688
return;
1689+
SetVal(g_conf(), "bluestore_write_v2", "false");
16881690
SetVal(g_conf(), "bluestore_block_db_path", "");
16891691
StartDeferred(65536);
16901692
SetVal(g_conf(), "bluestore_compression_mode", "force");
@@ -2215,6 +2217,7 @@ TEST_P(StoreTestSpecificAUSize, BluestoreStatFSTest) {
22152217
TEST_P(StoreTestSpecificAUSize, BluestoreFragmentedBlobTest) {
22162218
if(string(GetParam()) != "bluestore")
22172219
return;
2220+
SetVal(g_conf(), "bluestore_write_v2", "false");
22182221
SetVal(g_conf(), "bluestore_block_db_path", "");
22192222
StartDeferred(0x10000);
22202223

@@ -7341,6 +7344,7 @@ class DeferredReplayTest : public DeferredWriteTest {
73417344
TEST_P(DeferredReplayTest, DeferredReplay) {
73427345
const bool print = false;
73437346
deferred_test_t t = GetParam();
7347+
SetVal(g_conf(), "bluestore_write_v2", "false");
73447348
SetVal(g_conf(), "bdev_block_size", stringify(t.bdev_block_size).c_str());
73457349
SetVal(g_conf(), "bluestore_min_alloc_size", stringify(t.min_alloc_size).c_str());
73467350
SetVal(g_conf(), "bluestore_max_blob_size", stringify(t.max_blob_size).c_str());
@@ -7426,6 +7430,7 @@ TEST_P(DeferredReplayTest, DeferredReplay) {
74267430
TEST_P(DeferredReplayTest, DeferredReplayInReadOnly) {
74277431
const bool print = false;
74287432
deferred_test_t t = GetParam();
7433+
SetVal(g_conf(), "bluestore_write_v2", "false");
74297434
SetVal(g_conf(), "bdev_block_size", stringify(t.bdev_block_size).c_str());
74307435
SetVal(g_conf(), "bluestore_min_alloc_size", stringify(t.min_alloc_size).c_str());
74317436
SetVal(g_conf(), "bluestore_max_blob_size", stringify(t.max_blob_size).c_str());
@@ -8404,6 +8409,7 @@ TEST_P(StoreTestSpecificAUSize, DeferredOnBigOverwrite1) {
84048409
return;
84058410

84068411
size_t block_size = 4096;
8412+
SetVal(g_conf(), "bluestore_write_v2", "false");
84078413
StartDeferred(block_size);
84088414
SetVal(g_conf(), "bluestore_max_blob_size", "131072");
84098415
SetVal(g_conf(), "bluestore_prefer_deferred_size", "65536");
@@ -8588,6 +8594,7 @@ TEST_P(StoreTestSpecificAUSize, DeferredOnBigOverwrite2) {
85888594
return;
85898595

85908596
size_t block_size = 4096;
8597+
SetVal(g_conf(), "bluestore_write_v2", "false");
85918598
StartDeferred(block_size);
85928599
SetVal(g_conf(), "bluestore_max_blob_size", "131072");
85938600
SetVal(g_conf(), "bluestore_prefer_deferred_size", "65536");
@@ -8734,6 +8741,7 @@ TEST_P(StoreTestSpecificAUSize, DeferredOnBigOverwrite3) {
87348741
return;
87358742

87368743
size_t block_size = 4096;
8744+
SetVal(g_conf(), "bluestore_write_v2", "false");
87378745
StartDeferred(block_size);
87388746
SetVal(g_conf(), "bluestore_max_blob_size", "131072");
87398747
SetVal(g_conf(), "bluestore_prefer_deferred_size", "65536");
@@ -8896,6 +8904,7 @@ TEST_P(StoreTestSpecificAUSize, DeferredOnBigOverwrite4) {
88968904
return;
88978905

88988906
size_t block_size = 4096;
8907+
SetVal(g_conf(), "bluestore_write_v2", "false");
88998908
SetVal(g_conf(), "bluestore_block_db_create", "true");
89008909
SetVal(g_conf(), "bluestore_block_db_size", stringify(1 << 30).c_str());
89018910
StartDeferred(block_size);
@@ -8970,6 +8979,7 @@ TEST_P(StoreTestSpecificAUSize, DeferredOnBigOverwrite5) {
89708979
return;
89718980

89728981
size_t block_size = 4096;
8982+
SetVal(g_conf(), "bluestore_write_v2", "false");
89738983
SetVal(g_conf(), "bluestore_block_db_create", "true");
89748984
SetVal(g_conf(), "bluestore_block_db_size", stringify(1 << 30).c_str());
89758985
StartDeferred(block_size);
@@ -9047,6 +9057,7 @@ TEST_P(StoreTestSpecificAUSize, DeferredDifferentChunks) {
90479057
size_t large_object_size = 1 * 1024 * 1024;
90489058
size_t prefer_deferred_size = 65536;
90499059

9060+
SetVal(g_conf(), "bluestore_write_v2", "false");
90509061
SetVal(g_conf(), "bluestore_block_db_create", "true");
90519062
SetVal(g_conf(), "bluestore_block_db_size", stringify(1 << 30).c_str());
90529063

@@ -9469,6 +9480,7 @@ TEST_P(StoreTestSpecificAUSize, BlobReuseOnSmallOverwrite) {
94699480
return;
94709481

94719482
size_t block_size = 4096;
9483+
SetVal(g_conf(), "bluestore_write_v2", "false");
94729484
StartDeferred(block_size);
94739485
SetVal(g_conf(), "bluestore_max_blob_size", "65536");
94749486
g_conf().apply_changes(nullptr);
@@ -9629,9 +9641,9 @@ TEST_P(StoreTestSpecificAUSize, ReproBug56488Test) {
96299641

96309642
if (string(GetParam()) != "bluestore")
96319643
return;
9632-
96339644
size_t alloc_size = 65536;
96349645
size_t write_size = 4096;
9646+
SetVal(g_conf(), "bluestore_write_v2", "false");
96359647
SetVal(g_conf(), "bluestore_debug_enforce_settings", "hdd");
96369648
SetVal(g_conf(), "bluestore_block_db_create", "true");
96379649
SetVal(g_conf(), "bluestore_block_db_size", stringify(1 << 30).c_str());
@@ -9816,8 +9828,8 @@ TEST_P(StoreTestSpecificAUSize, garbageCollection) {
98169828
ASSERT_EQ(r, 0);\
98179829
}
98189830

9831+
SetVal(g_conf(), "bluestore_write_v2", "false");
98199832
StartDeferred(65536);
9820-
98219833
SetVal(g_conf(), "bluestore_compression_max_blob_size", "524288");
98229834
SetVal(g_conf(), "bluestore_compression_min_blob_size", "262144");
98239835
SetVal(g_conf(), "bluestore_max_blob_size", "524288");
@@ -11312,6 +11324,7 @@ TEST_P(StoreTestSpecificAUSize, BluestoreEnforceHWSettingsHdd) {
1131211324
if (string(GetParam()) != "bluestore")
1131311325
return;
1131411326

11327+
SetVal(g_conf(), "bluestore_write_v2", "false");
1131511328
SetVal(g_conf(), "bluestore_debug_enforce_settings", "hdd");
1131611329
StartDeferred(0x1000);
1131711330

@@ -11345,6 +11358,7 @@ TEST_P(StoreTestSpecificAUSize, BluestoreEnforceHWSettingsSsd) {
1134511358
if (string(GetParam()) != "bluestore")
1134611359
return;
1134711360

11361+
SetVal(g_conf(), "bluestore_write_v2", "false");
1134811362
SetVal(g_conf(), "bluestore_debug_enforce_settings", "ssd");
1134911363
StartDeferred(0x1000);
1135011364

@@ -11379,6 +11393,7 @@ TEST_P(StoreTestSpecificAUSize, ReproNoBlobMultiTest) {
1137911393
if(string(GetParam()) != "bluestore")
1138011394
return;
1138111395

11396+
SetVal(g_conf(), "bluestore_write_v2", "false");
1138211397
SetVal(g_conf(), "bluestore_block_db_create", "true");
1138311398
SetVal(g_conf(), "bluestore_block_db_size", "4294967296");
1138411399
SetVal(g_conf(), "bluestore_block_size", "12884901888");

0 commit comments

Comments
 (0)