From: chunmei-liu Date: Wed, 27 Jul 2022 00:40:13 +0000 (-0700) Subject: crimson/test: check env variable "CRIMSON_COMPAT" X-Git-Tag: v18.0.0~380^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=15e4be7cc9d09d92361dcfa934eabba035ad0eb4;p=ceph.git crimson/test: check env variable "CRIMSON_COMPAT" when "CRIMSON_COMPAT" is set, to skip EC and some test cases. Signed-off-by: chunmei-liu --- diff --git a/src/test/librados/aio.cc b/src/test/librados/aio.cc index e3652bc3bfdf..4227b042ee1f 100644 --- a/src/test/librados/aio.cc +++ b/src/test/librados/aio.cc @@ -16,6 +16,7 @@ #include "gtest/gtest.h" #include "test.h" +#include "crimson_utils.h" using std::ostringstream; @@ -1031,6 +1032,7 @@ public: }; TEST(LibRadosAioEC, SimpleWrite) { + SKIP_IF_CRIMSON(); AioTestDataEC test_data; rados_completion_t my_completion; ASSERT_EQ("", test_data.init()); @@ -1062,6 +1064,7 @@ TEST(LibRadosAioEC, SimpleWrite) { } TEST(LibRadosAioEC, WaitForComplete) { + SKIP_IF_CRIMSON(); AioTestDataEC test_data; rados_completion_t my_completion; ASSERT_EQ("", test_data.init()); @@ -1078,6 +1081,7 @@ TEST(LibRadosAioEC, WaitForComplete) { } TEST(LibRadosAioEC, RoundTrip) { + SKIP_IF_CRIMSON(); AioTestDataEC test_data; rados_completion_t my_completion; ASSERT_EQ("", test_data.init()); @@ -1110,6 +1114,7 @@ TEST(LibRadosAioEC, RoundTrip) { } TEST(LibRadosAioEC, RoundTrip2) { + SKIP_IF_CRIMSON(); AioTestDataEC test_data; rados_completion_t my_completion; ASSERT_EQ("", test_data.init()); @@ -1142,6 +1147,7 @@ TEST(LibRadosAioEC, RoundTrip2) { } TEST(LibRadosAioEC, RoundTripAppend) { + SKIP_IF_CRIMSON(); AioTestDataEC test_data; rados_completion_t my_completion, my_completion2, my_completion3, my_completion4; ASSERT_EQ("", test_data.init()); @@ -1212,6 +1218,7 @@ TEST(LibRadosAioEC, RoundTripAppend) { } TEST(LibRadosAioEC, IsComplete) { + SKIP_IF_CRIMSON(); AioTestDataEC test_data; rados_completion_t my_completion; ASSERT_EQ("", test_data.init()); @@ -1251,6 +1258,7 @@ TEST(LibRadosAioEC, IsComplete) { } TEST(LibRadosAioEC, IsSafe) { + SKIP_IF_CRIMSON(); AioTestDataEC test_data; rados_completion_t my_completion; ASSERT_EQ("", test_data.init()); @@ -1290,6 +1298,7 @@ TEST(LibRadosAioEC, IsSafe) { } TEST(LibRadosAioEC, ReturnValue) { + SKIP_IF_CRIMSON(); AioTestDataEC test_data; rados_completion_t my_completion; ASSERT_EQ("", test_data.init()); @@ -1308,6 +1317,7 @@ TEST(LibRadosAioEC, ReturnValue) { } TEST(LibRadosAioEC, Flush) { + SKIP_IF_CRIMSON(); AioTestDataEC test_data; rados_completion_t my_completion; ASSERT_EQ("", test_data.init()); @@ -1337,6 +1347,7 @@ TEST(LibRadosAioEC, Flush) { } TEST(LibRadosAioEC, FlushAsync) { + SKIP_IF_CRIMSON(); AioTestDataEC test_data; rados_completion_t my_completion; ASSERT_EQ("", test_data.init()); @@ -1375,6 +1386,7 @@ TEST(LibRadosAioEC, FlushAsync) { } TEST(LibRadosAioEC, RoundTripWriteFull) { + SKIP_IF_CRIMSON(); AioTestDataEC test_data; rados_completion_t my_completion, my_completion2, my_completion3; ASSERT_EQ("", test_data.init()); @@ -1418,6 +1430,7 @@ TEST(LibRadosAioEC, RoundTripWriteFull) { } TEST(LibRadosAioEC, SimpleStat) { + SKIP_IF_CRIMSON(); AioTestDataEC test_data; rados_completion_t my_completion; ASSERT_EQ("", test_data.init()); @@ -1451,6 +1464,7 @@ TEST(LibRadosAioEC, SimpleStat) { TEST(LibRadosAioEC, SimpleStatNS) { + SKIP_IF_CRIMSON(); AioTestDataEC test_data; rados_completion_t my_completion; ASSERT_EQ("", test_data.init()); @@ -1511,6 +1525,7 @@ TEST(LibRadosAioEC, SimpleStatNS) { } TEST(LibRadosAioEC, StatRemove) { + SKIP_IF_CRIMSON(); AioTestDataEC test_data; rados_completion_t my_completion; ASSERT_EQ("", test_data.init()); @@ -1566,6 +1581,7 @@ TEST(LibRadosAioEC, StatRemove) { } TEST(LibRadosAioEC, ExecuteClass) { + SKIP_IF_CRIMSON(); AioTestDataEC test_data; rados_completion_t my_completion; ASSERT_EQ("", test_data.init()); @@ -1597,6 +1613,7 @@ TEST(LibRadosAioEC, ExecuteClass) { } TEST(LibRadosAioEC, MultiWrite) { + SKIP_IF_CRIMSON(); AioTestDataEC test_data; rados_completion_t my_completion, my_completion2, my_completion3; ASSERT_EQ("", test_data.init()); diff --git a/src/test/librados/aio_cxx.cc b/src/test/librados/aio_cxx.cc index 8abdaf633b97..1be6a883382e 100644 --- a/src/test/librados/aio_cxx.cc +++ b/src/test/librados/aio_cxx.cc @@ -16,6 +16,7 @@ #include "common/ceph_mutex.h" #include "test_cxx.h" +#include "crimson_utils.h" using namespace std; using namespace librados; @@ -1310,6 +1311,7 @@ public: // EC test cases TEST(LibRadosAioEC, SimpleWritePP) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl1; @@ -1344,6 +1346,7 @@ TEST(LibRadosAioEC, SimpleWritePP) { } TEST(LibRadosAioEC, WaitForSafePP) { + SKIP_IF_CRIMSON(); AioTestDataECPP test_data; ASSERT_EQ("", test_data.init()); auto my_completion = std::unique_ptr{Rados::aio_create_completion()}; @@ -1360,6 +1363,7 @@ TEST(LibRadosAioEC, WaitForSafePP) { } TEST(LibRadosAioEC, RoundTripPP) { + SKIP_IF_CRIMSON(); AioTestDataECPP test_data; ASSERT_EQ("", test_data.init()); auto my_completion = std::unique_ptr{Rados::aio_create_completion()}; @@ -1390,6 +1394,7 @@ TEST(LibRadosAioEC, RoundTripPP) { } TEST(LibRadosAioEC, RoundTripPP2) { + SKIP_IF_CRIMSON(); AioTestDataECPP test_data; ASSERT_EQ("", test_data.init()); auto my_completion = std::unique_ptr{Rados::aio_create_completion()}; @@ -1422,6 +1427,7 @@ TEST(LibRadosAioEC, RoundTripPP2) { //using ObjectWriteOperation/ObjectReadOperation with iohint TEST(LibRadosAioEC, RoundTripPP3) { + SKIP_IF_CRIMSON(); Rados cluster; std::string pool_name = get_temp_pool_name(); ASSERT_EQ("", create_one_pool_pp(pool_name, cluster)); @@ -1525,6 +1531,7 @@ TEST(LibRadosAioPP, RemoveTestPP) { } TEST(LibRadosAioEC, RoundTripSparseReadPP) { + SKIP_IF_CRIMSON(); AioTestDataECPP test_data; ASSERT_EQ("", test_data.init()); auto my_completion = std::unique_ptr{Rados::aio_create_completion()}; @@ -1556,6 +1563,7 @@ TEST(LibRadosAioEC, RoundTripSparseReadPP) { } TEST(LibRadosAioEC, RoundTripAppendPP) { + SKIP_IF_CRIMSON(); AioTestDataECPP test_data; ASSERT_EQ("", test_data.init()); auto my_completion = std::unique_ptr{Rados::aio_create_completion()}; @@ -1623,6 +1631,7 @@ TEST(LibRadosAioEC, RoundTripAppendPP) { } TEST(LibRadosAioEC, IsCompletePP) { + SKIP_IF_CRIMSON(); AioTestDataECPP test_data; ASSERT_EQ("", test_data.init()); auto my_completion = std::unique_ptr{Rados::aio_create_completion()}; @@ -1659,6 +1668,7 @@ TEST(LibRadosAioEC, IsCompletePP) { ASSERT_EQ(0, memcmp(buf, bl2.c_str(), sizeof(buf))); } TEST(LibRadosAioEC, IsSafePP) { + SKIP_IF_CRIMSON(); AioTestDataECPP test_data; ASSERT_EQ("", test_data.init()); auto my_completion = std::unique_ptr{Rados::aio_create_completion()}; @@ -1696,6 +1706,7 @@ TEST(LibRadosAioEC, IsSafePP) { } TEST(LibRadosAioEC, ReturnValuePP) { + SKIP_IF_CRIMSON(); AioTestDataECPP test_data; ASSERT_EQ("", test_data.init()); auto my_completion = std::unique_ptr{Rados::aio_create_completion()}; @@ -1711,6 +1722,7 @@ TEST(LibRadosAioEC, ReturnValuePP) { } TEST(LibRadosAioEC, FlushPP) { + SKIP_IF_CRIMSON(); AioTestDataECPP test_data; ASSERT_EQ("", test_data.init()); auto my_completion = std::unique_ptr{Rados::aio_create_completion()}; @@ -1738,6 +1750,7 @@ TEST(LibRadosAioEC, FlushPP) { } TEST(LibRadosAioEC, FlushAsyncPP) { + SKIP_IF_CRIMSON(); AioTestDataECPP test_data; ASSERT_EQ("", test_data.init()); auto my_completion = std::unique_ptr{Rados::aio_create_completion()}; @@ -1772,6 +1785,7 @@ TEST(LibRadosAioEC, FlushAsyncPP) { } TEST(LibRadosAioEC, RoundTripWriteFullPP) { + SKIP_IF_CRIMSON(); AioTestDataECPP test_data; ASSERT_EQ("", test_data.init()); auto my_completion = std::unique_ptr{Rados::aio_create_completion()}; @@ -1816,6 +1830,7 @@ TEST(LibRadosAioEC, RoundTripWriteFullPP) { //using ObjectWriteOperation/ObjectReadOperation with iohint TEST(LibRadosAioEC, RoundTripWriteFullPP2) { + SKIP_IF_CRIMSON(); Rados cluster; std::string pool_name = get_temp_pool_name(); ASSERT_EQ("", create_one_pool_pp(pool_name, cluster)); @@ -1856,6 +1871,7 @@ TEST(LibRadosAioEC, RoundTripWriteFullPP2) } TEST(LibRadosAioEC, SimpleStatPP) { + SKIP_IF_CRIMSON(); AioTestDataECPP test_data; ASSERT_EQ("", test_data.init()); auto my_completion = std::unique_ptr{Rados::aio_create_completion()}; @@ -1886,6 +1902,7 @@ TEST(LibRadosAioEC, SimpleStatPP) { } TEST(LibRadosAioEC, SimpleStatPPNS) { + SKIP_IF_CRIMSON(); AioTestDataECPP test_data; ASSERT_EQ("", test_data.init()); auto my_completion = std::unique_ptr{Rados::aio_create_completion()}; @@ -1916,6 +1933,7 @@ TEST(LibRadosAioEC, SimpleStatPPNS) { } TEST(LibRadosAioEC, StatRemovePP) { + SKIP_IF_CRIMSON(); AioTestDataECPP test_data; ASSERT_EQ("", test_data.init()); auto my_completion = std::unique_ptr{Rados::aio_create_completion()}; @@ -1966,6 +1984,7 @@ TEST(LibRadosAioEC, StatRemovePP) { } TEST(LibRadosAioEC, ExecuteClassPP) { + SKIP_IF_CRIMSON(); AioTestDataECPP test_data; ASSERT_EQ("", test_data.init()); auto my_completion = std::unique_ptr{Rados::aio_create_completion()}; @@ -1995,6 +2014,7 @@ TEST(LibRadosAioEC, ExecuteClassPP) { } TEST(LibRadosAioEC, OmapPP) { + SKIP_IF_CRIMSON(); Rados cluster; std::string pool_name = get_temp_pool_name(); ASSERT_EQ("", create_one_ec_pool_pp(pool_name, cluster)); @@ -2028,6 +2048,7 @@ TEST(LibRadosAioEC, OmapPP) { } TEST(LibRadosAioEC, MultiWritePP) { + SKIP_IF_CRIMSON(); AioTestDataECPP test_data; ASSERT_EQ("", test_data.init()); auto my_completion = std::unique_ptr{Rados::aio_create_completion()}; diff --git a/src/test/librados/cls_remote_reads.cc b/src/test/librados/cls_remote_reads.cc index b8de2dbbdb26..4256c072f984 100644 --- a/src/test/librados/cls_remote_reads.cc +++ b/src/test/librados/cls_remote_reads.cc @@ -5,9 +5,12 @@ #include "gtest/gtest.h" #include "test/librados/test_cxx.h" +#include "crimson_utils.h" + using namespace librados; TEST(ClsTestRemoteReads, TestGather) { + SKIP_IF_CRIMSON(); Rados cluster; std::string pool_name = get_temp_pool_name(); ASSERT_EQ("", create_one_pool_pp(pool_name, cluster)); diff --git a/src/test/librados/crimson_utils.h b/src/test/librados/crimson_utils.h new file mode 100644 index 000000000000..921578df15a3 --- /dev/null +++ b/src/test/librados/crimson_utils.h @@ -0,0 +1,15 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab + +#pragma once + +#include + +bool is_crimson_cluster() { + return (getenv("CRIMSON_COMPAT") != nullptr); +} + +#define SKIP_IF_CRIMSON() \ + if (is_crimson_cluster()) { \ + GTEST_SKIP() << "Not supported by crimson yet. Skipped"; \ + } diff --git a/src/test/librados/io.cc b/src/test/librados/io.cc index d3d25aa4794d..7814463d4748 100644 --- a/src/test/librados/io.cc +++ b/src/test/librados/io.cc @@ -12,6 +12,7 @@ #include #include "gtest/gtest.h" +#include "crimson_utils.h" using std::string; @@ -269,6 +270,7 @@ TEST_F(LibRadosIo, XattrIter) { } TEST_F(LibRadosIoEC, SimpleWrite) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); ASSERT_EQ(0, rados_write(ioctx, "foo", buf, sizeof(buf), 0)); @@ -277,6 +279,7 @@ TEST_F(LibRadosIoEC, SimpleWrite) { } TEST_F(LibRadosIoEC, RoundTrip) { + SKIP_IF_CRIMSON(); char buf[128]; char buf2[128]; memset(buf, 0xcc, sizeof(buf)); @@ -290,6 +293,7 @@ TEST_F(LibRadosIoEC, RoundTrip) { } TEST_F(LibRadosIoEC, OverlappingWriteRoundTrip) { + SKIP_IF_CRIMSON(); int bsize = alignment; int dbsize = bsize * 2; char *buf = (char *)new char[dbsize]; @@ -312,6 +316,7 @@ TEST_F(LibRadosIoEC, OverlappingWriteRoundTrip) { } TEST_F(LibRadosIoEC, WriteFullRoundTrip) { + SKIP_IF_CRIMSON(); char buf[128]; char buf2[64]; char buf3[128]; @@ -325,6 +330,7 @@ TEST_F(LibRadosIoEC, WriteFullRoundTrip) { } TEST_F(LibRadosIoEC, AppendRoundTrip) { + SKIP_IF_CRIMSON(); char *buf = (char *)new char[alignment]; char *buf2 = (char *)new char[alignment]; char *buf3 = (char *)new char[alignment *2]; @@ -351,6 +357,7 @@ TEST_F(LibRadosIoEC, AppendRoundTrip) { } TEST_F(LibRadosIoEC, TruncTest) { + SKIP_IF_CRIMSON(); char buf[128]; char buf2[sizeof(buf)]; memset(buf, 0xaa, sizeof(buf)); @@ -364,6 +371,7 @@ TEST_F(LibRadosIoEC, TruncTest) { } TEST_F(LibRadosIoEC, RemoveTest) { + SKIP_IF_CRIMSON(); char buf[128]; char buf2[sizeof(buf)]; memset(buf, 0xaa, sizeof(buf)); @@ -374,6 +382,7 @@ TEST_F(LibRadosIoEC, RemoveTest) { } TEST_F(LibRadosIoEC, XattrsRoundTrip) { + SKIP_IF_CRIMSON(); char buf[128]; char attr1[] = "attr1"; char attr1_buf[] = "foo bar baz"; @@ -387,6 +396,7 @@ TEST_F(LibRadosIoEC, XattrsRoundTrip) { } TEST_F(LibRadosIoEC, RmXattr) { + SKIP_IF_CRIMSON(); char buf[128]; char attr1[] = "attr1"; char attr1_buf[] = "foo bar baz"; @@ -410,6 +420,7 @@ TEST_F(LibRadosIoEC, RmXattr) { } TEST_F(LibRadosIoEC, XattrIter) { + SKIP_IF_CRIMSON(); char buf[128]; char attr1[] = "attr1"; char attr1_buf[] = "foo bar baz"; diff --git a/src/test/librados/io_cxx.cc b/src/test/librados/io_cxx.cc index 455654b6e923..d9606d16bcaa 100644 --- a/src/test/librados/io_cxx.cc +++ b/src/test/librados/io_cxx.cc @@ -13,6 +13,8 @@ #include "test/librados/test_cxx.h" #include "test/librados/testcase_cxx.h" +#include "crimson_utils.h" + using namespace librados; using std::string; @@ -461,6 +463,7 @@ TEST_F(LibRadosIoPP, XattrListPP) { } TEST_F(LibRadosIoECPP, SimpleWritePP) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl; @@ -471,6 +474,7 @@ TEST_F(LibRadosIoECPP, SimpleWritePP) { } TEST_F(LibRadosIoECPP, ReadOpPP) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl; @@ -617,6 +621,7 @@ TEST_F(LibRadosIoECPP, ReadOpPP) { } TEST_F(LibRadosIoECPP, SparseReadOpPP) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl; @@ -636,6 +641,7 @@ TEST_F(LibRadosIoECPP, SparseReadOpPP) { } TEST_F(LibRadosIoECPP, RoundTripPP) { + SKIP_IF_CRIMSON(); char buf[128]; Rados cluster; memset(buf, 0xcc, sizeof(buf)); @@ -649,6 +655,7 @@ TEST_F(LibRadosIoECPP, RoundTripPP) { TEST_F(LibRadosIoECPP, RoundTripPP2) { + SKIP_IF_CRIMSON(); bufferlist bl; bl.append("ceph"); ObjectWriteOperation write; @@ -664,6 +671,7 @@ TEST_F(LibRadosIoECPP, RoundTripPP2) } TEST_F(LibRadosIoECPP, OverlappingWriteRoundTripPP) { + SKIP_IF_CRIMSON(); int bsize = alignment; int dbsize = bsize * 2; char *buf = (char *)new char[dbsize]; @@ -688,6 +696,7 @@ TEST_F(LibRadosIoECPP, OverlappingWriteRoundTripPP) { } TEST_F(LibRadosIoECPP, WriteFullRoundTripPP) { + SKIP_IF_CRIMSON(); char buf[128]; char buf2[64]; memset(buf, 0xcc, sizeof(buf)); @@ -705,6 +714,7 @@ TEST_F(LibRadosIoECPP, WriteFullRoundTripPP) { TEST_F(LibRadosIoECPP, WriteFullRoundTripPP2) { + SKIP_IF_CRIMSON(); bufferlist bl; bl.append("ceph"); ObjectWriteOperation write; @@ -720,6 +730,7 @@ TEST_F(LibRadosIoECPP, WriteFullRoundTripPP2) } TEST_F(LibRadosIoECPP, AppendRoundTripPP) { + SKIP_IF_CRIMSON(); char *buf = (char *)new char[alignment]; char *buf2 = (char *)new char[alignment]; auto cleanup = [&] { @@ -744,6 +755,7 @@ TEST_F(LibRadosIoECPP, AppendRoundTripPP) { } TEST_F(LibRadosIoECPP, TruncTestPP) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xaa, sizeof(buf)); bufferlist bl; @@ -758,6 +770,7 @@ TEST_F(LibRadosIoECPP, TruncTestPP) { } TEST_F(LibRadosIoECPP, RemoveTestPP) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xaa, sizeof(buf)); bufferlist bl1; @@ -769,6 +782,7 @@ TEST_F(LibRadosIoECPP, RemoveTestPP) { } TEST_F(LibRadosIoECPP, XattrsRoundTripPP) { + SKIP_IF_CRIMSON(); char buf[128]; char attr1[] = "attr1"; char attr1_buf[] = "foo bar baz"; @@ -788,6 +802,7 @@ TEST_F(LibRadosIoECPP, XattrsRoundTripPP) { } TEST_F(LibRadosIoECPP, RmXattrPP) { + SKIP_IF_CRIMSON(); char buf[128]; char attr1[] = "attr1"; char attr1_buf[] = "foo bar baz"; @@ -818,6 +833,7 @@ TEST_F(LibRadosIoECPP, RmXattrPP) { } TEST_F(LibRadosIoECPP, XattrListPP) { + SKIP_IF_CRIMSON(); char buf[128]; char attr1[] = "attr1"; char attr1_buf[] = "foo bar baz"; @@ -910,6 +926,7 @@ TEST_F(LibRadosIoPP, CmpExtMismatchPP) { } TEST_F(LibRadosIoECPP, CmpExtPP) { + SKIP_IF_CRIMSON(); bufferlist bl; bl.append("ceph"); ObjectWriteOperation write1; @@ -930,6 +947,7 @@ TEST_F(LibRadosIoECPP, CmpExtPP) { } TEST_F(LibRadosIoECPP, CmpExtDNEPP) { + SKIP_IF_CRIMSON(); bufferlist bl; bl.append(std::string(4, '\0')); @@ -947,6 +965,7 @@ TEST_F(LibRadosIoECPP, CmpExtDNEPP) { } TEST_F(LibRadosIoECPP, CmpExtMismatchPP) { + SKIP_IF_CRIMSON(); bufferlist bl; bl.append("ceph"); ObjectWriteOperation write1; diff --git a/src/test/librados/list.cc b/src/test/librados/list.cc index 930e6b9eb8ea..ef3488c0b672 100644 --- a/src/test/librados/list.cc +++ b/src/test/librados/list.cc @@ -15,6 +15,8 @@ #include #include +#include "crimson_utils.h" + using namespace std; using namespace librados; @@ -274,6 +276,7 @@ TEST_F(LibRadosList, ListObjectsCursor) { } TEST_F(LibRadosListEC, ListObjects) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); ASSERT_EQ(0, rados_write(ioctx, "foo", buf, sizeof(buf), 0)); @@ -290,6 +293,7 @@ TEST_F(LibRadosListEC, ListObjects) { } TEST_F(LibRadosListEC, ListObjectsNS) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); // Create :foo1, :foo2, :foo3, n1:foo1, ns1:foo4, ns1:foo5, ns2:foo6, n2:foo7 @@ -353,6 +357,7 @@ TEST_F(LibRadosListEC, ListObjectsNS) { TEST_F(LibRadosListEC, ListObjectsStart) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); @@ -433,9 +438,10 @@ TEST_F(LibRadosList, EnumerateObjects) { // Ensure a non-power-of-two PG count to avoid only // touching the easy path. - ASSERT_TRUE(set_pg_num(&s_cluster, pool_name, 11).empty()); - ASSERT_TRUE(set_pgp_num(&s_cluster, pool_name, 11).empty()); - + if (!is_crimson_cluster()) { + ASSERT_TRUE(set_pg_num(&s_cluster, pool_name, 11).empty()); + ASSERT_TRUE(set_pgp_num(&s_cluster, pool_name, 11).empty()); + } std::set saw_obj; rados_object_list_cursor c = rados_object_list_begin(ioctx); rados_object_list_cursor end = rados_object_list_end(ioctx); @@ -481,11 +487,13 @@ TEST_F(LibRadosList, EnumerateObjectsSplit) { // Ensure a non-power-of-two PG count to avoid only // touching the easy path. - if (auto error = set_pg_num(&s_cluster, pool_name, 11); !error.empty()) { - GTEST_FAIL() << error; - } - if (auto error = set_pgp_num(&s_cluster, pool_name, 11); !error.empty()) { - GTEST_FAIL() << error; + if (!is_crimson_cluster()) { + if (auto error = set_pg_num(&s_cluster, pool_name, 11); !error.empty()) { + GTEST_FAIL() << error; + } + if (auto error = set_pgp_num(&s_cluster, pool_name, 11); !error.empty()) { + GTEST_FAIL() << error; + } } rados_object_list_cursor begin = rados_object_list_begin(ioctx); diff --git a/src/test/librados/list_cxx.cc b/src/test/librados/list_cxx.cc index 45368b39cf30..1122313029f6 100644 --- a/src/test/librados/list_cxx.cc +++ b/src/test/librados/list_cxx.cc @@ -15,6 +15,8 @@ #include "test/librados/testcase_cxx.h" #include "global/global_context.h" +#include "crimson_utils.h" + using namespace librados; typedef RadosTestPPNSCleanup LibRadosListPP; @@ -394,6 +396,7 @@ TEST_F(LibRadosListPP, ListObjectsCursorPP) { } TEST_F(LibRadosListECPP, ListObjectsPP) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl1; @@ -410,6 +413,7 @@ TEST_F(LibRadosListECPP, ListObjectsPP) { } TEST_F(LibRadosListECPP, ListObjectsTwicePP) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl1; @@ -436,6 +440,7 @@ TEST_F(LibRadosListECPP, ListObjectsTwicePP) { } TEST_F(LibRadosListECPP, ListObjectsCopyIterPP) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl1; @@ -468,6 +473,7 @@ TEST_F(LibRadosListECPP, ListObjectsCopyIterPP) { } TEST_F(LibRadosListECPP, ListObjectsEndIter) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl1; @@ -493,6 +499,7 @@ TEST_F(LibRadosListECPP, ListObjectsEndIter) { } TEST_F(LibRadosListECPP, ListObjectsPPNS) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl1; @@ -533,6 +540,7 @@ TEST_F(LibRadosListECPP, ListObjectsPPNS) { } TEST_F(LibRadosListECPP, ListObjectsManyPP) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl; @@ -559,6 +567,7 @@ TEST_F(LibRadosListECPP, ListObjectsManyPP) { } TEST_F(LibRadosListECPP, ListObjectsStartPP) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl; diff --git a/src/test/librados/lock.cc b/src/test/librados/lock.cc index 53ed300e7baf..a6ac36365c8b 100644 --- a/src/test/librados/lock.cc +++ b/src/test/librados/lock.cc @@ -10,6 +10,8 @@ #include "gtest/gtest.h" #include +#include "crimson_utils.h" + using namespace std::chrono_literals; typedef RadosTest LibRadosLock; @@ -122,16 +124,19 @@ TEST_F(LibRadosLock, BreakLock) { // EC testing TEST_F(LibRadosLockEC, LockExclusive) { + SKIP_IF_CRIMSON(); ASSERT_EQ(0, rados_lock_exclusive(ioctx, "foo", "TestLockEC1", "Cookie", "", NULL, 0)); ASSERT_EQ(-EEXIST, rados_lock_exclusive(ioctx, "foo", "TestLockEC1", "Cookie", "", NULL, 0)); } TEST_F(LibRadosLockEC, LockShared) { + SKIP_IF_CRIMSON(); ASSERT_EQ(0, rados_lock_shared(ioctx, "foo", "TestLockEC2", "Cookie", "Tag", "", NULL, 0)); ASSERT_EQ(-EEXIST, rados_lock_shared(ioctx, "foo", "TestLockEC2", "Cookie", "Tag", "", NULL, 0)); } TEST_F(LibRadosLockEC, LockExclusiveDur) { + SKIP_IF_CRIMSON(); struct timeval tv; tv.tv_sec = 1; tv.tv_usec = 0; @@ -144,6 +149,7 @@ TEST_F(LibRadosLockEC, LockExclusiveDur) { } TEST_F(LibRadosLockEC, LockSharedDur) { + SKIP_IF_CRIMSON(); struct timeval tv; tv.tv_sec = 1; tv.tv_usec = 0; @@ -157,18 +163,21 @@ TEST_F(LibRadosLockEC, LockSharedDur) { TEST_F(LibRadosLockEC, LockMayRenew) { + SKIP_IF_CRIMSON(); ASSERT_EQ(0, rados_lock_exclusive(ioctx, "foo", "TestLockEC5", "Cookie", "", NULL, 0)); ASSERT_EQ(-EEXIST, rados_lock_exclusive(ioctx, "foo", "TestLockEC5", "Cookie", "", NULL, 0)); ASSERT_EQ(0, rados_lock_exclusive(ioctx, "foo", "TestLockEC5", "Cookie", "", NULL, LOCK_FLAG_MAY_RENEW)); } TEST_F(LibRadosLockEC, Unlock) { + SKIP_IF_CRIMSON(); ASSERT_EQ(0, rados_lock_exclusive(ioctx, "foo", "TestLockEC6", "Cookie", "", NULL, 0)); ASSERT_EQ(0, rados_unlock(ioctx, "foo", "TestLockEC6", "Cookie")); ASSERT_EQ(0, rados_lock_exclusive(ioctx, "foo", "TestLockEC6", "Cookie", "", NULL, 0)); } TEST_F(LibRadosLockEC, ListLockers) { + SKIP_IF_CRIMSON(); int exclusive; char tag[1024]; char clients[1024]; @@ -201,6 +210,7 @@ TEST_F(LibRadosLockEC, ListLockers) { } TEST_F(LibRadosLockEC, BreakLock) { + SKIP_IF_CRIMSON(); int exclusive; char tag[1024]; char clients[1024]; diff --git a/src/test/librados/lock_cxx.cc b/src/test/librados/lock_cxx.cc index 3007b22686a4..0267ea938f6c 100644 --- a/src/test/librados/lock_cxx.cc +++ b/src/test/librados/lock_cxx.cc @@ -11,6 +11,8 @@ #include "test/librados/test_cxx.h" #include "test/librados/testcase_cxx.h" +#include "crimson_utils.h" + using namespace std::chrono_literals; using namespace librados; @@ -106,16 +108,19 @@ TEST_F(LibRadosLockPP, BreakLockPP) { // EC testing TEST_F(LibRadosLockECPP, LockExclusivePP) { + SKIP_IF_CRIMSON(); ASSERT_EQ(0, ioctx.lock_exclusive("foo", "TestLockECPP1", "Cookie", "", NULL, 0)); ASSERT_EQ(-EEXIST, ioctx.lock_exclusive("foo", "TestLockECPP1", "Cookie", "", NULL, 0)); } TEST_F(LibRadosLockECPP, LockSharedPP) { + SKIP_IF_CRIMSON(); ASSERT_EQ(0, ioctx.lock_shared("foo", "TestLockECPP2", "Cookie", "Tag", "", NULL, 0)); ASSERT_EQ(-EEXIST, ioctx.lock_shared("foo", "TestLockECPP2", "Cookie", "Tag", "", NULL, 0)); } TEST_F(LibRadosLockECPP, LockExclusiveDurPP) { + SKIP_IF_CRIMSON(); struct timeval tv; tv.tv_sec = 1; tv.tv_usec = 0; @@ -128,6 +133,7 @@ TEST_F(LibRadosLockECPP, LockExclusiveDurPP) { } TEST_F(LibRadosLockECPP, LockSharedDurPP) { + SKIP_IF_CRIMSON(); struct timeval tv; tv.tv_sec = 1; tv.tv_usec = 0; @@ -140,18 +146,21 @@ TEST_F(LibRadosLockECPP, LockSharedDurPP) { } TEST_F(LibRadosLockECPP, LockMayRenewPP) { + SKIP_IF_CRIMSON(); ASSERT_EQ(0, ioctx.lock_exclusive("foo", "TestLockECPP5", "Cookie", "", NULL, 0)); ASSERT_EQ(-EEXIST, ioctx.lock_exclusive("foo", "TestLockECPP5", "Cookie", "", NULL, 0)); ASSERT_EQ(0, ioctx.lock_exclusive("foo", "TestLockECPP5", "Cookie", "", NULL, LOCK_FLAG_MAY_RENEW)); } TEST_F(LibRadosLockECPP, UnlockPP) { + SKIP_IF_CRIMSON(); ASSERT_EQ(0, ioctx.lock_exclusive("foo", "TestLockECPP6", "Cookie", "", NULL, 0)); ASSERT_EQ(0, ioctx.unlock("foo", "TestLockECPP6", "Cookie")); ASSERT_EQ(0, ioctx.lock_exclusive("foo", "TestLockECPP6", "Cookie", "", NULL, 0)); } TEST_F(LibRadosLockECPP, ListLockersPP) { + SKIP_IF_CRIMSON(); std::stringstream sstm; sstm << "client." << cluster.get_instance_id(); std::string me = sstm.str(); @@ -177,6 +186,7 @@ TEST_F(LibRadosLockECPP, ListLockersPP) { } TEST_F(LibRadosLockECPP, BreakLockPP) { + SKIP_IF_CRIMSON(); int exclusive; std::string tag; std::list lockers; diff --git a/src/test/librados/misc_cxx.cc b/src/test/librados/misc_cxx.cc index 0241f1dfeb97..6ebbaf9f9849 100644 --- a/src/test/librados/misc_cxx.cc +++ b/src/test/librados/misc_cxx.cc @@ -21,6 +21,8 @@ #include "test/librados/testcase_cxx.h" #include "test/librados/test_cxx.h" +#include "crimson_utils.h" + using namespace std; using namespace librados; @@ -381,6 +383,7 @@ TEST_F(LibRadosMiscPP, BigAttrPP) { } TEST_F(LibRadosMiscPP, CopyPP) { + SKIP_IF_CRIMSON(); bufferlist bl, x; bl.append("hi there"); x.append("bar"); @@ -512,6 +515,7 @@ std::string LibRadosTwoPoolsECPP::src_pool_name; //copy_from between ecpool and no-ecpool. TEST_F(LibRadosTwoPoolsECPP, CopyFrom) { + SKIP_IF_CRIMSON(); bufferlist z; z.append_zero(4194304*2); bufferlist b; @@ -538,6 +542,7 @@ TEST_F(LibRadosTwoPoolsECPP, CopyFrom) { } TEST_F(LibRadosMiscPP, CopyScrubPP) { + SKIP_IF_CRIMSON(); bufferlist inbl, bl, x; for (int i=0; i<100; ++i) x.append("barrrrrrrrrrrrrrrrrrrrrrrrrr"); @@ -858,6 +863,7 @@ TEST_F(LibRadosMiscPP, Applications) { } TEST_F(LibRadosMiscECPP, CompareExtentRange) { + SKIP_IF_CRIMSON(); bufferlist bl1; bl1.append("ceph"); ObjectWriteOperation write; diff --git a/src/test/librados/snapshots.cc b/src/test/librados/snapshots.cc index ec8e534270b6..ab508de184fe 100644 --- a/src/test/librados/snapshots.cc +++ b/src/test/librados/snapshots.cc @@ -1,6 +1,7 @@ #include "include/rados.h" #include "test/librados/test.h" #include "test/librados/TestCase.h" +#include "crimson_utils.h" #include #include @@ -17,6 +18,7 @@ typedef RadosTestEC LibRadosSnapshotsSelfManagedEC; const int bufsize = 128; TEST_F(LibRadosSnapshots, SnapList) { + SKIP_IF_CRIMSON(); char buf[bufsize]; memset(buf, 0xcc, sizeof(buf)); ASSERT_EQ(0, rados_write(ioctx, "foo", buf, sizeof(buf), 0)); @@ -31,6 +33,7 @@ TEST_F(LibRadosSnapshots, SnapList) { } TEST_F(LibRadosSnapshots, SnapRemove) { + SKIP_IF_CRIMSON(); char buf[bufsize]; memset(buf, 0xcc, sizeof(buf)); ASSERT_EQ(0, rados_write(ioctx, "foo", buf, sizeof(buf), 0)); @@ -43,6 +46,7 @@ TEST_F(LibRadosSnapshots, SnapRemove) { } TEST_F(LibRadosSnapshots, Rollback) { + SKIP_IF_CRIMSON(); char buf[bufsize]; memset(buf, 0xcc, sizeof(buf)); ASSERT_EQ(0, rados_write(ioctx, "foo", buf, sizeof(buf), 0)); @@ -58,6 +62,7 @@ TEST_F(LibRadosSnapshots, Rollback) { } TEST_F(LibRadosSnapshots, SnapGetName) { + SKIP_IF_CRIMSON(); char buf[bufsize]; memset(buf, 0xcc, sizeof(buf)); ASSERT_EQ(0, rados_write(ioctx, "foo", buf, sizeof(buf), 0)); @@ -75,6 +80,7 @@ TEST_F(LibRadosSnapshots, SnapGetName) { } TEST_F(LibRadosSnapshotsSelfManaged, Snap) { + SKIP_IF_CRIMSON(); std::vector my_snaps; my_snaps.push_back(-2); ASSERT_EQ(0, rados_ioctx_selfmanaged_snap_create(ioctx, &my_snaps.back())); @@ -121,6 +127,7 @@ TEST_F(LibRadosSnapshotsSelfManaged, Snap) { } TEST_F(LibRadosSnapshotsSelfManaged, Rollback) { + SKIP_IF_CRIMSON(); std::vector my_snaps; my_snaps.push_back(-2); ASSERT_EQ(0, rados_ioctx_selfmanaged_snap_create(ioctx, &my_snaps.back())); @@ -155,6 +162,7 @@ TEST_F(LibRadosSnapshotsSelfManaged, Rollback) { // EC testing TEST_F(LibRadosSnapshotsEC, SnapList) { + SKIP_IF_CRIMSON(); char buf[bufsize]; memset(buf, 0xcc, sizeof(buf)); ASSERT_EQ(0, rados_write(ioctx, "foo", buf, sizeof(buf), 0)); @@ -169,6 +177,7 @@ TEST_F(LibRadosSnapshotsEC, SnapList) { } TEST_F(LibRadosSnapshotsEC, SnapRemove) { + SKIP_IF_CRIMSON(); char buf[bufsize]; memset(buf, 0xcc, sizeof(buf)); ASSERT_EQ(0, rados_write(ioctx, "foo", buf, sizeof(buf), 0)); @@ -181,6 +190,7 @@ TEST_F(LibRadosSnapshotsEC, SnapRemove) { } TEST_F(LibRadosSnapshotsEC, Rollback) { + SKIP_IF_CRIMSON(); char buf[bufsize]; memset(buf, 0xcc, sizeof(buf)); ASSERT_EQ(0, rados_write(ioctx, "foo", buf, sizeof(buf), 0)); @@ -196,6 +206,7 @@ TEST_F(LibRadosSnapshotsEC, Rollback) { } TEST_F(LibRadosSnapshotsEC, SnapGetName) { + SKIP_IF_CRIMSON(); char buf[bufsize]; memset(buf, 0xcc, sizeof(buf)); ASSERT_EQ(0, rados_write(ioctx, "foo", buf, sizeof(buf), 0)); @@ -213,6 +224,7 @@ TEST_F(LibRadosSnapshotsEC, SnapGetName) { } TEST_F(LibRadosSnapshotsSelfManagedEC, Snap) { + SKIP_IF_CRIMSON(); std::vector my_snaps; my_snaps.push_back(-2); ASSERT_EQ(0, rados_ioctx_selfmanaged_snap_create(ioctx, &my_snaps.back())); @@ -263,6 +275,7 @@ TEST_F(LibRadosSnapshotsSelfManagedEC, Snap) { } TEST_F(LibRadosSnapshotsSelfManagedEC, Rollback) { + SKIP_IF_CRIMSON(); std::vector my_snaps; my_snaps.push_back(-2); ASSERT_EQ(0, rados_ioctx_selfmanaged_snap_create(ioctx, &my_snaps.back())); diff --git a/src/test/librados/snapshots_cxx.cc b/src/test/librados/snapshots_cxx.cc index dee17ddb8d7a..f2d281d951aa 100644 --- a/src/test/librados/snapshots_cxx.cc +++ b/src/test/librados/snapshots_cxx.cc @@ -8,6 +8,7 @@ #include "include/rados/librados.hpp" #include "test/librados/test_cxx.h" #include "test/librados/testcase_cxx.h" +#include "crimson_utils.h" using namespace librados; @@ -19,6 +20,7 @@ typedef RadosTestECPP LibRadosSnapshotsSelfManagedECPP; const int bufsize = 128; TEST_F(LibRadosSnapshotsPP, SnapListPP) { + SKIP_IF_CRIMSON(); char buf[bufsize]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl1; @@ -38,6 +40,7 @@ TEST_F(LibRadosSnapshotsPP, SnapListPP) { } TEST_F(LibRadosSnapshotsPP, SnapRemovePP) { + SKIP_IF_CRIMSON(); char buf[bufsize]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl1; @@ -51,6 +54,7 @@ TEST_F(LibRadosSnapshotsPP, SnapRemovePP) { } TEST_F(LibRadosSnapshotsPP, RollbackPP) { + SKIP_IF_CRIMSON(); char buf[bufsize]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl1; @@ -70,6 +74,7 @@ TEST_F(LibRadosSnapshotsPP, RollbackPP) { } TEST_F(LibRadosSnapshotsPP, SnapGetNamePP) { + SKIP_IF_CRIMSON(); char buf[bufsize]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl; @@ -88,6 +93,7 @@ TEST_F(LibRadosSnapshotsPP, SnapGetNamePP) { } TEST_F(LibRadosSnapshotsPP, SnapCreateRemovePP) { + SKIP_IF_CRIMSON(); // reproduces http://tracker.ceph.com/issues/10262 bufferlist bl; bl.append("foo"); @@ -106,6 +112,7 @@ TEST_F(LibRadosSnapshotsPP, SnapCreateRemovePP) { } TEST_F(LibRadosSnapshotsSelfManagedPP, SnapPP) { + SKIP_IF_CRIMSON(); std::vector my_snaps; my_snaps.push_back(-2); ASSERT_FALSE(cluster.get_pool_is_selfmanaged_snaps_mode(pool_name)); @@ -152,6 +159,7 @@ TEST_F(LibRadosSnapshotsSelfManagedPP, SnapPP) { } TEST_F(LibRadosSnapshotsSelfManagedPP, RollbackPP) { + SKIP_IF_CRIMSON(); std::vector my_snaps; IoCtx readioctx; ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), readioctx)); @@ -236,6 +244,7 @@ TEST_F(LibRadosSnapshotsSelfManagedPP, RollbackPP) { } TEST_F(LibRadosSnapshotsSelfManagedPP, SnapOverlapPP) { + SKIP_IF_CRIMSON(); std::vector my_snaps; IoCtx readioctx; ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), readioctx)); @@ -365,6 +374,7 @@ TEST_F(LibRadosSnapshotsSelfManagedPP, SnapOverlapPP) { } TEST_F(LibRadosSnapshotsSelfManagedPP, Bug11677) { + SKIP_IF_CRIMSON(); std::vector my_snaps; my_snaps.push_back(-2); ASSERT_EQ(0, ioctx.selfmanaged_snap_create(&my_snaps.back())); @@ -399,6 +409,7 @@ TEST_F(LibRadosSnapshotsSelfManagedPP, Bug11677) { } TEST_F(LibRadosSnapshotsSelfManagedPP, OrderSnap) { + SKIP_IF_CRIMSON(); std::vector my_snaps; char buf[bufsize]; memset(buf, 0xcc, sizeof(buf)); @@ -455,6 +466,7 @@ TEST_F(LibRadosSnapshotsSelfManagedPP, OrderSnap) { } TEST_F(LibRadosSnapshotsSelfManagedPP, ReusePurgedSnap) { + SKIP_IF_CRIMSON(); std::vector my_snaps; my_snaps.push_back(-2); ASSERT_EQ(0, ioctx.selfmanaged_snap_create(&my_snaps.back())); @@ -499,6 +511,7 @@ TEST_F(LibRadosSnapshotsSelfManagedPP, ReusePurgedSnap) { // EC testing TEST_F(LibRadosSnapshotsECPP, SnapListPP) { + SKIP_IF_CRIMSON(); char buf[bufsize]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl1; @@ -515,6 +528,7 @@ TEST_F(LibRadosSnapshotsECPP, SnapListPP) { } TEST_F(LibRadosSnapshotsECPP, SnapRemovePP) { + SKIP_IF_CRIMSON(); char buf[bufsize]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl1; @@ -528,6 +542,7 @@ TEST_F(LibRadosSnapshotsECPP, SnapRemovePP) { } TEST_F(LibRadosSnapshotsECPP, RollbackPP) { + SKIP_IF_CRIMSON(); char buf[bufsize]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl1; @@ -547,6 +562,7 @@ TEST_F(LibRadosSnapshotsECPP, RollbackPP) { } TEST_F(LibRadosSnapshotsECPP, SnapGetNamePP) { + SKIP_IF_CRIMSON(); char buf[bufsize]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl; @@ -565,6 +581,7 @@ TEST_F(LibRadosSnapshotsECPP, SnapGetNamePP) { } TEST_F(LibRadosSnapshotsSelfManagedECPP, SnapPP) { + SKIP_IF_CRIMSON(); std::vector my_snaps; my_snaps.push_back(-2); ASSERT_EQ(0, ioctx.selfmanaged_snap_create(&my_snaps.back())); @@ -612,6 +629,7 @@ TEST_F(LibRadosSnapshotsSelfManagedECPP, SnapPP) { } TEST_F(LibRadosSnapshotsSelfManagedECPP, RollbackPP) { + SKIP_IF_CRIMSON(); std::vector my_snaps; IoCtx readioctx; ASSERT_EQ(0, cluster.ioctx_create(pool_name.c_str(), readioctx)); @@ -698,6 +716,7 @@ TEST_F(LibRadosSnapshotsSelfManagedECPP, RollbackPP) { } TEST_F(LibRadosSnapshotsSelfManagedECPP, Bug11677) { + SKIP_IF_CRIMSON(); std::vector my_snaps; my_snaps.push_back(-2); ASSERT_EQ(0, ioctx.selfmanaged_snap_create(&my_snaps.back())); diff --git a/src/test/librados/stat.cc b/src/test/librados/stat.cc index fd6677427387..4109c7805294 100644 --- a/src/test/librados/stat.cc +++ b/src/test/librados/stat.cc @@ -7,6 +7,7 @@ #include #include #include "gtest/gtest.h" +#include "crimson_utils.h" typedef RadosTest LibRadosStat; typedef RadosTestEC LibRadosStatEC; @@ -67,6 +68,7 @@ TEST_F(LibRadosStat, PoolStat) { } TEST_F(LibRadosStatEC, Stat) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); ASSERT_EQ(0, rados_write(ioctx, "foo", buf, sizeof(buf), 0)); @@ -78,6 +80,7 @@ TEST_F(LibRadosStatEC, Stat) { } TEST_F(LibRadosStatEC, StatNS) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); rados_ioctx_set_namespace(ioctx, ""); @@ -104,11 +107,13 @@ TEST_F(LibRadosStatEC, StatNS) { } TEST_F(LibRadosStatEC, ClusterStat) { + SKIP_IF_CRIMSON(); struct rados_cluster_stat_t result; ASSERT_EQ(0, rados_cluster_stat(cluster, &result)); } TEST_F(LibRadosStatEC, PoolStat) { + SKIP_IF_CRIMSON(); char buf[128]; char actual_pool_name[80]; unsigned l = rados_ioctx_get_pool_name(ioctx, actual_pool_name, sizeof(actual_pool_name)); diff --git a/src/test/librados/stat_cxx.cc b/src/test/librados/stat_cxx.cc index d0d0116dfec3..07b480ad0499 100644 --- a/src/test/librados/stat_cxx.cc +++ b/src/test/librados/stat_cxx.cc @@ -4,6 +4,7 @@ #include "test/librados/test_cxx.h" #include "test/librados/testcase_cxx.h" +#include "crimson_utils.h" using namespace librados; @@ -72,6 +73,7 @@ TEST_F(LibRadosStatPP, PoolStatPP) { } TEST_F(LibRadosStatECPP, StatPP) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl; @@ -85,11 +87,13 @@ TEST_F(LibRadosStatECPP, StatPP) { } TEST_F(LibRadosStatECPP, ClusterStatPP) { + SKIP_IF_CRIMSON(); cluster_stat_t cstat; ASSERT_EQ(0, cluster.cluster_stat(cstat)); } TEST_F(LibRadosStatECPP, PoolStatPP) { + SKIP_IF_CRIMSON(); std::string n = ioctx.get_pool_name(); ASSERT_EQ(n, pool_name); char buf[128]; @@ -133,6 +137,7 @@ TEST_F(LibRadosStatPP, StatPPNS) { } TEST_F(LibRadosStatECPP, StatPPNS) { + SKIP_IF_CRIMSON(); char buf[128]; memset(buf, 0xcc, sizeof(buf)); bufferlist bl; diff --git a/src/test/librados/tier_cxx.cc b/src/test/librados/tier_cxx.cc index e8f345bd5adc..b84bea85a123 100644 --- a/src/test/librados/tier_cxx.cc +++ b/src/test/librados/tier_cxx.cc @@ -25,6 +25,7 @@ #include "cls/cas/cls_cas_client.h" #include "cls/cas/cls_cas_internal.h" +#include "crimson_utils.h" using namespace std; using namespace librados; @@ -274,6 +275,7 @@ Completions completions; std::string LibRadosTwoPoolsPP::cache_pool_name; TEST_F(LibRadosTierPP, Dirty) { + SKIP_IF_CRIMSON(); { ObjectWriteOperation op; op.undirty(); @@ -329,6 +331,7 @@ TEST_F(LibRadosTierPP, Dirty) { } TEST_F(LibRadosTwoPoolsPP, Overlay) { + SKIP_IF_CRIMSON(); // create objects { bufferlist bl; @@ -389,6 +392,7 @@ TEST_F(LibRadosTwoPoolsPP, Overlay) { } TEST_F(LibRadosTwoPoolsPP, Promote) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -443,6 +447,7 @@ TEST_F(LibRadosTwoPoolsPP, Promote) { } TEST_F(LibRadosTwoPoolsPP, PromoteSnap) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -586,6 +591,7 @@ TEST_F(LibRadosTwoPoolsPP, PromoteSnap) { } TEST_F(LibRadosTwoPoolsPP, PromoteSnapScrub) { + SKIP_IF_CRIMSON(); int num = 100; // create objects @@ -694,6 +700,7 @@ TEST_F(LibRadosTwoPoolsPP, PromoteSnapScrub) { } TEST_F(LibRadosTwoPoolsPP, PromoteSnapTrimRace) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -753,6 +760,7 @@ TEST_F(LibRadosTwoPoolsPP, PromoteSnapTrimRace) { } TEST_F(LibRadosTwoPoolsPP, Whiteout) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -848,6 +856,7 @@ TEST_F(LibRadosTwoPoolsPP, Whiteout) { } TEST_F(LibRadosTwoPoolsPP, WhiteoutDeleteCreate) { + SKIP_IF_CRIMSON(); // configure cache bufferlist inbl; ASSERT_EQ(0, cluster.mon_command( @@ -893,6 +902,7 @@ TEST_F(LibRadosTwoPoolsPP, WhiteoutDeleteCreate) { } TEST_F(LibRadosTwoPoolsPP, Evict) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -1042,6 +1052,7 @@ TEST_F(LibRadosTwoPoolsPP, Evict) { } TEST_F(LibRadosTwoPoolsPP, EvictSnap) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -1281,6 +1292,7 @@ TEST_F(LibRadosTwoPoolsPP, EvictSnap) { // this test case reproduces http://tracker.ceph.com/issues/8629 TEST_F(LibRadosTwoPoolsPP, EvictSnap2) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -1357,6 +1369,7 @@ TEST_F(LibRadosTwoPoolsPP, EvictSnap2) { //This test case reproduces http://tracker.ceph.com/issues/17445 TEST_F(LibRadosTwoPoolsPP, ListSnap){ + SKIP_IF_CRIMSON(); // Create object { bufferlist bl; @@ -1508,6 +1521,7 @@ TEST_F(LibRadosTwoPoolsPP, ListSnap){ // This test case reproduces https://tracker.ceph.com/issues/49409 TEST_F(LibRadosTwoPoolsPP, EvictSnapRollbackReadRace) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -1618,6 +1632,7 @@ TEST_F(LibRadosTwoPoolsPP, EvictSnapRollbackReadRace) { } TEST_F(LibRadosTwoPoolsPP, TryFlush) { + SKIP_IF_CRIMSON(); // configure cache bufferlist inbl; ASSERT_EQ(0, cluster.mon_command( @@ -1762,6 +1777,7 @@ TEST_F(LibRadosTwoPoolsPP, TryFlush) { } TEST_F(LibRadosTwoPoolsPP, Flush) { + SKIP_IF_CRIMSON(); // configure cache bufferlist inbl; ASSERT_EQ(0, cluster.mon_command( @@ -1958,6 +1974,7 @@ TEST_F(LibRadosTwoPoolsPP, Flush) { } TEST_F(LibRadosTwoPoolsPP, FlushSnap) { + SKIP_IF_CRIMSON(); // configure cache bufferlist inbl; ASSERT_EQ(0, cluster.mon_command( @@ -2153,6 +2170,7 @@ TEST_F(LibRadosTwoPoolsPP, FlushSnap) { } TEST_F(LibRadosTierPP, FlushWriteRaces) { + SKIP_IF_CRIMSON(); Rados cluster; std::string pool_name = get_temp_pool_name(); std::string cache_pool_name = pool_name + "-cache"; @@ -2272,6 +2290,7 @@ TEST_F(LibRadosTierPP, FlushWriteRaces) { } TEST_F(LibRadosTwoPoolsPP, FlushTryFlushRaces) { + SKIP_IF_CRIMSON(); // configure cache bufferlist inbl; ASSERT_EQ(0, cluster.mon_command( @@ -2469,6 +2488,7 @@ void flush_read_race_cb(completion_t cb, void *arg) } TEST_F(LibRadosTwoPoolsPP, TryFlushReadRace) { + SKIP_IF_CRIMSON(); // configure cache bufferlist inbl; ASSERT_EQ(0, cluster.mon_command( @@ -2529,6 +2549,7 @@ TEST_F(LibRadosTwoPoolsPP, TryFlushReadRace) { } TEST_F(LibRadosTierPP, HitSetNone) { + SKIP_IF_CRIMSON(); { list< pair > ls; AioCompletion *c = librados::Rados::aio_create_completion(); @@ -2563,6 +2584,7 @@ string set_pool_str(string pool, string var, int val) } TEST_F(LibRadosTwoPoolsPP, HitSetRead) { + SKIP_IF_CRIMSON(); // make it a tier bufferlist inbl; ASSERT_EQ(0, cluster.mon_command( @@ -2700,6 +2722,7 @@ int make_hitset(Rados& cluster, librados::IoCtx& cache_ioctx, int num_pg, } TEST_F(LibRadosTwoPoolsPP, HitSetWrite) { + SKIP_IF_CRIMSON(); int num_pg = _get_pg_num(cluster, pool_name); ceph_assert(num_pg > 0); @@ -2758,6 +2781,7 @@ TEST_F(LibRadosTwoPoolsPP, HitSetWrite) { } TEST_F(LibRadosTwoPoolsPP, HitSetTrim) { + SKIP_IF_CRIMSON(); unsigned count = 3; unsigned period = 3; @@ -2826,6 +2850,7 @@ TEST_F(LibRadosTwoPoolsPP, HitSetTrim) { } TEST_F(LibRadosTwoPoolsPP, PromoteOn2ndRead) { + SKIP_IF_CRIMSON(); // create object for (int i=0; i<20; ++i) { bufferlist bl; @@ -2950,6 +2975,7 @@ TEST_F(LibRadosTwoPoolsPP, PromoteOn2ndRead) { } TEST_F(LibRadosTwoPoolsPP, ProxyRead) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -3008,6 +3034,7 @@ TEST_F(LibRadosTwoPoolsPP, ProxyRead) { } TEST_F(LibRadosTwoPoolsPP, CachePin) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -3159,6 +3186,7 @@ TEST_F(LibRadosTwoPoolsPP, CachePin) { } TEST_F(LibRadosTwoPoolsPP, SetRedirectRead) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -3199,6 +3227,7 @@ TEST_F(LibRadosTwoPoolsPP, SetRedirectRead) { } TEST_F(LibRadosTwoPoolsPP, ManifestPromoteRead) { + SKIP_IF_CRIMSON(); // skip test if not yet mimic if (_get_required_osd_release(cluster) < "mimic") { GTEST_SKIP() << "cluster is not yet mimic, skipping test"; @@ -3288,6 +3317,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestPromoteRead) { } TEST_F(LibRadosTwoPoolsPP, ManifestRefRead) { + SKIP_IF_CRIMSON(); // note: require >= mimic // create object @@ -3376,6 +3406,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestRefRead) { } TEST_F(LibRadosTwoPoolsPP, ManifestUnset) { + SKIP_IF_CRIMSON(); // skip test if not yet nautilus if (_get_required_osd_release(cluster) < "nautilus") { GTEST_SKIP() << "cluster is not yet nautilus, skipping test"; @@ -3520,6 +3551,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestUnset) { using ceph::crypto::SHA1; #include "rgw/rgw_common.h" TEST_F(LibRadosTwoPoolsPP, ManifestDedupRefRead) { + SKIP_IF_CRIMSON(); // skip test if not yet nautilus if (_get_required_osd_release(cluster) < "nautilus") { GTEST_SKIP() << "cluster is not yet nautilus, skipping test"; @@ -3583,6 +3615,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestDedupRefRead) { } TEST_F(LibRadosTwoPoolsPP, ManifestSnapRefcount) { + SKIP_IF_CRIMSON(); // skip test if not yet octopus if (_get_required_osd_release(cluster) < "octopus") { cout << "cluster is not yet octopus, skipping test" << std::endl; @@ -3890,6 +3923,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestSnapRefcount) { } TEST_F(LibRadosTwoPoolsPP, ManifestSnapRefcount2) { + SKIP_IF_CRIMSON(); // skip test if not yet octopus if (_get_required_osd_release(cluster) < "octopus") { cout << "cluster is not yet octopus, skipping test" << std::endl; @@ -4113,6 +4147,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestSnapRefcount2) { } TEST_F(LibRadosTwoPoolsPP, ManifestTestSnapCreate) { + SKIP_IF_CRIMSON(); // skip test if not yet octopus if (_get_required_osd_release(cluster) < "octopus") { GTEST_SKIP() << "cluster is not yet octopus, skipping test"; @@ -4209,6 +4244,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestTestSnapCreate) { } TEST_F(LibRadosTwoPoolsPP, ManifestRedirectAfterPromote) { + SKIP_IF_CRIMSON(); // skip test if not yet octopus if (_get_required_osd_release(cluster) < "octopus") { GTEST_SKIP() << "cluster is not yet octopus, skipping test"; @@ -4275,6 +4311,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestRedirectAfterPromote) { } TEST_F(LibRadosTwoPoolsPP, ManifestCheckRefcountWhenModification) { + SKIP_IF_CRIMSON(); // skip test if not yet octopus if (_get_required_osd_release(cluster) < "octopus") { GTEST_SKIP() << "cluster is not yet octopus, skipping test"; @@ -4496,6 +4533,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestCheckRefcountWhenModification) { } TEST_F(LibRadosTwoPoolsPP, ManifestSnapIncCount) { + SKIP_IF_CRIMSON(); // skip test if not yet octopus if (_get_required_osd_release(cluster) < "octopus") { cout << "cluster is not yet octopus, skipping test" << std::endl; @@ -4612,6 +4650,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestSnapIncCount) { } TEST_F(LibRadosTwoPoolsPP, ManifestEvict) { + SKIP_IF_CRIMSON(); // skip test if not yet octopus if (_get_required_osd_release(cluster) < "octopus") { cout << "cluster is not yet octopus, skipping test" << std::endl; @@ -4756,6 +4795,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestEvict) { } TEST_F(LibRadosTwoPoolsPP, ManifestEvictPromote) { + SKIP_IF_CRIMSON(); // skip test if not yet octopus if (_get_required_osd_release(cluster) < "octopus") { cout << "cluster is not yet octopus, skipping test" << std::endl; @@ -4852,6 +4892,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestEvictPromote) { TEST_F(LibRadosTwoPoolsPP, ManifestSnapSizeMismatch) { + SKIP_IF_CRIMSON(); // skip test if not yet octopus if (_get_required_osd_release(cluster) < "octopus") { cout << "cluster is not yet octopus, skipping test" << std::endl; @@ -4963,6 +5004,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestSnapSizeMismatch) { #include TEST_F(LibRadosTwoPoolsPP, DedupFlushRead) { + SKIP_IF_CRIMSON(); // skip test if not yet octopus if (_get_required_osd_release(cluster) < "octopus") { GTEST_SKIP() << "cluster is not yet octopus, skipping test"; @@ -5217,6 +5259,7 @@ TEST_F(LibRadosTwoPoolsPP, DedupFlushRead) { } TEST_F(LibRadosTwoPoolsPP, ManifestFlushSnap) { + SKIP_IF_CRIMSON(); // skip test if not yet octopus if (_get_required_osd_release(cluster) < "octopus") { cout << "cluster is not yet octopus, skipping test" << std::endl; @@ -5400,6 +5443,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestFlushSnap) { } TEST_F(LibRadosTwoPoolsPP, ManifestFlushDupCount) { + SKIP_IF_CRIMSON(); // skip test if not yet octopus if (_get_required_osd_release(cluster) < "octopus") { cout << "cluster is not yet octopus, skipping test" << std::endl; @@ -5617,6 +5661,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestFlushDupCount) { } TEST_F(LibRadosTwoPoolsPP, TierFlushDuringFlush) { + SKIP_IF_CRIMSON(); // skip test if not yet octopus if (_get_required_osd_release(cluster) < "octopus") { cout << "cluster is not yet octopus, skipping test" << std::endl; @@ -5697,6 +5742,7 @@ TEST_F(LibRadosTwoPoolsPP, TierFlushDuringFlush) { } TEST_F(LibRadosTwoPoolsPP, ManifestSnapHasChunk) { + SKIP_IF_CRIMSON(); // skip test if not yet octopus if (_get_required_osd_release(cluster) < "octopus") { cout << "cluster is not yet octopus, skipping test" << std::endl; @@ -5875,6 +5921,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestSnapHasChunk) { } TEST_F(LibRadosTwoPoolsPP, ManifestRollback) { + SKIP_IF_CRIMSON(); // skip test if not yet pacific if (_get_required_osd_release(cluster) < "pacific") { cout << "cluster is not yet pacific, skipping test" << std::endl; @@ -5976,6 +6023,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestRollback) { } TEST_F(LibRadosTwoPoolsPP, ManifestRollbackRefcount) { + SKIP_IF_CRIMSON(); // skip test if not yet pacific if (_get_required_osd_release(cluster) < "pacific") { cout << "cluster is not yet pacific, skipping test" << std::endl; @@ -6107,6 +6155,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestRollbackRefcount) { } TEST_F(LibRadosTwoPoolsPP, ManifestEvictRollback) { + SKIP_IF_CRIMSON(); // skip test if not yet pacific if (_get_required_osd_release(cluster) < "pacific") { cout << "cluster is not yet pacific, skipping test" << std::endl; @@ -6259,6 +6308,7 @@ protected: std::string LibRadosTwoPoolsECPP::cache_pool_name; TEST_F(LibRadosTierECPP, Dirty) { + SKIP_IF_CRIMSON(); { ObjectWriteOperation op; op.undirty(); @@ -6314,6 +6364,7 @@ TEST_F(LibRadosTierECPP, Dirty) { } TEST_F(LibRadosTwoPoolsECPP, Overlay) { + SKIP_IF_CRIMSON(); // create objects { bufferlist bl; @@ -6374,6 +6425,7 @@ TEST_F(LibRadosTwoPoolsECPP, Overlay) { } TEST_F(LibRadosTwoPoolsECPP, Promote) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -6428,6 +6480,7 @@ TEST_F(LibRadosTwoPoolsECPP, Promote) { } TEST_F(LibRadosTwoPoolsECPP, PromoteSnap) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -6600,6 +6653,7 @@ TEST_F(LibRadosTwoPoolsECPP, PromoteSnap) { } TEST_F(LibRadosTwoPoolsECPP, PromoteSnapTrimRace) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -6659,6 +6713,7 @@ TEST_F(LibRadosTwoPoolsECPP, PromoteSnapTrimRace) { } TEST_F(LibRadosTwoPoolsECPP, Whiteout) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -6754,6 +6809,7 @@ TEST_F(LibRadosTwoPoolsECPP, Whiteout) { } TEST_F(LibRadosTwoPoolsECPP, Evict) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -6903,6 +6959,7 @@ TEST_F(LibRadosTwoPoolsECPP, Evict) { } TEST_F(LibRadosTwoPoolsECPP, EvictSnap) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -7141,6 +7198,7 @@ TEST_F(LibRadosTwoPoolsECPP, EvictSnap) { } TEST_F(LibRadosTwoPoolsECPP, TryFlush) { + SKIP_IF_CRIMSON(); // configure cache bufferlist inbl; ASSERT_EQ(0, cluster.mon_command( @@ -7285,6 +7343,7 @@ TEST_F(LibRadosTwoPoolsECPP, TryFlush) { } TEST_F(LibRadosTwoPoolsECPP, FailedFlush) { + SKIP_IF_CRIMSON(); // configure cache bufferlist inbl; ASSERT_EQ(0, cluster.mon_command( @@ -7422,6 +7481,7 @@ TEST_F(LibRadosTwoPoolsECPP, FailedFlush) { } TEST_F(LibRadosTwoPoolsECPP, Flush) { + SKIP_IF_CRIMSON(); // configure cache bufferlist inbl; ASSERT_EQ(0, cluster.mon_command( @@ -7618,6 +7678,7 @@ TEST_F(LibRadosTwoPoolsECPP, Flush) { } TEST_F(LibRadosTwoPoolsECPP, FlushSnap) { + SKIP_IF_CRIMSON(); // configure cache bufferlist inbl; ASSERT_EQ(0, cluster.mon_command( @@ -7814,6 +7875,7 @@ TEST_F(LibRadosTwoPoolsECPP, FlushSnap) { } TEST_F(LibRadosTierECPP, FlushWriteRaces) { + SKIP_IF_CRIMSON(); Rados cluster; std::string pool_name = get_temp_pool_name(); std::string cache_pool_name = pool_name + "-cache"; @@ -7933,6 +7995,7 @@ TEST_F(LibRadosTierECPP, FlushWriteRaces) { } TEST_F(LibRadosTwoPoolsECPP, FlushTryFlushRaces) { + SKIP_IF_CRIMSON(); // configure cache bufferlist inbl; ASSERT_EQ(0, cluster.mon_command( @@ -8099,6 +8162,7 @@ TEST_F(LibRadosTwoPoolsECPP, FlushTryFlushRaces) { } TEST_F(LibRadosTwoPoolsECPP, TryFlushReadRace) { + SKIP_IF_CRIMSON(); // configure cache bufferlist inbl; ASSERT_EQ(0, cluster.mon_command( @@ -8159,6 +8223,7 @@ TEST_F(LibRadosTwoPoolsECPP, TryFlushReadRace) { } TEST_F(LibRadosTierECPP, CallForcesPromote) { + SKIP_IF_CRIMSON(); Rados cluster; std::string pool_name = get_temp_pool_name(); std::string cache_pool_name = pool_name + "-cache"; @@ -8276,6 +8341,7 @@ TEST_F(LibRadosTierECPP, CallForcesPromote) { } TEST_F(LibRadosTierECPP, HitSetNone) { + SKIP_IF_CRIMSON(); { list< pair > ls; AioCompletion *c = librados::Rados::aio_create_completion(); @@ -8296,6 +8362,7 @@ TEST_F(LibRadosTierECPP, HitSetNone) { } TEST_F(LibRadosTwoPoolsECPP, HitSetRead) { + SKIP_IF_CRIMSON(); // make it a tier bufferlist inbl; ASSERT_EQ(0, cluster.mon_command( @@ -8435,6 +8502,7 @@ TEST_F(LibRadosTierECPP, HitSetWrite) { #endif TEST_F(LibRadosTwoPoolsECPP, HitSetTrim) { + SKIP_IF_CRIMSON(); unsigned count = 3; unsigned period = 3; @@ -8508,6 +8576,7 @@ TEST_F(LibRadosTwoPoolsECPP, HitSetTrim) { } TEST_F(LibRadosTwoPoolsECPP, PromoteOn2ndRead) { + SKIP_IF_CRIMSON(); // create object for (int i=0; i<20; ++i) { bufferlist bl; @@ -8632,6 +8701,7 @@ TEST_F(LibRadosTwoPoolsECPP, PromoteOn2ndRead) { } TEST_F(LibRadosTwoPoolsECPP, ProxyRead) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -8690,6 +8760,7 @@ TEST_F(LibRadosTwoPoolsECPP, ProxyRead) { } TEST_F(LibRadosTwoPoolsECPP, CachePin) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -8840,6 +8911,7 @@ TEST_F(LibRadosTwoPoolsECPP, CachePin) { cluster.wait_for_latest_osdmap(); } TEST_F(LibRadosTwoPoolsECPP, SetRedirectRead) { + SKIP_IF_CRIMSON(); // create object { bufferlist bl; @@ -8893,6 +8965,7 @@ TEST_F(LibRadosTwoPoolsECPP, SetRedirectRead) { } TEST_F(LibRadosTwoPoolsECPP, SetChunkRead) { + SKIP_IF_CRIMSON(); // note: require >= mimic { @@ -8940,6 +9013,7 @@ TEST_F(LibRadosTwoPoolsECPP, SetChunkRead) { } TEST_F(LibRadosTwoPoolsECPP, ManifestPromoteRead) { + SKIP_IF_CRIMSON(); // note: require >= mimic // create object @@ -9022,6 +9096,7 @@ TEST_F(LibRadosTwoPoolsECPP, ManifestPromoteRead) { } TEST_F(LibRadosTwoPoolsECPP, TrySetDedupTier) { + SKIP_IF_CRIMSON(); // note: require >= mimic bufferlist inbl; @@ -9031,6 +9106,7 @@ TEST_F(LibRadosTwoPoolsECPP, TrySetDedupTier) { } TEST_F(LibRadosTwoPoolsPP, PropagateBaseTierError) { + SKIP_IF_CRIMSON(); // write object to base tier bufferlist omap_bl; encode(static_cast(0U), omap_bl); @@ -9083,6 +9159,7 @@ TEST_F(LibRadosTwoPoolsPP, PropagateBaseTierError) { } TEST_F(LibRadosTwoPoolsPP, HelloWriteReturn) { + SKIP_IF_CRIMSON(); // configure cache bufferlist inbl; ASSERT_EQ(0, cluster.mon_command( @@ -9151,6 +9228,7 @@ TEST_F(LibRadosTwoPoolsPP, HelloWriteReturn) { } TEST_F(LibRadosTwoPoolsPP, TierFlushDuringUnsetDedupTier) { + SKIP_IF_CRIMSON(); // skip test if not yet octopus if (_get_required_osd_release(cluster) < "octopus") { cout << "cluster is not yet octopus, skipping test" << std::endl; diff --git a/src/test/librados/watch_notify.cc b/src/test/librados/watch_notify.cc index 26244ca4d8c1..7893652a9631 100644 --- a/src/test/librados/watch_notify.cc +++ b/src/test/librados/watch_notify.cc @@ -2,6 +2,7 @@ #include "include/rados/rados_types.h" #include "test/librados/test.h" #include "test/librados/TestCase.h" +#include "crimson_utils.h" #include #include @@ -160,6 +161,7 @@ TEST_F(LibRadosWatchNotify, WatchNotify) { } TEST_F(LibRadosWatchNotifyEC, WatchNotify) { + SKIP_IF_CRIMSON(); ASSERT_EQ(0, sem_init(&sem, 0, 0)); char buf[128]; memset(buf, 0xcc, sizeof(buf)); diff --git a/src/test/librados/watch_notify_cxx.cc b/src/test/librados/watch_notify_cxx.cc index 0a145addd1f4..808384bccbbc 100644 --- a/src/test/librados/watch_notify_cxx.cc +++ b/src/test/librados/watch_notify_cxx.cc @@ -11,7 +11,7 @@ #include "include/rados/rados_types.h" #include "test/librados/test_cxx.h" #include "test/librados/testcase_cxx.h" - +#include "crimson_utils.h" using namespace librados; @@ -146,6 +146,7 @@ TEST_P(LibRadosWatchNotifyPP, WatchNotify) { } TEST_F(LibRadosWatchNotifyECPP, WatchNotify) { + SKIP_IF_CRIMSON(); ASSERT_EQ(0, sem_init(&sem, 0, 0)); char buf[128]; memset(buf, 0xcc, sizeof(buf)); @@ -194,6 +195,7 @@ TEST_P(LibRadosWatchNotifyPP, WatchNotifyTimeout) { } TEST_F(LibRadosWatchNotifyECPP, WatchNotifyTimeout) { + SKIP_IF_CRIMSON(); ASSERT_EQ(0, sem_init(&sem, 0, 0)); ioctx.set_notify_timeout(1); uint64_t handle;