From: Sage Weil Date: Fri, 14 Nov 2014 06:33:10 +0000 (-0800) Subject: ceph_test_rados_api_tier: fix cleanup of whiteouts X-Git-Tag: v0.80.11~25^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=971eb3f6dddb509d15e5e4bcfd5e34d42ae2e75b;p=ceph.git ceph_test_rados_api_tier: fix cleanup of whiteouts Doing a normal DELETE on a whiteout returns ENOENT. Use the IGNORE_CACHE flag to make sure it removes the whiteout, too. Fixes: #10052 Signed-off-by: Sage Weil (cherry picked from commit 8dde6a61921798aa188bd69406c8fa7afeb96b45) Conflicts: src/test/librados/TestCase.cc for it of type ObjectIterator: - use it->first instead of it->get_oid() - use it->second instead of it->get_locator() --- diff --git a/src/test/librados/TestCase.cc b/src/test/librados/TestCase.cc index 7f072fd850f..3747683b702 100644 --- a/src/test/librados/TestCase.cc +++ b/src/test/librados/TestCase.cc @@ -91,7 +91,14 @@ void RadosTestPP::cleanup_default_namespace(librados::IoCtx ioctx) for (ObjectIterator it = ioctx.objects_begin(); it != ioctx.objects_end(); ++it) { ioctx.locator_set_key(it->second); - ASSERT_EQ(0, ioctx.remove(it->first)); + ObjectWriteOperation op; + op.remove(); + librados::AioCompletion *completion = s_cluster.aio_create_completion(); + ASSERT_EQ(0, ioctx.aio_operate(it->first, completion, &op, + librados::OPERATION_IGNORE_CACHE)); + completion->wait_for_safe(); + ASSERT_EQ(0, completion->get_return_value()); + completion->release(); } }