Skip to content

Commit b71803b

Browse files
committed
Merge PR ceph#56638 into main
* refs/pull/56638/head: qa: do not iterate list being modified qa: remove unnecessary background job cleanup Reviewed-by: Xiubo Li <[email protected]> Reviewed-by: Leonid Usov <[email protected]> Reviewed-by: Venky Shankar <[email protected]>
2 parents be95159 + 57022d9 commit b71803b

File tree

5 files changed

+5
-14
lines changed

5 files changed

+5
-14
lines changed

qa/tasks/cephfs/mount.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1399,7 +1399,7 @@ def kill_background(self, p=None):
13991399
For a process that was returned by one of the _background member functions,
14001400
kill it hard.
14011401
"""
1402-
procs = [p] if p is not None else self.background_procs
1402+
procs = [p] if p is not None else list(self.background_procs)
14031403
for p in procs:
14041404
log.debug(f"terminating {p}")
14051405
self._kill_background(p)

qa/tasks/cephfs/test_client_recovery.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def test_filelock(self):
377377
"""
378378

379379
flockable = self._is_flockable()
380-
lock_holder = self.mount_a.lock_background(do_flock=flockable)
380+
self.mount_a.lock_background(do_flock=flockable)
381381

382382
self.mount_b.wait_for_visible("background_file-2")
383383
self.mount_b.check_filelock(do_flock=flockable)
@@ -387,8 +387,6 @@ def test_filelock(self):
387387

388388
self.mount_b.check_filelock(do_flock=flockable)
389389

390-
self.mount_a._kill_background(lock_holder)
391-
392390
def test_filelock_eviction(self):
393391
"""
394392
Check that file lock held by evicted client is given to

qa/tasks/cephfs/test_misc.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,13 @@ def test_getattr_caps(self):
6969

7070
# create a file and hold it open. MDS will issue CEPH_CAP_EXCL_*
7171
# to mount_a
72-
p = self.mount_a.open_background("testfile")
72+
self.mount_a.open_background("testfile")
7373
self.mount_b.wait_for_visible("testfile")
7474

7575
# this triggers a lookup request and an open request. The debug
7676
# code will check if lookup/open reply contains xattrs
7777
self.mount_b.run_shell(["cat", "testfile"])
7878

79-
self.mount_a.kill_background(p)
80-
8179
def test_root_rctime(self):
8280
"""
8381
Check that the root inode has a non-default rctime on startup.

qa/tasks/cephfs/test_openfiletable.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_max_items_per_obj(self):
3131
file_count = 8
3232
for i in range(0, file_count):
3333
filename = "open_file{}".format(i)
34-
p = self.mount_a.open_background(filename)
34+
self.mount_a.open_background(filename)
3535
self.mount_a.write_n_mb(filename, size_mb)
3636

3737
time.sleep(10)
@@ -44,9 +44,6 @@ def test_max_items_per_obj(self):
4444

4545
self.fs.radosm(["stat", "mds0_openfiles.1"])
4646

47-
# Now close the file
48-
self.mount_a.kill_background(p)
49-
5047
def test_perf_counters(self):
5148
"""
5249
Opening a file should increment omap_total_updates by 1.

qa/tasks/cephfs/test_strays.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ def test_migrate_unlinked_dir(self):
712712
self._force_migrate("pin")
713713

714714
# Hold the dir open so it cannot be purged
715-
p = self.mount_a.open_dir_background("pin/to-be-unlinked")
715+
self.mount_a.open_dir_background("pin/to-be-unlinked")
716716

717717
# Unlink the dentry
718718
self.mount_a.run_shell(["rmdir", "pin/to-be-unlinked"])
@@ -736,8 +736,6 @@ def test_migrate_unlinked_dir(self):
736736
# self.assertEqual(self.get_mdc_stat("strays_created", mds_id=rank_0_id), 1)
737737
# https://github.com/ceph/ceph/pull/44335#issuecomment-1125940158
738738

739-
self.mount_a.kill_background(p)
740-
741739
def assert_backtrace(self, ino, expected_path):
742740
"""
743741
Assert that the backtrace in the data pool for an inode matches

0 commit comments

Comments
 (0)