]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: tests set/get ceph.mirror.dirty_snap_id attribute succeeds in a remote filesystem 54405/head
authorJos Collin <jcollin@redhat.com>
Thu, 12 Oct 2023 09:23:16 +0000 (14:53 +0530)
committerJos Collin <jcollin@redhat.com>
Wed, 8 Nov 2023 05:47:30 +0000 (11:17 +0530)
Fixes: https://tracker.ceph.com/issues/63099
Signed-off-by: Jos Collin <jcollin@redhat.com>
(cherry picked from commit be551a6c68018207b6c730ae9d12341c796f5deb)

qa/tasks/cephfs/test_mirroring.py

index c1a940e3f7598cdf8aa1cecbef806f7f179b8228..be8817d749be5d135d35eaee13740ca73ac0db53 100644 (file)
@@ -1296,3 +1296,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}")