]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_test_cls_cas: vary pool in chunk_obj_refcount test
authorSage Weil <sage@newdream.net>
Thu, 21 May 2020 19:09:57 +0000 (14:09 -0500)
committerSage Weil <sage@newdream.net>
Wed, 27 May 2020 16:30:35 +0000 (11:30 -0500)
Signed-off-by: Sage Weil <sage@newdream.net>
src/test/cls_cas/test_cls_cas.cc

index 8ed65b41b5e2b263f9d2f85b582dfbfa99cc9e13..3339768bcde70aaad615991015c13c618b1fc21b 100644 (file)
@@ -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);
   }