]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephfs: add tests for ACLs 29421/head
authorRishabh Dave <ridave@redhat.com>
Thu, 8 Aug 2019 15:52:58 +0000 (21:22 +0530)
committerRishabh Dave <ridave@redhat.com>
Tue, 3 Dec 2019 12:47:18 +0000 (18:17 +0530)
Add code to run tests for ACLs from xfstests-dev against kernel and
FUSE CephFS mounts.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
qa/suites/fs/basic_functional/tasks/acls-fuse-client.yaml [new file with mode: 0644]
qa/suites/kcephfs/cephfs/tasks/acls-kernel-client.yaml [new file with mode: 0644]
qa/tasks/cephfs/test_acls.py [new file with mode: 0644]
qa/tasks/cephfs/xfstests_dev.py

diff --git a/qa/suites/fs/basic_functional/tasks/acls-fuse-client.yaml b/qa/suites/fs/basic_functional/tasks/acls-fuse-client.yaml
new file mode 100644 (file)
index 0000000..5b38d35
--- /dev/null
@@ -0,0 +1,5 @@
+tasks:
+  - cephfs_test_runner:
+      fail_on_skip: false
+      modules:
+        - tasks.cephfs.test_acls
diff --git a/qa/suites/kcephfs/cephfs/tasks/acls-kernel-client.yaml b/qa/suites/kcephfs/cephfs/tasks/acls-kernel-client.yaml
new file mode 100644 (file)
index 0000000..6e27010
--- /dev/null
@@ -0,0 +1,4 @@
+tasks:
+  - cephfs_test_runner:
+      modules:
+        - tasks.cephfs.test_acls
diff --git a/qa/tasks/cephfs/test_acls.py b/qa/tasks/cephfs/test_acls.py
new file mode 100644 (file)
index 0000000..586cbde
--- /dev/null
@@ -0,0 +1,27 @@
+import logging
+from StringIO import StringIO
+
+from xfstests_dev import XFSTestsDev
+
+log = logging.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=StringIO(),
+            stderr=StringIO(), timeout=30, check_status=True,
+            label='running tests for ACLs from xfstests-dev')
index 25f8a89235f1ab0faa128bd3b19ac7f5f4047615..bf15b02a3a0c05de377cead1bfa5c73f6e0aac1c 100644 (file)
@@ -8,6 +8,9 @@ logger = logging.getLogger(__name__)
 # TODO: add code to run non-ACL tests too.
 # TODO: get tests running with SCRATCH_DEV and SCRATCH_DIR.
 # TODO: make xfstests-dev tests running without running `make install`.
+# 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.
 class XFSTestsDev(CephFSTestCase):
 
     def setUp(self):