]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
testlibrbd: change strcmp to memcmp, other stuff
authorYehuda Sadeh <yehuda.sadeh@dreamhost.com>
Thu, 10 Feb 2011 00:19:16 +0000 (16:19 -0800)
committerYehuda Sadeh <yehuda.sadeh@dreamhost.com>
Thu, 10 Feb 2011 00:19:16 +0000 (16:19 -0800)
src/testlibrbd.c

index fb948f350cef559bf7f7080eedb02cdc5a0ba0b0..43acd9af3f9b13c8f3bc7db99ee8c05b95a10422 100644 (file)
@@ -227,7 +227,7 @@ void read_test_data(rbd_image_t image, const char *expected, off_t off)
     printf("read: %u\n", (unsigned int) read);
   }
   printf("read: %s\nexpected: %s\n", result, expected);
-  assert(strncmp(result, expected, expected_len) == 0);
+  assert(memcmp(result, expected, expected_len) == 0);
 }
 
 void test_io(rbd_pool_t pool, rbd_image_t image)
@@ -259,7 +259,7 @@ int main(int argc, const char **argv)
 {
   rbd_pool_t pool;
   rbd_image_t image;
-  assert(rbd_initialize(0, NULL) == 0);
+  assert(rbd_initialize(argc, argv) == 0);
   assert(rbd_open_pool(TEST_POOL, &pool) == 0);
   test_ls(pool, 0);
   test_create_and_stat(pool, TEST_IMAGE, MB_BYTES(1));