2021-12-05 19:06:12 +00:00
|
|
|
from logging import getLogger
|
2019-08-08 15:52:58 +00:00
|
|
|
|
2019-12-16 01:20:11 +00:00
|
|
|
from io import BytesIO
|
2020-03-24 08:33:22 +00:00
|
|
|
from tasks.cephfs.xfstests_dev import XFSTestsDev
|
2019-08-08 15:52:58 +00:00
|
|
|
|
2021-12-05 19:06:12 +00:00
|
|
|
log = getLogger(__name__)
|
2019-08-08 15:52:58 +00:00
|
|
|
|
|
|
|
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',
|
2019-12-16 01:20:11 +00:00
|
|
|
'generic/099'], cwd=self.repo_path, stdout=BytesIO(),
|
2022-04-18 16:22:18 +00:00
|
|
|
stderr=BytesIO(), timeout=30, check_status=True, omit_sudo=False,
|
2019-08-08 15:52:58 +00:00
|
|
|
label='running tests for ACLs from xfstests-dev')
|