From 97cb04a15bb1b99481b0cb3fd89dba0de90bf6b0 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 6 Oct 2016 12:02:10 -0400 Subject: [PATCH] ceph_test_objectstore: limit entropy in 'random' data so it can compress Both zlib and snappy weren't able to do anything with the current data. Signed-off-by: Sage Weil --- src/test/objectstore/store_test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/objectstore/store_test.cc b/src/test/objectstore/store_test.cc index 80df222d861..8e03f87e87a 100644 --- a/src/test/objectstore/store_test.cc +++ b/src/test/objectstore/store_test.cc @@ -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'; -- 2.39.5