From: chunmei-liu Date: Fri, 29 Jul 2022 10:33:17 +0000 (-0700) Subject: crimson/test: skip EC class SetUp X-Git-Tag: v18.0.0~380^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8f5f02c13ba94ee82e8f9c450f61181837be25ce;p=ceph.git crimson/test: skip EC class SetUp otherwise crimson will hang Signed-off-by: chunmei-liu --- diff --git a/src/test/librados/TestCase.cc b/src/test/librados/TestCase.cc index 1399370c1b42b..8e380a251fa65 100644 --- a/src/test/librados/TestCase.cc +++ b/src/test/librados/TestCase.cc @@ -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); diff --git a/src/test/librados/crimson_utils.h b/src/test/librados/crimson_utils.h index 921578df15a30..4adcb69d9927e 100644 --- a/src/test/librados/crimson_utils.h +++ b/src/test/librados/crimson_utils.h @@ -5,8 +5,8 @@ #include -bool is_crimson_cluster() { - return (getenv("CRIMSON_COMPAT") != nullptr); +static inline bool is_crimson_cluster() { + return getenv("CRIMSON_COMPAT") != nullptr; } #define SKIP_IF_CRIMSON() \ diff --git a/src/test/librados/misc_cxx.cc b/src/test/librados/misc_cxx.cc index 6ebbaf9f9849f..dd7e52e8ebd1d 100644 --- a/src/test/librados/misc_cxx.cc +++ b/src/test/librados/misc_cxx.cc @@ -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(); diff --git a/src/test/librados/tier_cxx.cc b/src/test/librados/tier_cxx.cc index b84bea85a1237..e786caaeec068 100644 --- a/src/test/librados/tier_cxx.cc +++ b/src/test/librados/tier_cxx.cc @@ -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);