From: Samuel Just Date: Sun, 16 Oct 2022 22:04:32 +0000 (+0000) Subject: test/librados: SKIP_IF_CRIMSON remaining ec/cache tests X-Git-Tag: v18.1.0~299^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=69d168facd714cae3b243626f591a8aa524615b4;p=ceph.git test/librados: SKIP_IF_CRIMSON remaining ec/cache tests Signed-off-by: Samuel Just --- diff --git a/src/test/librados/TestCase.cc b/src/test/librados/TestCase.cc index d16fb8599d5..e99c19273f8 100644 --- a/src/test/librados/TestCase.cc +++ b/src/test/librados/TestCase.cc @@ -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); diff --git a/src/test/librados/misc_cxx.cc b/src/test/librados/misc_cxx.cc index dd7e52e8ebd..545d5e57bdf 100644 --- a/src/test/librados/misc_cxx.cc +++ b/src/test/librados/misc_cxx.cc @@ -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)); } diff --git a/src/test/librados/pool.cc b/src/test/librados/pool.cc index 19a170ed27b..a85d8f3a830 100644 --- a/src/test/librados/pool.cc +++ b/src/test/librados/pool.cc @@ -1,5 +1,6 @@ #include #include +#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)); diff --git a/src/test/librados/testcase_cxx.cc b/src/test/librados/testcase_cxx.cc index 77bdbf0fe2d..407c59b552e 100644 --- a/src/test/librados/testcase_cxx.cc +++ b/src/test/librados/testcase_cxx.cc @@ -7,6 +7,7 @@ #include #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); diff --git a/src/test/librados/tier_cxx.cc b/src/test/librados/tier_cxx.cc index fdf79e5001e..be1d411a910 100644 --- a/src/test/librados/tier_cxx.cc +++ b/src/test/librados/tier_cxx.cc @@ -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;