]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/test: skip EC class SetUp 47246/head
authorchunmei-liu <chunmei.liu@intel.com>
Fri, 29 Jul 2022 10:33:17 +0000 (03:33 -0700)
committerchunmei-liu <chunmei.liu@intel.com>
Sat, 30 Jul 2022 03:26:33 +0000 (20:26 -0700)
otherwise crimson will hang

Signed-off-by: chunmei-liu <chunmei.liu@intel.com>
src/test/librados/TestCase.cc
src/test/librados/crimson_utils.h
src/test/librados/misc_cxx.cc
src/test/librados/tier_cxx.cc

index 1399370c1b42ba1f4d139546ee37f9c61a511ef7..8e380a251fa651677f52f9e29009d7bbdd40ac6c 100644 (file)
@@ -5,7 +5,7 @@
 #include "test/librados/test.h"
 #include "test/librados/TestCase.h"
 #include "include/scope_guard.h"
-
+#include "crimson_utils.h"
 
 std::string RadosTestNS::pool_name;
 rados_t RadosTestNS::s_cluster = NULL;
@@ -76,6 +76,7 @@ void RadosTestECNS::TearDownTestCase()
 
 void RadosTestECNS::SetUp()
 {
+  SKIP_IF_CRIMSON();
   cluster = RadosTestECNS::s_cluster;
   ASSERT_EQ(0, rados_ioctx_create(cluster, pool_name.c_str(), &ioctx));
   int req;
@@ -87,6 +88,7 @@ void RadosTestECNS::SetUp()
 
 void RadosTestECNS::TearDown()
 {
+  SKIP_IF_CRIMSON();
   if (cleanup)
     cleanup_all_objects(ioctx);
   rados_ioctx_destroy(ioctx);
index 921578df15a30a250c9d3b6b47f02836846e953e..4adcb69d9927e4cb29ba2c46b743a01d53b687fc 100644 (file)
@@ -5,8 +5,8 @@
 
 #include <cstdlib>
 
-bool is_crimson_cluster() {
-  return (getenv("CRIMSON_COMPAT") != nullptr);
+static inline bool is_crimson_cluster() {
+  return getenv("CRIMSON_COMPAT") != nullptr;
 }
 
 #define SKIP_IF_CRIMSON()             \
index 6ebbaf9f9849fca7d906b26fedb354b022c6d7ea..dd7e52e8ebd1df74a2d9b438aabfa113a6015c96 100644 (file)
@@ -493,11 +493,13 @@ protected:
   static std::string src_pool_name;
 
   void SetUp() override {
+    SKIP_IF_CRIMSON();
     RadosTestECPP::SetUp();
     ASSERT_EQ(0, cluster.ioctx_create(src_pool_name.c_str(), src_ioctx));
     src_ioctx.set_namespace(nspace);
   }
   void TearDown() override {
+    SKIP_IF_CRIMSON();
     // wait for maps to settle before next test
     cluster.wait_for_latest_osdmap();
 
index b84bea85a123710fe06162de2eee9fa99cfcc0ce..e786caaeec068b4243e621faf7ee24909dd56832 100644 (file)
@@ -213,6 +213,7 @@ protected:
   static std::string cache_pool_name;
 
   void SetUp() override {
+    SKIP_IF_CRIMSON();
     cache_pool_name = get_temp_pool_name();
     ASSERT_EQ(0, s_cluster.pool_create(cache_pool_name.c_str()));
     RadosTestPP::SetUp();
@@ -222,6 +223,7 @@ protected:
     cache_ioctx.set_namespace(nspace);
   }
   void TearDown() override {
+    SKIP_IF_CRIMSON();
     // flush + evict cache
     flush_evict_all(cluster, cache_ioctx);
 
@@ -6267,6 +6269,7 @@ protected:
   static std::string cache_pool_name;
 
   void SetUp() override {
+    SKIP_IF_CRIMSON();
     cache_pool_name = get_temp_pool_name();
     ASSERT_EQ(0, s_cluster.pool_create(cache_pool_name.c_str()));
     RadosTestECPP::SetUp();
@@ -6276,6 +6279,7 @@ protected:
     cache_ioctx.set_namespace(nspace);
   }
   void TearDown() override {
+    SKIP_IF_CRIMSON();
     // flush + evict cache
     flush_evict_all(cluster, cache_ioctx);