From 5a33f7e6f6c1fbaa5078983ca2f0901296b65588 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Sat, 30 Jul 2022 05:32:27 +0530 Subject: [PATCH] qa: Fix use of 'sudo' args https://tracker.ceph.com/issues/56727 Signed-off-by: Kotresh HR --- qa/tasks/cephfs/test_volumes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qa/tasks/cephfs/test_volumes.py b/qa/tasks/cephfs/test_volumes.py index 82d8e2a461dd2..2f911009900d9 100644 --- a/qa/tasks/cephfs/test_volumes.py +++ b/qa/tasks/cephfs/test_volumes.py @@ -7415,7 +7415,7 @@ class TestMisc(TestVolumesHelper): # emulate a old-fashioned subvolume in the default group createpath1 = os.path.join(".", "volumes", "_nogroup", subvol1) - self.mount_a.run_shell(['mkdir', '-p', createpath1], sudo=True) + self.mount_a.run_shell(['sudo', 'mkdir', '-p', createpath1], omit_sudo=False) # add required xattrs to subvolume default_pool = self.mount_a.getfattr(".", "ceph.dir.layout.pool") @@ -7427,7 +7427,7 @@ class TestMisc(TestVolumesHelper): # Create malicious .meta file in legacy subvolume root. Copy v2 subvolume # .meta into legacy subvol1's root subvol2_metapath = os.path.join(".", "volumes", "_nogroup", subvol2, ".meta") - self.mount_a.run_shell(["cp", subvol2_metapath, createpath1], sudo=True) + self.mount_a.run_shell(['sudo', 'cp', subvol2_metapath, createpath1], omit_sudo=False) # Upgrade legacy subvol1 to v1 subvolpath1 = self._fs_cmd("subvolume", "getpath", self.volname, subvol1) @@ -7469,7 +7469,7 @@ class TestMisc(TestVolumesHelper): # emulate a old-fashioned subvolume -- in a custom group createpath = os.path.join(".", "volumes", group, subvol) - self.mount_a.run_shell(['mkdir', '-p', createpath], sudo=True) + self.mount_a.run_shell(['sudo', 'mkdir', '-p', createpath], omit_sudo=False) # add required xattrs to subvolume default_pool = self.mount_a.getfattr(".", "ceph.dir.layout.pool") @@ -7512,7 +7512,7 @@ class TestMisc(TestVolumesHelper): # emulate a old-fashioned subvolume -- in a custom group createpath = os.path.join(".", "volumes", group, subvol) - self.mount_a.run_shell(['mkdir', '-p', createpath], sudo=True) + self.mount_a.run_shell(['sudo', 'mkdir', '-p', createpath], omit_sudo=False) # add required xattrs to subvolume default_pool = self.mount_a.getfattr(".", "ceph.dir.layout.pool") -- 2.39.5