From: Patrick Donnelly Date: Tue, 27 May 2025 14:03:12 +0000 (-0400) Subject: qa: test for child dir with first beyond parent snaps X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=659e4262d042dc50a381846c25640c76a06bdec2;p=ceph.git qa: test for child dir with first beyond parent snaps If the parent directory has snapshots but the child was created after, then we should be able to modify its charmap. Signed-off-by: Patrick Donnelly Fixes: https://tracker.ceph.com/issues/71462 --- diff --git a/qa/tasks/cephfs/test_dir_charmap.py b/qa/tasks/cephfs/test_dir_charmap.py index 06e6c4efc9a..5b82753b365 100644 --- a/qa/tasks/cephfs/test_dir_charmap.py +++ b/qa/tasks/cephfs/test_dir_charmap.py @@ -280,6 +280,28 @@ class TestCharMapVxattr(CephFSTestCase, CharMapMixin): else: self.fail("should fail") + def test_cs_no_parent_snaps_set_insensitive(self): + """ + That setting a charmap succeeds for an empty directory with first beyond parent snaps. + """ + + attrs = { + "ceph.dir.casesensitive": False, + "ceph.dir.normalization": "nfc", + "ceph.dir.encoding": "utf8", + } + + self.mount_a.run_shell_payload("mkdir -p foo/bar; mkdir foo/.snap/one; rmdir foo/bar; mkdir foo/bar") + for attr, v in attrs.items(): + try: + self.mount_a.setfattr("foo/bar", attr, v, helpfulexception=True) + except DirectoryNotEmptyError: + self.fail("should not fail") + try: + self.check_cs("foo/bar", casesensitive=False, normalization="nfc") + except DirectoryNotEmptyError: + self.fail("should not fail") + def test_cs_remount(self): """ That a remount continues to see the charmap.