]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/objectstore: extend `#ifdef WITH_BLUESTORE` 61019/head
authorMax Kellermann <max.kellermann@ionos.com>
Mon, 28 Oct 2024 16:03:17 +0000 (17:03 +0100)
committerMax Kellermann <max.kellermann@ionos.com>
Tue, 10 Dec 2024 11:09:27 +0000 (12:09 +0100)
Cover all Bluestore specific code.  Fixes build failures with
`WITH_BLUESTORE=no`.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
src/test/objectstore/store_test.cc

index 38b62f3ea6da74808cd2b68e324d8b68f6fdd4d3..963e26095642795694dc93f14a336e2580e02058 100644 (file)
@@ -199,6 +199,7 @@ protected:
   }
 };
 
+#ifdef WITH_BLUESTORE
 
 class MultiLabelTest : public StoreTestDeferredSetup {
   public:
@@ -274,6 +275,8 @@ class MultiLabelTest : public StoreTestDeferredSetup {
   }
 };
 
+#endif // WITH_BLUESTORE
+
 class StoreTestSpecificAUSize : public StoreTestDeferredSetup {
 
 public:
@@ -7198,7 +7201,6 @@ INSTANTIATE_TEST_SUITE_P(
   StoreTestDeferredSetup,
   ::testing::Values(
     "bluestore"));
-#endif
 
 INSTANTIATE_TEST_SUITE_P(
   ObjectStore,
@@ -7206,6 +7208,8 @@ INSTANTIATE_TEST_SUITE_P(
   ::testing::Values(
     "bluestore"));
 
+#endif // WITH_BLUESTORE
+
 struct deferred_test_t {
   uint32_t bdev_block_size;
   uint32_t min_alloc_size;
@@ -7219,6 +7223,8 @@ void PrintTo(const deferred_test_t& t, ::std::ostream* os)
       << t.max_blob_size << "/" << t.prefer_deferred_size;
 }
 
+#ifdef WITH_BLUESTORE
+
 class DeferredWriteTest : public StoreTestFixture,
                          public ::testing::WithParamInterface<deferred_test_t> {
 public:
@@ -7309,7 +7315,6 @@ TEST_P(DeferredWriteTest, NewData) {
   }
 }
 
-#if defined(WITH_BLUESTORE)
 INSTANTIATE_TEST_SUITE_P(
   BlueStore,
   DeferredWriteTest,
@@ -10970,6 +10975,8 @@ TEST_P(StoreTest, mergeRegionTest) {
   }
 }
 
+#ifdef WITH_BLUESTORE
+
 TEST_P(MultiLabelTest, MultiSelectableOff) {
   SetVal(g_conf(), "bluestore_bdev_label_multi", "false");
   g_conf().apply_changes(nullptr);
@@ -11292,6 +11299,8 @@ TEST_P(MultiLabelTest, UpgradeToMultiLabelCollisionWithObjects) {
   ASSERT_EQ(label.meta["multi"], "yes");
 }
 
+#endif // WITH_BLUESTORE
+
 TEST_P(StoreTestSpecificAUSize, BluestoreEnforceHWSettingsHdd) {
   if (string(GetParam()) != "bluestore")
     return;