mirror of
https://github.com/ceph/ceph
synced 2025-01-20 01:51:34 +00:00
Merge PR #54683 into main
* refs/pull/54683/head: qa/tasks/cephfs/test_misc: switch duration to timeout qa/tasks/cephfs/test_misc: fix the incorrect comments Reviewed-by: Venky Shankar <vshankar@redhat.com> Reviewed-by: Dhairya Parmar <dparmar@redhat.com>
This commit is contained in:
commit
527b465872
@ -276,30 +276,30 @@ class TestMisc(CephFSTestCase):
|
||||
self.mount_a.run_shell(["mkdir", os.path.join(dir_path, f"{i}_{j}")])
|
||||
start = time.time()
|
||||
if file_sync:
|
||||
self.mount_a.run_shell(['python3', '-c', sync_dir_pyscript])
|
||||
self.mount_a.run_shell(['python3', '-c', sync_dir_pyscript], timeout=4)
|
||||
else:
|
||||
self.mount_a.run_shell(["sync"])
|
||||
self.mount_a.run_shell(["sync"], timeout=4)
|
||||
# the real duration should be less than the rough one
|
||||
duration = time.time() - start
|
||||
log.info(f"sync mkdir i = {i}, duration = {duration}")
|
||||
self.assertLess(duration, 4)
|
||||
log.info(f"sync mkdir i = {i}, rough duration = {duration}")
|
||||
|
||||
for j in range(5):
|
||||
self.mount_a.run_shell(["rm", "-rf", os.path.join(dir_path, f"{i}_{j}")])
|
||||
start = time.time()
|
||||
if file_sync:
|
||||
self.mount_a.run_shell(['python3', '-c', sync_dir_pyscript])
|
||||
self.mount_a.run_shell(['python3', '-c', sync_dir_pyscript], timeout=4)
|
||||
else:
|
||||
self.mount_a.run_shell(["sync"])
|
||||
self.mount_a.run_shell(["sync"], timeout=4)
|
||||
# the real duration should be less than the rough one
|
||||
duration = time.time() - start
|
||||
log.info(f"sync rmdir i = {i}, duration = {duration}")
|
||||
self.assertLess(duration, 4)
|
||||
log.info(f"sync rmdir i = {i}, rough duration = {duration}")
|
||||
|
||||
self.mount_a.run_shell(["rm", "-rf", dir_path])
|
||||
|
||||
def test_filesystem_sync_stuck_for_around_5s(self):
|
||||
"""
|
||||
To check whether the fsync will be stuck to wait for the mdlog to be
|
||||
flushed for at most 5 seconds.
|
||||
To check whether the filesystem sync will be stuck to wait for the
|
||||
mdlog to be flushed for at most 5 seconds.
|
||||
"""
|
||||
|
||||
dir_path = "filesystem_sync_do_not_wait_mdlog_testdir"
|
||||
@ -307,8 +307,8 @@ class TestMisc(CephFSTestCase):
|
||||
|
||||
def test_file_sync_stuck_for_around_5s(self):
|
||||
"""
|
||||
To check whether the filesystem sync will be stuck to wait for the
|
||||
mdlog to be flushed for at most 5 seconds.
|
||||
To check whether the fsync will be stuck to wait for the mdlog to
|
||||
be flushed for at most 5 seconds.
|
||||
"""
|
||||
|
||||
dir_path = "file_sync_do_not_wait_mdlog_testdir"
|
||||
|
Loading…
Reference in New Issue
Block a user