]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: test for statfs on deleted file system
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 28 Aug 2020 17:37:25 +0000 (10:37 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Sat, 29 Aug 2020 17:22:12 +0000 (10:22 -0700)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/tasks/cephfs/test_misc.py

index 14a7e662b1064c1a0f06196c5d6511b1bf24a5d3..8ae64a36dbe0987fa35cd5b0f8b0caa46842bd91 100644 (file)
@@ -12,6 +12,22 @@ log = logging.getLogger(__name__)
 class TestMisc(CephFSTestCase):
     CLIENTS_REQUIRED = 2
 
+    def test_statfs_on_deleted_fs(self):
+        """
+        That statfs does not cause monitors to SIGSEGV after fs deletion.
+        """
+
+        self.mount_b.umount_wait()
+        self.mount_a.run_shell_payload("stat -f .")
+        self.fs.delete_all_filesystems()
+        # This will hang either way, run in background.
+        p = self.mount_a.run_shell_payload("stat -f .", wait=False, timeout=60, check_status=False)
+        time.sleep(30)
+        self.assertFalse(p.finished)
+        # the process is stuck in uninterruptible sleep, just kill the mount
+        self.mount_a.umount_wait(force=True)
+        p.wait()
+
     def test_getattr_caps(self):
         """
         Check if MDS recognizes the 'mask' parameter of open request.