From ce942f250a605f507727ebcfb5244392019bdba4 Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Wed, 15 Sep 2021 14:32:29 +0530 Subject: [PATCH] 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 --- qa/tasks/cephfs/caps_helper.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qa/tasks/cephfs/caps_helper.py b/qa/tasks/cephfs/caps_helper.py index 3e49d9f79e24..249cbec361ff 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}') -- 2.47.3