From 92aecabdb2119a587df5ac427999634e4bfc4ff4 Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Tue, 21 May 2024 18:53:12 +0530 Subject: [PATCH] qa/cephfs: return size of data generated in _do_subvolume_io() TestVolumesHelper._do_subvolume_io() is a helper method that allows users to generate data for testing. mgr/vol code that reports progress made by clone jobs depends on the value set for xattr rbytes. It takes a bit of a time for rbytes to be set. And, therefore, all tests in TestCloneProgressReporter needs to wait for subvolume's rbytes xattr's value to be set to the actual amount of data present on the subvolume before proceeding to actually testing. So that this can be achieved make _do_subvolume_io() return size of the data it has generated. Signed-off-by: Rishabh Dave --- qa/tasks/cephfs/test_volumes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qa/tasks/cephfs/test_volumes.py b/qa/tasks/cephfs/test_volumes.py index ef33e96e21b..4b1914a5571 100644 --- a/qa/tasks/cephfs/test_volumes.py +++ b/qa/tasks/cephfs/test_volumes.py @@ -305,6 +305,8 @@ class TestVolumesHelper(CephFSTestCase): filename = "{0}.{1}".format(TestVolumes.TEST_FILE_NAME_PREFIX, i) self.mount_a.write_n_mb(os.path.join(io_path, filename), file_size) + return number_of_files * file_size * 1024 * 1024 + def _do_subvolume_io_mixed(self, subvolume, subvolume_group=None): subvolpath = self._get_subvolume_path(self.volname, subvolume, group_name=subvolume_group)