ceph_test_rados_api_tier_pp: tolerate ENOENT or success from deleted snap

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2019-06-30 15:06:37 -05:00
parent 5b0ed6ff9e
commit adacc20046

View File

@ -633,10 +633,12 @@ TEST_F(LibRadosTwoPoolsPP, PromoteSnapTrimRace) {
ioctx.snap_set_read(my_snaps[0]);
// read foo snap
// read foo snap. the OSD may or may not realize that this snap has
// been logically deleted; either response is valid.
{
bufferlist bl;
ASSERT_EQ(-ENOENT, ioctx.read("foo", bl, 1, 0));
int r = ioctx.read("foo", bl, 1, 0);
ASSERT_TRUE(r == 1 || r == -ENOENT);
}
// cleanup
@ -3961,10 +3963,12 @@ TEST_F(LibRadosTwoPoolsECPP, PromoteSnapTrimRace) {
ioctx.snap_set_read(my_snaps[0]);
// read foo snap
// read foo snap. the OSD may or may not realize that this snap has
// been logically deleted; either response is valid.
{
bufferlist bl;
ASSERT_EQ(-ENOENT, ioctx.read("foo", bl, 1, 0));
int r = ioctx.read("foo", bl, 1, 0);
ASSERT_TRUE(r == 1 || r == -ENOENT);
}
// cleanup