ceph/qa/tasks/cephfs/test_acls.py
Rishabh Dave 1423f959e8 qa/cephfs: set omit_sudo to False in test_acls.py
When running "sudo ./check generic/099" in test_acls.py's test method
named test_acls(), set omit_sudo to False because without it
vstart_runner.py will remove "sudo" from command arguments and so the
command will fail unnecessarily.

Fixes: https://tracker.ceph.com/issues/55374
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-04-27 14:43:41 +05:30

28 lines
1.1 KiB
Python

from logging import getLogger
from io import BytesIO
from tasks.cephfs.xfstests_dev import XFSTestsDev
log = getLogger(__name__)
class TestACLs(XFSTestsDev):
def test_acls(self):
from tasks.cephfs.fuse_mount import FuseMount
from tasks.cephfs.kernel_mount import KernelMount
# TODO: make xfstests-dev compatible with ceph-fuse. xfstests-dev
# remounts CephFS before running tests using kernel, so ceph-fuse
# mounts are never actually testsed.
if isinstance(self.mount_a, FuseMount):
log.info('client is fuse mounted')
self.skipTest('Requires kernel client; xfstests-dev not '\
'compatible with ceph-fuse ATM.')
elif isinstance(self.mount_a, KernelMount):
log.info('client is kernel mounted')
self.mount_a.client_remote.run(args=['sudo', './check',
'generic/099'], cwd=self.repo_path, stdout=BytesIO(),
stderr=BytesIO(), timeout=30, check_status=True, omit_sudo=False,
label='running tests for ACLs from xfstests-dev')