Merge pull request #50457 from Matan-B/wip-matanb-c-new-rbd-api

qa/suites/crimson-rados/rbd: Add new rbd image format api tests

Reviewed-by: Samuel Just <sjust@redhat.com>
This commit is contained in:
Matan 2023-05-02 12:21:35 +03:00 committed by GitHub
commit 010e298f9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 54 additions and 1 deletions

View File

@ -0,0 +1,21 @@
overrides:
ceph:
log-ignorelist:
- overall HEALTH_
- \(CACHE_POOL_NO_HIT_SET\)
- \(POOL_APP_NOT_ENABLED\)
- is full \(reached quota
- \(OSDMAP_FLAGS\)
- \(OSD_
- \(PG_
- \(POOL_
- \(CACHE_POOL_
- \(POOL_FULL\)
tasks:
- workunit:
clients:
client.0:
- rbd/crimson/test_crimson_librbd.sh
env:
RBD_FEATURES: "61"

View File

@ -20,6 +20,7 @@
#include "gtest/gtest.h"
#include "test/librados/test_cxx.h"
#include "test/librados/crimson_utils.h"
#include <errno.h>
#include <string>
@ -1797,6 +1798,7 @@ TEST_F(TestClsRbd, mirror_image) {
}
TEST_F(TestClsRbd, mirror_image_status) {
SKIP_IF_CRIMSON();
struct WatchCtx : public librados::WatchCtx2 {
librados::IoCtx *m_ioctx;

View File

@ -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;

View File

@ -29,6 +29,7 @@
#include <boost/assign/list_of.hpp>
#include <utility>
#include <vector>
#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;
@ -1730,6 +1738,7 @@ TEST_F(TestInternal, Sparsify) {
TEST_F(TestInternal, SparsifyClone) {
SKIP_IF_CRIMSON();
REQUIRE_FEATURE(RBD_FEATURE_LAYERING);
librbd::ImageCtx *ictx;

View File

@ -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;
@ -8528,6 +8530,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;
@ -8580,6 +8583,7 @@ TEST_F(TestLibRBD, RebuildObjectMapViaLockOwner)
TEST_F(TestLibRBD, RenameViaLockOwner)
{
SKIP_IF_CRIMSON();
REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK);
librados::IoCtx ioctx;
@ -8620,6 +8624,7 @@ TEST_F(TestLibRBD, RenameViaLockOwner)
TEST_F(TestLibRBD, SnapCreateViaLockOwner)
{
SKIP_IF_CRIMSON();
REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK);
librados::IoCtx ioctx;
@ -8664,6 +8669,7 @@ TEST_F(TestLibRBD, SnapCreateViaLockOwner)
TEST_F(TestLibRBD, SnapRemoveViaLockOwner)
{
SKIP_IF_CRIMSON();
REQUIRE_FEATURE(RBD_FEATURE_FAST_DIFF);
librados::IoCtx ioctx;
@ -8704,7 +8710,7 @@ TEST_F(TestLibRBD, SnapRemoveViaLockOwner)
}
TEST_F(TestLibRBD, UpdateFeaturesViaLockOwner) {
SKIP_IF_CRIMSON();
REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK);
librados::IoCtx ioctx;
@ -8955,6 +8961,7 @@ TEST_F(TestLibRBD, SnapUnprotectViaLockOwner)
TEST_F(TestLibRBD, FlattenViaLockOwner)
{
SKIP_IF_CRIMSON();
REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK);
librados::IoCtx ioctx;
@ -9003,6 +9010,7 @@ TEST_F(TestLibRBD, FlattenViaLockOwner)
TEST_F(TestLibRBD, ResizeViaLockOwner)
{
SKIP_IF_CRIMSON();
REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK);
librados::IoCtx ioctx;
@ -9039,6 +9047,7 @@ TEST_F(TestLibRBD, ResizeViaLockOwner)
TEST_F(TestLibRBD, SparsifyViaLockOwner)
{
SKIP_IF_CRIMSON();
REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK);
librados::IoCtx ioctx;
@ -9743,6 +9752,7 @@ TEST_F(TestLibRBD, BlockingAIO)
TEST_F(TestLibRBD, ExclusiveLockTransition)
{
SKIP_IF_CRIMSON();
REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK);
librados::IoCtx ioctx;
@ -10416,6 +10426,7 @@ TEST_F(TestLibRBD, FlushCacheWithCopyupOnExternalSnapshot) {
TEST_F(TestLibRBD, ExclusiveLock)
{
SKIP_IF_CRIMSON();
REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK);
static char buf[10];
@ -10559,6 +10570,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()));
@ -11950,6 +11962,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);
@ -12041,6 +12054,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));
@ -12120,6 +12134,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));
@ -12478,6 +12493,7 @@ TEST_F(TestLibRBD, WriteZeroesThickProvision) {
TEST_F(TestLibRBD, ConcurrentOperations)
{
SKIP_IF_CRIMSON();
REQUIRE_FEATURE(RBD_FEATURE_EXCLUSIVE_LOCK);
librbd::RBD rbd;

View File

@ -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));