From 1769163eba349596faae443c4d40542cf306c919 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 16 Dec 2015 13:18:53 -0500 Subject: [PATCH] ceph_test_objectstore: simplify object name generation The long names don't exercise useful code paths, and having consistent naming makes it easier to grep through logs. Signed-off-by: Sage Weil --- src/test/objectstore/store_test.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/objectstore/store_test.cc b/src/test/objectstore/store_test.cc index 14533ef80c198..9da4c7ed50e70 100644 --- a/src/test/objectstore/store_test.cc +++ b/src/test/objectstore/store_test.cc @@ -1259,16 +1259,17 @@ public: MixedGenerator(int64_t p) : seq(0), poolid(p) {} ghobject_t create_object(gen_type *gen) { char buf[100]; - snprintf(buf, sizeof(buf), "%u", seq); + snprintf(buf, sizeof(buf), "OBJ_%u", seq); + string name(buf); + /* boost::uniform_int<> true_false(0, 1); - string name(buf); if (true_false(*gen)) { // long for (int i = 0; i < 100; ++i) name.append("aaaaa"); } else if (true_false(*gen)) { name = "DIR_" + name; - } + }*/ // hash //boost::binomial_distribution bin(0xFFFFFF, 0.5); -- 2.39.5