From: Nikhilkumar Shelke Date: Mon, 7 Mar 2022 07:29:19 +0000 (+0530) Subject: qa: test ceph-fuse mount on already mounted path X-Git-Tag: v18.0.0~1228^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=34cf3ec723185d625ba97bbda707dc81bbdfaa72;p=ceph.git qa: test ceph-fuse mount on already mounted path Fixes: https://tracker.ceph.com/issues/46075 Signed-off-by: Nikhilkumar Shelke --- diff --git a/qa/tasks/cephfs/test_misc.py b/qa/tasks/cephfs/test_misc.py index 0367c141f29c..3201425e09f3 100644 --- a/qa/tasks/cephfs/test_misc.py +++ b/qa/tasks/cephfs/test_misc.py @@ -29,6 +29,21 @@ class TestMisc(CephFSTestCase): self.mount_a.umount_wait(force=True) p.wait() + def test_fuse_mount_on_already_mounted_path(self): + if not isinstance(self.mount_a, FuseMount): + self.skipTest("Require FUSE client") + + # Try to mount already mounted path + # expecting EBUSY error + try: + mount_cmd = ['sudo'] + self.mount_a._mount_bin + [self.mount_a.hostfs_mntpt] + self.mount_a.client_remote.run(args=mount_cmd, stderr=StringIO(), + stdout=StringIO(), timeout=60, omit_sudo=False) + except CommandFailedError as e: + self.assertEqual(e.exitstatus, errno.EBUSY) + else: + self.fail("Expected EBUSY") + def test_getattr_caps(self): """ Check if MDS recognizes the 'mask' parameter of open request.