diff options
author | Matan Breizman <mbreizma@redhat.com> | 2024-01-14 15:05:39 +0100 |
---|---|---|
committer | Matan Breizman <mbreizma@redhat.com> | 2024-01-17 12:05:46 +0100 |
commit | b99ffc4f3e980d20374df4afeac2375eb36e37bb (patch) | |
tree | cf29f30e218335aa568a24b25544f0f01794ce80 /src/test/neorados/io.cc | |
parent | test/neorados/io: Crimson - Skip NeoRadosIo.Limits (diff) | |
download | ceph-b99ffc4f3e980d20374df4afeac2375eb36e37bb.tar.xz ceph-b99ffc4f3e980d20374df4afeac2375eb36e37bb.zip |
test/neorados/aio_cxx: Seperate NeoRadosECTest from NeoRadosTest
SKIP_IF_CRIMSON won't work here since we try to create EC pools
prior to the test being run.
Skip if the entire test instead by seperating EC tests.
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | src/test/neorados/io.cc | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/src/test/neorados/io.cc b/src/test/neorados/io.cc index a73d6d36e07..82fabf185b9 100644 --- a/src/test/neorados/io.cc +++ b/src/test/neorados/io.cc @@ -379,94 +379,3 @@ CORO_TEST_F(NeoRadosIo, GetXattrs, NeoRadosTest) { co_return; } - -CORO_TEST_F(NeoRadosECIo, SimpleWrite, NeoRadosECTest) { - SKIP_IF_CRIMSON(); - static constexpr auto nspace = "nspace"; - auto pool2 = pool(); - const auto bl = filled_buffer_list(0xcc, 128); - - pool2.set_ns(nspace); - EXPECT_EQ(nspace, pool2.get_ns()); - - { - co_await execute(oid, WriteOp().write(0, bl)); - auto resbl = co_await read(oid); - EXPECT_EQ(bl, resbl); - } - - { - co_await execute(oid, WriteOp().write(0, bl), pool2); - auto resbl = co_await read(oid, pool2); - EXPECT_EQ(bl, resbl); - } - - co_return; -} - -CORO_TEST_F(NeoRadosECIo, ReadOp, NeoRadosECTest) { - SKIP_IF_CRIMSON(); - const auto refbl = filled_buffer_list(0xcc, 128); - - co_await execute(oid, WriteOp{}.write_full(refbl)); - { - buffer::list op_bl; - co_await rados().execute(oid, pool(), - ReadOp().read(0, refbl.length(), nullptr), - &op_bl, asio::use_awaitable); - EXPECT_EQ(refbl, op_bl); - } - { - buffer::list op_bl; - // 0 means read the whole object data. - co_await rados().execute(oid, pool(), - ReadOp().read(0, 0, nullptr), - &op_bl, asio::use_awaitable); - EXPECT_EQ(refbl, op_bl); - } - { - buffer::list read_bl, op_bl; - co_await rados().execute(oid, pool(), - ReadOp().read(0, refbl.length(), &read_bl), - &op_bl, asio::use_awaitable); - EXPECT_EQ(refbl, read_bl); - EXPECT_EQ(refbl, op_bl); - } - { - buffer::list read_bl, op_bl; - // 0 means read the whole object data. - co_await rados().execute(oid, pool(), - ReadOp().read(0, 0, &read_bl), - &op_bl, asio::use_awaitable); - EXPECT_EQ(refbl, read_bl); - EXPECT_EQ(refbl, op_bl); - } - - { - buffer::list read_bl, read_bl2, op_bl; - // 0 means read the whole object data. - co_await rados().execute(oid, pool(), ReadOp{} - .read(0, 0, &read_bl) - .read(0, 0, &read_bl2), - &op_bl, asio::use_awaitable); - EXPECT_EQ(refbl, read_bl); - EXPECT_EQ(refbl, read_bl2); - buffer::list bl2; - bl2.append(refbl); - bl2.append(refbl); - EXPECT_EQ(bl2, op_bl); - } - { - // Read into buffer with a cached crc - auto op_bl = filled_buffer_list('z', refbl.length()); - EXPECT_NE(refbl.crc32c(0), op_bl.crc32c(0)); // cache 'x' crc - - co_await rados().execute(oid, pool(), - ReadOp().read(0, refbl.length(), nullptr), - &op_bl, asio::use_awaitable); - EXPECT_EQ(refbl, op_bl); - EXPECT_EQ(refbl.crc32c(0), op_bl.crc32c(0)); // cache 'x' crc - } - - co_return; -} |