From: Christopher Hoffman Date: Thu, 22 Feb 2024 16:54:44 +0000 (+0000) Subject: qa: Add removexattr to support setfattr removal. X-Git-Tag: v19.2.3~447^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=96ffb25409a43f3cffa833c44ee2adca49cac702;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 6c24c4a3f7a9..751c403ba094 100644 --- a/qa/tasks/cephfs/mount.py +++ b/qa/tasks/cephfs/mount.py @@ -1557,6 +1557,20 @@ class CephFSMountBase(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.