From: Christopher Hoffman Date: Thu, 22 Feb 2024 16:54:44 +0000 (+0000) Subject: qa: Add removexattr to support setfattr removal. X-Git-Tag: v20.0.0~1640^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=26a352aae9a506d8594460e753fd4b21d9197076;p=ceph.git qa: Add removexattr to support setfattr removal. Signed-off-by: Christopher Hoffman --- diff --git a/qa/tasks/cephfs/mount.py b/qa/tasks/cephfs/mount.py index 61d8d5cb3da6..d2829a0c99aa 100644 --- a/qa/tasks/cephfs/mount.py +++ b/qa/tasks/cephfs/mount.py @@ -1560,6 +1560,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.