From 17a321e8d40c2d81d2f7b9a1cf5cccbb8531364b Mon Sep 17 00:00:00 2001 From: Matan Breizman Date: Thu, 9 Mar 2023 10:59:18 +0000 Subject: [PATCH] test/librbd: Skip unsupported Crimson tests This commit is part of an initial attempt to establish a Crimson testing baseline. test_librbd notes: * Skip ListChildrenTiered (Crimson): Cache tiering is not supported. test_internal notes: * Skip SnapshotCopyup (Crimson): Clone overlap calculation is WIP: https://tracker.ceph.com/issues/58263 Signed-off-by: Matan Breizman (cherry picked from commit 89d50e933d67dcda08f75968f9e403d9a0cd710f) --- src/test/librbd/test_Groups.cc | 3 +++ src/test/librbd/test_internal.cc | 9 +++++++++ src/test/librbd/test_librbd.cc | 18 +++++++++++++++++- src/test/librbd/test_mirroring.cc | 2 ++ 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/test/librbd/test_Groups.cc b/src/test/librbd/test_Groups.cc index 88b19146f16..7e666479722 100644 --- a/src/test/librbd/test_Groups.cc +++ b/src/test/librbd/test_Groups.cc @@ -3,6 +3,7 @@ #include "test/librbd/test_fixture.h" #include "test/librbd/test_support.h" +#include "test/librados/crimson_utils.h" #include "include/rbd/librbd.h" #include "include/rbd/librbd.hpp" #include "test/librados/test.h" @@ -219,6 +220,7 @@ TEST_F(TestGroup, add_imagePP) TEST_F(TestGroup, add_snapshot) { + SKIP_IF_CRIMSON(); REQUIRE_FORMAT_V2(); rados_ioctx_t ioctx; @@ -365,6 +367,7 @@ TEST_F(TestGroup, add_snapshot) TEST_F(TestGroup, add_snapshotPP) { + SKIP_IF_CRIMSON(); REQUIRE_FORMAT_V2(); librados::IoCtx ioctx; diff --git a/src/test/librbd/test_internal.cc b/src/test/librbd/test_internal.cc index 5a090930fba..7858d88c403 100644 --- a/src/test/librbd/test_internal.cc +++ b/src/test/librbd/test_internal.cc @@ -29,6 +29,7 @@ #include #include #include +#include "test/librados/crimson_utils.h" using namespace std; @@ -267,6 +268,7 @@ TEST_F(TestInternal, SnapCreateFailsToLockImage) { } TEST_F(TestInternal, SnapRollbackLocksImage) { + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK); ASSERT_EQ(0, create_snapshot("snap1", false)); @@ -378,6 +380,7 @@ TEST_F(TestInternal, FlattenFailsToLockImage) { } TEST_F(TestInternal, WriteFailsToLockImageBlocklisted) { + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK); librados::Rados blocklist_rados; @@ -411,6 +414,7 @@ TEST_F(TestInternal, WriteFailsToLockImageBlocklisted) { } TEST_F(TestInternal, WriteFailsToLockImageBlocklistedWatch) { + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK); librados::Rados blocklist_rados; @@ -654,6 +658,9 @@ TEST_F(TestInternal, MetadataConfApply) { TEST_F(TestInternal, SnapshotCopyup) { + //https://tracker.ceph.com/issues/58263 + // Clone overlap is WIP + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_LAYERING); librbd::ImageCtx *ictx; @@ -1175,6 +1182,7 @@ TEST_F(TestInternal, ImageOptions) { } TEST_F(TestInternal, WriteFullCopyup) { + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_LAYERING); librbd::ImageCtx *ictx; @@ -1729,6 +1737,7 @@ TEST_F(TestInternal, Sparsify) { TEST_F(TestInternal, SparsifyClone) { + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_LAYERING); librbd::ImageCtx *ictx; diff --git a/src/test/librbd/test_librbd.cc b/src/test/librbd/test_librbd.cc index 05e7b1aa240..cc9b597a301 100644 --- a/src/test/librbd/test_librbd.cc +++ b/src/test/librbd/test_librbd.cc @@ -21,6 +21,7 @@ #include "include/err.h" #include "common/ceph_mutex.h" #include "json_spirit/json_spirit.h" +#include "test/librados/crimson_utils.h" #include "gtest/gtest.h" @@ -6924,6 +6925,7 @@ TEST_F(TestLibRBD, ListChildren) TEST_F(TestLibRBD, ListChildrenTiered) { + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_LAYERING); librbd::RBD rbd; @@ -8527,6 +8529,7 @@ TEST_F(TestLibRBD, SnapshotLimitPP) TEST_F(TestLibRBD, RebuildObjectMapViaLockOwner) { + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK | RBD_FEATURE_OBJECT_MAP); librados::IoCtx ioctx; @@ -8579,6 +8582,7 @@ TEST_F(TestLibRBD, RebuildObjectMapViaLockOwner) TEST_F(TestLibRBD, RenameViaLockOwner) { + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK); librados::IoCtx ioctx; @@ -8619,6 +8623,7 @@ TEST_F(TestLibRBD, RenameViaLockOwner) TEST_F(TestLibRBD, SnapCreateViaLockOwner) { + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK); librados::IoCtx ioctx; @@ -8663,6 +8668,7 @@ TEST_F(TestLibRBD, SnapCreateViaLockOwner) TEST_F(TestLibRBD, SnapRemoveViaLockOwner) { + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_FAST_DIFF); librados::IoCtx ioctx; @@ -8703,7 +8709,7 @@ TEST_F(TestLibRBD, SnapRemoveViaLockOwner) } TEST_F(TestLibRBD, UpdateFeaturesViaLockOwner) { - + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK); librados::IoCtx ioctx; @@ -8954,6 +8960,7 @@ TEST_F(TestLibRBD, SnapUnprotectViaLockOwner) TEST_F(TestLibRBD, FlattenViaLockOwner) { + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK); librados::IoCtx ioctx; @@ -9002,6 +9009,7 @@ TEST_F(TestLibRBD, FlattenViaLockOwner) TEST_F(TestLibRBD, ResizeViaLockOwner) { + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK); librados::IoCtx ioctx; @@ -9038,6 +9046,7 @@ TEST_F(TestLibRBD, ResizeViaLockOwner) TEST_F(TestLibRBD, SparsifyViaLockOwner) { + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK); librados::IoCtx ioctx; @@ -9742,6 +9751,7 @@ TEST_F(TestLibRBD, BlockingAIO) TEST_F(TestLibRBD, ExclusiveLockTransition) { + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK); librados::IoCtx ioctx; @@ -10415,6 +10425,7 @@ TEST_F(TestLibRBD, FlushCacheWithCopyupOnExternalSnapshot) { TEST_F(TestLibRBD, ExclusiveLock) { + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK); static char buf[10]; @@ -10558,6 +10569,7 @@ TEST_F(TestLibRBD, ExclusiveLock) TEST_F(TestLibRBD, BreakLock) { + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK); REQUIRE(!is_rbd_pwl_enabled((CephContext *)_rados.cct())); @@ -11949,6 +11961,7 @@ TEST_F(TestLibRBD, SnapRemoveWithChildMissing) TEST_F(TestLibRBD, QuiesceWatch) { + SKIP_IF_CRIMSON(); rados_ioctx_t ioctx; rados_ioctx_create(_cluster, m_pool_name.c_str(), &ioctx); @@ -12040,6 +12053,7 @@ TEST_F(TestLibRBD, QuiesceWatch) TEST_F(TestLibRBD, QuiesceWatchPP) { + SKIP_IF_CRIMSON(); librbd::RBD rbd; librados::IoCtx ioctx; ASSERT_EQ(0, _rados.ioctx_create(m_pool_name.c_str(), ioctx)); @@ -12119,6 +12133,7 @@ TEST_F(TestLibRBD, QuiesceWatchPP) TEST_F(TestLibRBD, QuiesceWatchError) { + SKIP_IF_CRIMSON(); librbd::RBD rbd; librados::IoCtx ioctx; ASSERT_EQ(0, _rados.ioctx_create(m_pool_name.c_str(), ioctx)); @@ -12477,6 +12492,7 @@ TEST_F(TestLibRBD, WriteZeroesThickProvision) { TEST_F(TestLibRBD, ConcurentOperations) { + SKIP_IF_CRIMSON(); REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK); librbd::RBD rbd; diff --git a/src/test/librbd/test_mirroring.cc b/src/test/librbd/test_mirroring.cc index 19ba5277d30..db8538ed13f 100644 --- a/src/test/librbd/test_mirroring.cc +++ b/src/test/librbd/test_mirroring.cc @@ -13,6 +13,7 @@ */ #include "test/librbd/test_fixture.h" #include "test/librbd/test_support.h" +#include "test/librados/crimson_utils.h" #include "librbd/ExclusiveLock.h" #include "librbd/ImageState.h" #include "librbd/ImageWatcher.h" @@ -1223,6 +1224,7 @@ TEST_F(TestMirroring, SnapshotRemoveOnDisable) TEST_F(TestMirroring, SnapshotUnlinkPeer) { + SKIP_IF_CRIMSON(); REQUIRE_FORMAT_V2(); ASSERT_EQ(0, m_rbd.mirror_mode_set(m_ioctx, RBD_MIRROR_MODE_IMAGE)); -- 2.39.5