]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_test_objectstore: limit entropy in 'random' data so it can compress
authorSage Weil <sage@redhat.com>
Thu, 6 Oct 2016 16:02:10 +0000 (12:02 -0400)
committerSage Weil <sage@redhat.com>
Thu, 6 Oct 2016 16:02:10 +0000 (12:02 -0400)
Both zlib and snappy weren't able to do anything with the current data.

Signed-off-by: Sage Weil <sage@redhat.com>
src/test/objectstore/store_test.cc

index 80df222d861ec57783e68fe3750b2fae87d2963e..8e03f87e87a6164ff0f6fe683e1a4b512d795add 100644 (file)
@@ -3295,7 +3295,8 @@ public:
     }
     bufferptr bp(size);
     for (unsigned int i = 0; i < size - 1; i++) {
-      bp[i] = alphanum[rand() % (sizeof(alphanum) - 1)];
+      // severely limit entropy so we can compress...
+      bp[i] = alphanum[rand() % 10]; //(sizeof(alphanum) - 1)];
     }
     bp[size - 1] = '\0';