]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_test_objectstore: simplify object name generation
authorSage Weil <sage@redhat.com>
Wed, 16 Dec 2015 18:18:53 +0000 (13:18 -0500)
committerSage Weil <sage@redhat.com>
Fri, 1 Jan 2016 18:07:22 +0000 (13:07 -0500)
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 <sage@redhat.com>
src/test/objectstore/store_test.cc

index 14533ef80c198ac091d429a8d9a181955dcab816..9da4c7ed50e7034f8211e71d0f0a3a9fda4ca61b 100644 (file)
@@ -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<uint32_t> bin(0xFFFFFF, 0.5);