]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/libcephfs: release resources before umount
authorYan, Zheng <zheng.z.yan@intel.com>
Tue, 10 Dec 2013 23:38:18 +0000 (07:38 +0800)
committerSage Weil <sage@inktank.com>
Fri, 13 Dec 2013 17:57:50 +0000 (09:57 -0800)
Fixes: #6742
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/test/libcephfs/readdir_r_cb.cc

index 4a99f102da221913ab5e11293589826ec6d34b8a..946a4055d15d6b8b5c4df64b109e71aa6ae1b447 100644 (file)
@@ -38,6 +38,7 @@ TEST(LibCephFS, ReaddirRCB) {
   sprintf(c_file, "/readdir_r_cb_tests_%d/foo", getpid());
   int fd = ceph_open(cmount, c_file, O_CREAT, 0777);
   ASSERT_LT(0, fd);
+  ASSERT_EQ(0, ceph_close(cmount, fd));
 
   // check correctness with one entry
   ASSERT_LE(0, ceph_closedir(cmount, dirp));
@@ -56,6 +57,7 @@ TEST(LibCephFS, ReaddirRCB) {
   ASSERT_EQ(4, ceph_getdnames(cmount, dirp, buf, 6));
 
   // free cmount after finishing testing
+  ASSERT_LE(0, ceph_closedir(cmount, dirp));
   ASSERT_EQ(0, ceph_unmount(cmount));
   ASSERT_EQ(0, ceph_release(cmount));
 }