From: Rishabh Dave Date: Wed, 15 Sep 2021 09:02:29 +0000 (+0530) Subject: qa/cephfs: delete path from cmd args after use X-Git-Tag: v18.0.0~467^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ce942f250a605f507727ebcfb5244392019bdba4;p=ceph.git qa/cephfs: delete path from cmd args after use A new path is obtained every iteration which is appended to command arguments. After the command has been executed successfully, delete the the path from command's arguments so that the command's arguments don't have two paths in next iteration and it works as expected. Fixes: https://tracker.ceph.com/issues/56416 Signed-off-by: Rishabh Dave --- diff --git a/qa/tasks/cephfs/caps_helper.py b/qa/tasks/cephfs/caps_helper.py index 3e49d9f79e2..249cbec361f 100644 --- a/qa/tasks/cephfs/caps_helper.py +++ b/qa/tasks/cephfs/caps_helper.py @@ -67,6 +67,7 @@ class CapsHelper(CephFSTestCase): cmdargs.append(path) mount.negtestcmd(args=cmdargs, retval=1, errmsg='permission denied') + cmdargs.pop(-1) def get_mon_cap_from_keyring(self, client_name): keyring = self.run_cluster_cmd(cmd=f'auth get {client_name}')