From d0ca26b27766b3911197f294ae659dbdc06d4a07 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 21 May 2020 14:09:57 -0500 Subject: [PATCH] ceph_test_cls_cas: vary pool in chunk_obj_refcount test Signed-off-by: Sage Weil --- src/test/cls_cas/test_cls_cas.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/cls_cas/test_cls_cas.cc b/src/test/cls_cas/test_cls_cas.cc index 8ed65b41b5e..3339768bcde 100644 --- a/src/test/cls_cas/test_cls_cas.cc +++ b/src/test/cls_cas/test_cls_cas.cc @@ -299,9 +299,11 @@ static int count_bits(unsigned long n) TEST(chunk_obj_refcount, size) { chunk_obj_refcount r; + size_t poolmask = 0xf0f0f0; size_t max = 1048576; for (size_t i = 0; i < max; ++i) { - hobject_t h(sobject_t(object_t("foo"s + stringify(i)), 1)); + hobject_t h(sobject_t(object_t("foo"s + stringify(i)), i)); + h.pool = i & poolmask; bool ret = r.get(h); ASSERT_TRUE(ret); if (count_bits(i) <= 2) { @@ -315,6 +317,7 @@ TEST(chunk_obj_refcount, size) ASSERT_EQ(max, r.count()); for (size_t i = 0; i < max; ++i) { hobject_t h(sobject_t(object_t("foo"s + stringify(i)), 1)); + h.pool = i & poolmask; bool ret = r.put(h); ASSERT_TRUE(ret); } -- 2.39.5