]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
testceph: test file opens with extra slashes
authorGreg Farnum <gregory.farnum@dreamhost.com>
Tue, 28 Jun 2011 21:19:29 +0000 (14:19 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Tue, 28 Jun 2011 21:19:29 +0000 (14:19 -0700)
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/client/testceph.cc

index dddb9986c4738d71e9ff972aea64388c4149af15..7601b7cef6fbbcc2277a5be1b87e478d912d5d41 100644 (file)
@@ -264,6 +264,22 @@ int main(int argc, const char **argv)
     cout << "ceph_close: success" << std::endl;
   }
 
+  // test empty name components
+  my_fd = ret = ceph_open(cmount, "readdir_test//opened_file_1", O_RDONLY, 0666);
+  if (ret < 0) {
+    cerr << "ceph_open O_RDONLY error: " << cpp_strerror(ret) << std::endl;
+    return 1;
+  } else {
+    cout << "ceph_open: success" << std::endl;
+  }
+  ret = ceph_close(cmount, my_fd);
+  if (ret < 0) {
+    cerr << "ceph_close error: " << cpp_strerror(ret) << std::endl;
+    return 1;
+  } else {
+    cout << "ceph_close: success" << std::endl;
+  }
+
   struct ceph_dir_result *readdir_test_dir;
   ret = ceph_opendir(cmount, "readdir_test", &readdir_test_dir);
   if (ret != 0) {