Skip to content

Commit 994a988

Browse files
authored
Merge pull request ceph#60547 from MaxKellermann/without_bluestore
Fix two build failures with `WITH_BLUESTORE=no`
2 parents eb01854 + dff84f8 commit 994a988

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ add_executable(ceph_test_mutate
168168
target_link_libraries(ceph_test_mutate global librados ${BLKID_LIBRARIES}
169169
${CMAKE_DL_LIBS})
170170

171-
if(NOT WIN32)
171+
if(WITH_BLUESTORE AND NOT WIN32)
172172
# test_trans
173173
add_executable(test_trans
174174
test_trans.cc

src/test/objectstore/store_test.cc

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

203+
#ifdef WITH_BLUESTORE
203204

204205
class MultiLabelTest : public StoreTestDeferredSetup {
205206
public:
@@ -275,6 +276,8 @@ class MultiLabelTest : public StoreTestDeferredSetup {
275276
}
276277
};
277278

279+
#endif // WITH_BLUESTORE
280+
278281
class StoreTestSpecificAUSize : public StoreTestDeferredSetup {
279282

280283
public:
@@ -7199,14 +7202,15 @@ INSTANTIATE_TEST_SUITE_P(
71997202
StoreTestDeferredSetup,
72007203
::testing::Values(
72017204
"bluestore"));
7202-
#endif
72037205

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

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

7227+
#ifdef WITH_BLUESTORE
7228+
72237229
class DeferredWriteTest : public StoreTestFixture,
72247230
public ::testing::WithParamInterface<deferred_test_t> {
72257231
public:
@@ -7310,7 +7316,6 @@ TEST_P(DeferredWriteTest, NewData) {
73107316
}
73117317
}
73127318

7313-
#if defined(WITH_BLUESTORE)
73147319
INSTANTIATE_TEST_SUITE_P(
73157320
BlueStore,
73167321
DeferredWriteTest,
@@ -10971,6 +10976,8 @@ TEST_P(StoreTest, mergeRegionTest) {
1097110976
}
1097210977
}
1097310978

10979+
#ifdef WITH_BLUESTORE
10980+
1097410981
TEST_P(MultiLabelTest, MultiSelectableOff) {
1097510982
SetVal(g_conf(), "bluestore_bdev_label_multi", "false");
1097610983
g_conf().apply_changes(nullptr);
@@ -11293,6 +11300,8 @@ TEST_P(MultiLabelTest, UpgradeToMultiLabelCollisionWithObjects) {
1129311300
ASSERT_EQ(label.meta["multi"], "yes");
1129411301
}
1129511302

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

0 commit comments

Comments
 (0)