]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
testlibrbdpp: read conf file and don't double-delete AioCompletion
authorJosh Durgin <josh.durgin@dreamhost.com>
Mon, 14 Mar 2011 17:33:15 +0000 (10:33 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Mon, 14 Mar 2011 21:44:07 +0000 (14:44 -0700)
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
src/testlibrbdpp.cc

index eb51db7226fa26b1c95d7d75cae75e133176a7ca..67b4e1446288ca87cc90872ee14f7014d1b00a9c 100644 (file)
@@ -171,7 +171,6 @@ void aio_write_test_data(librbd::Image& image, const char *test_data, off_t off)
   assert(r == 0);
   printf("finished write\n");
   comp->release();
-  delete comp;
 }
 
 void write_test_data(librbd::Image& image, const char *test_data, off_t off)
@@ -199,7 +198,6 @@ void aio_read_test_data(librbd::Image& image, const char *expected, off_t off)
   assert(strncmp(expected, bl.c_str(), TEST_IO_SIZE - 1) == 0);
   printf("finished read\n");
   comp->release();
-  delete comp;
 }
 
 void read_test_data(librbd::Image& image, const char *expected, off_t off)
@@ -247,6 +245,8 @@ int main(int argc, const char **argv)
   librbd::Image image;
   rbd = new librbd::RBD();
   assert(rados.init(NULL) == 0);
+  assert(rados.conf_read_file("/etc/ceph/ceph.conf") == 0);
+  rados.reopen_log();
   assert(rados.connect() == 0);
   if (rados.pool_lookup(TEST_POOL) != -ENOENT) {
     int r = rados.pool_delete(TEST_POOL);