mirror of
https://github.com/ceph/ceph
synced 2024-12-19 01:46:00 +00:00
tests: erasure coded pools do not allow offset on creation
If a write operation implicitly creates an object on an erasure coded pool, there cannot be an offset > 0, even if it is properly aligned. Signed-off-by: Loic Dachary <ldachary@redhat.com>
This commit is contained in:
parent
a4f1256c21
commit
125c59bcda
@ -231,6 +231,13 @@ TEST_F(LibRadosIo, RoundTrip) {
|
||||
memset(buf2, 0, sizeof(buf2));
|
||||
ASSERT_EQ((int)sizeof(buf2), rados_read(ioctx, "foo", buf2, sizeof(buf2), 0));
|
||||
ASSERT_EQ(0, memcmp(buf, buf2, sizeof(buf)));
|
||||
|
||||
uint64_t off = 19;
|
||||
memset(buf, 0xcc, sizeof(buf));
|
||||
ASSERT_EQ(0, rados_write(ioctx, "bar", buf, sizeof(buf), off));
|
||||
memset(buf2, 0, sizeof(buf2));
|
||||
ASSERT_EQ((int)sizeof(buf2), rados_read(ioctx, "bar", buf2, sizeof(buf2), off));
|
||||
ASSERT_EQ(0, memcmp(buf, buf2, sizeof(buf)));
|
||||
}
|
||||
|
||||
TEST_F(LibRadosIoPP, RoundTripPP) {
|
||||
@ -697,6 +704,9 @@ TEST_F(LibRadosIoEC, RoundTrip) {
|
||||
memset(buf2, 0, sizeof(buf2));
|
||||
ASSERT_EQ((int)sizeof(buf2), rados_read(ioctx, "foo", buf2, sizeof(buf2), 0));
|
||||
ASSERT_EQ(0, memcmp(buf, buf2, sizeof(buf)));
|
||||
|
||||
uint64_t off = 19;
|
||||
ASSERT_EQ(-EOPNOTSUPP, rados_write(ioctx, "bar", buf, sizeof(buf), off));
|
||||
}
|
||||
|
||||
TEST_F(LibRadosIoECPP, RoundTripPP) {
|
||||
|
Loading…
Reference in New Issue
Block a user