From fb969df53177e85f6e01262e1ddda6fcabf56b40 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 17 Apr 2017 14:24:57 -0400 Subject: [PATCH] ceph_test_rados_api_list: update check_list We no longer see dup entries on split. Signed-off-by: Sage Weil --- src/test/librados/list.cc | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/test/librados/list.cc b/src/test/librados/list.cc index 50c61a43889..77f5f54fed3 100644 --- a/src/test/librados/list.cc +++ b/src/test/librados/list.cc @@ -138,16 +138,13 @@ TEST_F(LibRadosListPP, ListObjectsEndIter) { ASSERT_TRUE(iter2 == iter_end2); } -static void check_list(std::set& myset, rados_list_ctx_t& ctx, std::string check_nspace) +static void check_list( + std::set& myset, + rados_list_ctx_t& ctx, + std::string check_nspace) { const char *entry, *nspace; - std::set orig_set(myset); - /** - * During splitting, we might see duplicate items. - * We assert that every object returned is in myset and that - * we don't hit ENOENT until we have hit every item in myset - * at least once. - */ + // we should see every item exactly once. int ret; while ((ret = rados_nobjects_list_next(ctx, &entry, NULL, &nspace)) == 0) { std::string test_name; @@ -158,7 +155,7 @@ static void check_list(std::set& myset, rados_list_ctx_t& ctx, std: test_name = std::string(entry); } - ASSERT_TRUE(orig_set.end() != orig_set.find(test_name)); + ASSERT_TRUE(myset.end() != myset.find(test_name)); myset.erase(test_name); } ASSERT_EQ(-ENOENT, ret); -- 2.39.5