Skip to content

Commit dff84f8

Browse files
committed
test/objectstore: extend #ifdef WITH_BLUESTORE
Cover all Bluestore specific code. Fixes build failures with `WITH_BLUESTORE=no`. Signed-off-by: Max Kellermann <[email protected]>
1 parent d67934b commit dff84f8

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/test/objectstore/store_test.cc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ class StoreTestDeferredSetup : public StoreTest {
199199
}
200200
};
201201

202+
#ifdef WITH_BLUESTORE
202203

203204
class MultiLabelTest : public StoreTestDeferredSetup {
204205
public:
@@ -274,6 +275,8 @@ class MultiLabelTest : public StoreTestDeferredSetup {
274275
}
275276
};
276277

278+
#endif // WITH_BLUESTORE
279+
277280
class StoreTestSpecificAUSize : public StoreTestDeferredSetup {
278281

279282
public:
@@ -7198,14 +7201,15 @@ INSTANTIATE_TEST_SUITE_P(
71987201
StoreTestDeferredSetup,
71997202
::testing::Values(
72007203
"bluestore"));
7201-
#endif
72027204

72037205
INSTANTIATE_TEST_SUITE_P(
72047206
ObjectStore,
72057207
MultiLabelTest,
72067208
::testing::Values(
72077209
"bluestore"));
72087210

7211+
#endif // WITH_BLUESTORE
7212+
72097213
struct deferred_test_t {
72107214
uint32_t bdev_block_size;
72117215
uint32_t min_alloc_size;
@@ -7219,6 +7223,8 @@ void PrintTo(const deferred_test_t& t, ::std::ostream* os)
72197223
<< t.max_blob_size << "/" << t.prefer_deferred_size;
72207224
}
72217225

7226+
#ifdef WITH_BLUESTORE
7227+
72227228
class DeferredWriteTest : public StoreTestFixture,
72237229
public ::testing::WithParamInterface<deferred_test_t> {
72247230
public:
@@ -7309,7 +7315,6 @@ TEST_P(DeferredWriteTest, NewData) {
73097315
}
73107316
}
73117317

7312-
#if defined(WITH_BLUESTORE)
73137318
INSTANTIATE_TEST_SUITE_P(
73147319
BlueStore,
73157320
DeferredWriteTest,
@@ -10970,6 +10975,8 @@ TEST_P(StoreTest, mergeRegionTest) {
1097010975
}
1097110976
}
1097210977

10978+
#ifdef WITH_BLUESTORE
10979+
1097310980
TEST_P(MultiLabelTest, MultiSelectableOff) {
1097410981
SetVal(g_conf(), "bluestore_bdev_label_multi", "false");
1097510982
g_conf().apply_changes(nullptr);
@@ -11292,6 +11299,8 @@ TEST_P(MultiLabelTest, UpgradeToMultiLabelCollisionWithObjects) {
1129211299
ASSERT_EQ(label.meta["multi"], "yes");
1129311300
}
1129411301

11302+
#endif // WITH_BLUESTORE
11303+
1129511304
TEST_P(StoreTestSpecificAUSize, BluestoreEnforceHWSettingsHdd) {
1129611305
if (string(GetParam()) != "bluestore")
1129711306
return;

0 commit comments

Comments
 (0)