]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: add test_fscrypt_dummy_encryption test case support 49934/head
authorXiubo Li <xiubli@redhat.com>
Tue, 31 Jan 2023 02:33:07 +0000 (10:33 +0800)
committerXiubo Li <xiubli@redhat.com>
Tue, 21 Feb 2023 08:15:12 +0000 (16:15 +0800)
This will test around 130 test cases with the test_dummy_encryption
option enabled.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
qa/tasks/cephfs/test_fscrypt.py

index 022574b79fd5fa04fb737c0be8e806d6721e6dad..3af9df3cb255c1b715b613578c3425af1b4fd546 100644 (file)
@@ -34,7 +34,7 @@ class TestFscrypt(XFSTestsDev):
         # accordingly.
         proc = self.mount_a.client_remote.run(args=['sudo', './check',
             '-g', 'encrypt'], cwd=self.xfstests_repo_path, stdout=StringIO(),
-            stderr=StringIO(), timeout=900, check_status=False,omit_sudo=False,
+            stderr=StringIO(), timeout=900, check_status=False, omit_sudo=False,
             label='running tests for encrypt from xfstests-dev')
 
         if proc.returncode != 0:
@@ -49,3 +49,29 @@ class TestFscrypt(XFSTestsDev):
         # skipped for now because of not supporting features in kernel or kceph.
         self.assertEqual(proc.returncode, 0)
         self.assertIn('Passed all 26 tests', stdout)
+
+    def test_fscrypt_dummy_encryption_with_quick_group(self):
+        self.require_kernel_mount()
+
+        self.write_local_config('test_dummy_encryption')
+
+        # XXX: check_status is set to False so that we can check for command's
+        # failure on our own (since this command doesn't set right error code
+        # and error message in some cases) and print custom log messages
+        # accordingly. This will take a long time and set the timeout to 3 hours.
+        proc = self.mount_a.client_remote.run(args=['sudo', './check',
+            '-g', 'quick', '-E', './ceph.exclude'], cwd=self.xfstests_repo_path,
+            stdout=StringIO(), stderr=StringIO(), timeout=10800, check_status=False,
+            omit_sudo=False, label='running tests for dummy_encryption from xfstests-dev')
+
+        if proc.returncode != 0:
+            log.info('Command failed.')
+        log.info(f'Command return value: {proc.returncode}')
+        stdout, stderr = proc.stdout.getvalue(), proc.stderr.getvalue()
+        log.info(f'Command stdout -\n{stdout}')
+        log.info(f'Command stderr -\n{stderr}')
+
+        # Currently, many test cases will be skipped due to unsupported features,
+        # but still will be marked as successful.
+        self.assertEqual(proc.returncode, 0)
+        self.assertIn('Passed all ', stdout)