]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librados: SKIP_IF_CRIMSON remaining ec/cache tests 48516/head
authorSamuel Just <sjust@redhat.com>
Sun, 16 Oct 2022 22:04:32 +0000 (22:04 +0000)
committerSamuel Just <sjust@redhat.com>
Tue, 14 Feb 2023 06:36:36 +0000 (22:36 -0800)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/test/librados/TestCase.cc
src/test/librados/misc_cxx.cc
src/test/librados/pool.cc
src/test/librados/testcase_cxx.cc
src/test/librados/tier_cxx.cc

index d16fb8599d5b70630899821110564fc795f37733..e99c19273f854b0f2904dfe8e78b387a830a9c24 100644 (file)
@@ -67,6 +67,7 @@ rados_t RadosTestECNS::s_cluster = NULL;
 
 void RadosTestECNS::SetUpTestCase()
 {
+  SKIP_IF_CRIMSON();
   auto pool_prefix = fmt::format("{}_", ::testing::UnitTest::GetInstance()->current_test_case()->name());
   pool_name = get_temp_pool_name(pool_prefix);
   ASSERT_EQ("", create_one_ec_pool(pool_name, &s_cluster));
@@ -74,6 +75,7 @@ void RadosTestECNS::SetUpTestCase()
 
 void RadosTestECNS::TearDownTestCase()
 {
+  SKIP_IF_CRIMSON();
   ASSERT_EQ(0, destroy_one_ec_pool(pool_name, &s_cluster));
 }
 
@@ -163,6 +165,7 @@ rados_t RadosTestEC::s_cluster = NULL;
 
 void RadosTestEC::SetUpTestCase()
 {
+  SKIP_IF_CRIMSON();
   auto pool_prefix = fmt::format("{}_", ::testing::UnitTest::GetInstance()->current_test_case()->name()); 
   pool_name = get_temp_pool_name(pool_prefix);
   ASSERT_EQ("", create_one_ec_pool(pool_name, &s_cluster));
@@ -170,11 +173,13 @@ void RadosTestEC::SetUpTestCase()
 
 void RadosTestEC::TearDownTestCase()
 {
+  SKIP_IF_CRIMSON();
   ASSERT_EQ(0, destroy_one_ec_pool(pool_name, &s_cluster));
 }
 
 void RadosTestEC::SetUp()
 {
+  SKIP_IF_CRIMSON();
   cluster = RadosTestEC::s_cluster;
   ASSERT_EQ(0, rados_ioctx_create(cluster, pool_name.c_str(), &ioctx));
   nspace = get_temp_pool_name();
@@ -188,6 +193,7 @@ void RadosTestEC::SetUp()
 
 void RadosTestEC::TearDown()
 {
+  SKIP_IF_CRIMSON();
   if (cleanup) {
     cleanup_default_namespace(ioctx);
     cleanup_namespace(ioctx, nspace);
index dd7e52e8ebd1df74a2d9b438aabfa113a6015c96..545d5e57bdff8dbf749010dd5d9a17870be20578 100644 (file)
@@ -473,6 +473,7 @@ public:
   ~LibRadosTwoPoolsECPP() override {};
 protected:
   static void SetUpTestCase() {
+    SKIP_IF_CRIMSON();
     pool_name = get_temp_pool_name();
     ASSERT_EQ("", create_one_ec_pool_pp(pool_name, s_cluster));
     src_pool_name = get_temp_pool_name();
@@ -487,6 +488,7 @@ protected:
     src_ioctx.application_enable("rados", true);
   }
   static void TearDownTestCase() {
+    SKIP_IF_CRIMSON();
     ASSERT_EQ(0, s_cluster.pool_delete(src_pool_name.c_str()));
     ASSERT_EQ(0, destroy_one_ec_pool_pp(pool_name, s_cluster));
   }
index 19a170ed27bf99b23816931120d39b8fa1f888c6..a85d8f3a830622b62e59434c1b2c70a50e7be3a5 100644 (file)
@@ -1,5 +1,6 @@
 #include <errno.h>
 #include <vector>
+#include "crimson_utils.h"
 #include "gtest/gtest.h"
 #include "include/rados/librados.h"
 #include "test/librados/test.h"
@@ -135,6 +136,7 @@ TEST(LibRadosPools, PoolCreateWithCrushRule) {
 }
 
 TEST(LibRadosPools, PoolGetBaseTier) {
+  SKIP_IF_CRIMSON();
   rados_t cluster;
   std::string pool_name = get_temp_pool_name();
   ASSERT_EQ("", create_one_pool(pool_name, &cluster));
index 77bdbf0fe2d8141b0a018df90c97566b9908ff3e..407c59b552ea42b5fd7baef3dceea7c91baacb6b 100644 (file)
@@ -7,6 +7,7 @@
 #include <fmt/format.h>
 #include "test_cxx.h"
 #include "test_shared.h"
+#include "crimson_utils.h"
 #include "include/scope_guard.h"
 
 using namespace librados;
@@ -103,9 +104,10 @@ void RadosTestParamPPNS::TearDownTestCase()
 
 void RadosTestParamPPNS::SetUp()
 {
-  if (strcmp(GetParam(), "cache") == 0 && cache_pool_name.empty()) {
+  if (!is_crimson_cluster() && strcmp(GetParam(), "cache") == 0 &&
+      cache_pool_name.empty()) {
     auto pool_prefix = fmt::format("{}_", ::testing::UnitTest::GetInstance()->current_test_case()->name());
-    cache_pool_name = get_temp_pool_name(pool_prefix);
+    cache_pool_name = get_temp_pool_name();
     bufferlist inbl;
     ASSERT_EQ(0, cluster.mon_command(
       "{\"prefix\": \"osd pool create\", \"pool\": \"" + cache_pool_name +
@@ -303,9 +305,10 @@ void RadosTestParamPP::TearDownTestCase()
 
 void RadosTestParamPP::SetUp()
 {
-  if (strcmp(GetParam(), "cache") == 0 && cache_pool_name.empty()) {
+  if (!is_crimson_cluster() && strcmp(GetParam(), "cache") == 0 &&
+      cache_pool_name.empty()) {
     auto pool_prefix = fmt::format("{}_", ::testing::UnitTest::GetInstance()->current_test_case()->name());
-    cache_pool_name = get_temp_pool_name(pool_prefix);
+    cache_pool_name = get_temp_pool_name();
     bufferlist inbl;
     ASSERT_EQ(0, cluster.mon_command(
       "{\"prefix\": \"osd pool create\", \"pool\": \"" + cache_pool_name +
@@ -367,6 +370,7 @@ Rados RadosTestECPP::s_cluster;
 
 void RadosTestECPP::SetUpTestCase()
 {
+  SKIP_IF_CRIMSON();
   auto pool_prefix = fmt::format("{}_", ::testing::UnitTest::GetInstance()->current_test_case()->name());
   pool_name = get_temp_pool_name(pool_prefix);
   ASSERT_EQ("", create_one_ec_pool_pp(pool_name, s_cluster));
@@ -374,11 +378,13 @@ void RadosTestECPP::SetUpTestCase()
 
 void RadosTestECPP::TearDownTestCase()
 {
+  SKIP_IF_CRIMSON();
   ASSERT_EQ(0, destroy_one_ec_pool_pp(pool_name, s_cluster));
 }
 
 void RadosTestECPP::SetUp()
 {
+  SKIP_IF_CRIMSON();
   ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), ioctx));
   nspace = get_temp_pool_name();
   ioctx.set_namespace(nspace);
@@ -391,6 +397,7 @@ void RadosTestECPP::SetUp()
 
 void RadosTestECPP::TearDown()
 {
+  SKIP_IF_CRIMSON();
   if (cleanup) {
     cleanup_default_namespace(ioctx);
     cleanup_namespace(ioctx, nspace);
index fdf79e5001edf39f5007ac74310d0f900c2c16dd..be1d411a910d8001fe72e255408291320d644169 100644 (file)
@@ -6264,10 +6264,12 @@ public:
   ~LibRadosTwoPoolsECPP() override {};
 protected:
   static void SetUpTestCase() {
+    SKIP_IF_CRIMSON();
     pool_name = get_temp_pool_name();
     ASSERT_EQ("", create_one_ec_pool_pp(pool_name, s_cluster));
   }
   static void TearDownTestCase() {
+    SKIP_IF_CRIMSON();
     ASSERT_EQ(0, destroy_one_ec_pool_pp(pool_name, s_cluster));
   }
   static std::string cache_pool_name;