From 358e6e8637263f099efe404246f31ab433e6b20a Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Thu, 17 Apr 2025 19:58:25 -0400 Subject: [PATCH] qa: add test for cloning with charmap Fixes: https://tracker.ceph.com/issues/70974 Signed-off-by: Patrick Donnelly --- qa/tasks/cephfs/test_volumes.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/qa/tasks/cephfs/test_volumes.py b/qa/tasks/cephfs/test_volumes.py index efbb022615f60..865fe9db2568d 100644 --- a/qa/tasks/cephfs/test_volumes.py +++ b/qa/tasks/cephfs/test_volumes.py @@ -2233,6 +2233,29 @@ class TestSubvolumes(TestVolumesHelper): v = json.loads(v) self.assertEqual(v, attrs) + def test_subvolume_clone_charmap(self): + subvolume = self._gen_subvol_name() + attrs = { + "normalization": "nfkd", + "encoding": "utf8", + "casesensitive": False, + } + self._fs_cmd("subvolume", "create", self.volname, subvolume) + for setting, value in attrs.items(): + self._fs_cmd("subvolume", "charmap", "set", self.volname, subvolume, setting, str(value)) + + snapshot = "snap1" + self._fs_cmd("subvolume", "snapshot", "create", self.volname, subvolume, snapshot) + clone = "clone" + self._fs_cmd("subvolume", "snapshot", "clone", self.volname, subvolume, snapshot, clone) + + # wait for clone to complete + self._wait_for_clone_to_complete(clone) + + v = self._fs_cmd("subvolume", "charmap", "get", self.volname, clone) + v = json.loads(v) + self.assertEqual(v, attrs) + def test_subvolume_charmap_rm(self): subvolume = self._gen_subvol_name() self._fs_cmd("subvolume", "create", self.volname, subvolume) -- 2.39.5