From: Sage Weil Date: Wed, 16 Dec 2015 18:18:53 +0000 (-0500) Subject: ceph_test_objectstore: simplify object name generation X-Git-Tag: v10.0.3~154^2~88 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1769163eba349596faae443c4d40542cf306c919;p=ceph.git 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 --- diff --git a/src/test/objectstore/store_test.cc b/src/test/objectstore/store_test.cc index 14533ef80c19..9da4c7ed50e7 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);