]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: tests set/get ceph.mirror.dirty_snap_id attribute succeeds in a remote filesystem 53912/head
authorJos Collin <jcollin@redhat.com>
Thu, 12 Oct 2023 09:23:16 +0000 (14:53 +0530)
committerJos Collin <jcollin@redhat.com>
Mon, 30 Oct 2023 05:39:42 +0000 (11:09 +0530)
Fixes: https://tracker.ceph.com/issues/63099
Signed-off-by: Jos Collin <jcollin@redhat.com>
qa/tasks/cephfs/test_mirroring.py

index b7f436774ddb9f21b3c366da0d3f0b8580d80721..24dbd61b17fbbf4bcad794e055fb5d99aed95aae 100644 (file)
@@ -1305,3 +1305,13 @@ class TestMirroring(CephFSTestCase):
         self.disable_mirroring(self.primary_fs_name, self.primary_fs_id)
         self.mount_a.run_shell(["rmdir", "l1/.snap/snap0"])
         self.mount_a.run_shell(["rmdir", "l1"])
+
+    def test_get_set_mirror_dirty_snap_id(self):
+        """
+        That get/set ceph.mirror.dirty_snap_id attribute succeeds in a remote filesystem.
+        """
+        self.mount_b.run_shell(["mkdir", "-p", "d1/d2/d3"])
+        attr = str(random.randint(1, 10))
+        self.mount_b.setfattr("d1/d2/d3", "ceph.mirror.dirty_snap_id", attr)
+        val = self.mount_b.getfattr("d1/d2/d3", "ceph.mirror.dirty_snap_id")
+        self.assertEqual(attr, val, f"Mismatch for ceph.mirror.dirty_snap_id value: {attr} vs {val}")