]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephfs: minor changes in xfstests_dev.py
authorRishabh Dave <ridave@redhat.com>
Wed, 8 Jun 2022 16:58:34 +0000 (22:28 +0530)
committerRishabh Dave <ridave@redhat.com>
Wed, 22 Feb 2023 14:59:02 +0000 (20:29 +0530)
In xfstests-dev repo, local.config options "SCRATCH_DEV" and
"SCRATCH_MNT" were enabled in commit
2ba6b871056c10d7ea75b526489baa3586024fbf but TODO comment for the
wasn't deleted. Let's delete that and use format string instead of
format function on regular string.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
qa/tasks/cephfs/xfstests_dev.py

index 61bb087b784399eb6d1d7feebd2ee78ae7424906..e57f062e4d2fec092ab3079e84716f5bc557821a 100644 (file)
@@ -11,7 +11,6 @@ log = 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
@@ -201,18 +200,17 @@ class XFSTestsDev(CephFSTestCase):
         self.test_dev = mon_sock + ':/' + self.test_dirname
         self.scratch_dev = mon_sock + ':/' + self.scratch_dirname
 
-        xfstests_config_contents = dedent('''\
+        xfstests_config_contents = dedent(f'''\
             export FSTYP=ceph
-            export TEST_DEV={}
-            export TEST_DIR={}
-            export SCRATCH_DEV={}
-            export SCRATCH_MNT={}
-            export CEPHFS_MOUNT_OPTIONS="-o name=admin,secret={}{}"
-            ''').format(self.test_dev, self.test_dirs_mount_path, self.scratch_dev,
-                        self.scratch_dirs_mount_path, self.get_admin_key(), _options)
-
-        self.mount_a.client_remote.write_file(join(self.xfstests_repo_path, 'local.config'),
-                                              xfstests_config_contents, sudo=True)
+            export TEST_DEV={self.test_dev}
+            export TEST_DIR={self.test_dirs_mount_path}
+            export SCRATCH_DEV={self.scratch_dev}
+            export SCRATCH_MNT={self.scratch_dirs_mount_path}
+            export CEPHFS_MOUNT_OPTIONS="-o name=admin,secret={self.get_admin_key()}{_options}"
+            ''')
+
+       self.mount_a.client_remote.write_file(join(self.xfstests_repo_path, 'local.config'),
+                                             xfstests_config_contents, sudo=True)
 
     def write_ceph_exclude(self):
         # These tests will fail or take too much time and will