From: Christopher Hoffman Date: Thu, 22 Feb 2024 16:54:44 +0000 (+0000) Subject: qa: Add removexattr to support setfattr removal. X-Git-Tag: v18.2.5~511^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5dcb9e1d73d1ca7bd04e24ca0483dc6f028fca56;p=ceph.git qa: Add removexattr to support setfattr removal. Signed-off-by: Christopher Hoffman (cherry picked from commit 26a352aae9a506d8594460e753fd4b21d9197076) --- diff --git a/qa/tasks/cephfs/mount.py b/qa/tasks/cephfs/mount.py index f995f7c8b4a..cbb0ec92653 100644 --- a/qa/tasks/cephfs/mount.py +++ b/qa/tasks/cephfs/mount.py @@ -1483,6 +1483,20 @@ class CephFSMount(object): # gives you [''] instead of [] return [] + def removexattr(self, path, key, **kwargs): + """ + Wrap setfattr removal. + + :param path: relative to mount point + :param key: xattr name + :return: None + """ + kwargs['args'] = ["setfattr", "-x", key, path] + if kwargs.pop('sudo', False): + kwargs['args'].insert(0, 'sudo') + kwargs['omit_sudo'] = False + self.run_shell(**kwargs) + def setfattr(self, path, key, val, **kwargs): """ Wrap setfattr.