This is done in CephFSTestCase.tearDown.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
"""
flockable = self._is_flockable()
- lock_holder = self.mount_a.lock_background(do_flock=flockable)
+ self.mount_a.lock_background(do_flock=flockable)
self.mount_b.wait_for_visible("background_file-2")
self.mount_b.check_filelock(do_flock=flockable)
self.mount_b.check_filelock(do_flock=flockable)
- self.mount_a._kill_background(lock_holder)
-
def test_filelock_eviction(self):
"""
Check that file lock held by evicted client is given to
# create a file and hold it open. MDS will issue CEPH_CAP_EXCL_*
# to mount_a
- p = self.mount_a.open_background("testfile")
+ self.mount_a.open_background("testfile")
self.mount_b.wait_for_visible("testfile")
# this triggers a lookup request and an open request. The debug
# code will check if lookup/open reply contains xattrs
self.mount_b.run_shell(["cat", "testfile"])
- self.mount_a.kill_background(p)
-
def test_root_rctime(self):
"""
Check that the root inode has a non-default rctime on startup.
file_count = 8
for i in range(0, file_count):
filename = "open_file{}".format(i)
- p = self.mount_a.open_background(filename)
+ self.mount_a.open_background(filename)
self.mount_a.write_n_mb(filename, size_mb)
time.sleep(10)
self.fs.radosm(["stat", "mds0_openfiles.1"])
- # Now close the file
- self.mount_a.kill_background(p)
-
def test_perf_counters(self):
"""
Opening a file should increment omap_total_updates by 1.
self._force_migrate("pin")
# Hold the dir open so it cannot be purged
- p = self.mount_a.open_dir_background("pin/to-be-unlinked")
+ self.mount_a.open_dir_background("pin/to-be-unlinked")
# Unlink the dentry
self.mount_a.run_shell(["rmdir", "pin/to-be-unlinked"])
# self.assertEqual(self.get_mdc_stat("strays_created", mds_id=rank_0_id), 1)
# https://github.com/ceph/ceph/pull/44335#issuecomment-1125940158
- self.mount_a.kill_background(p)
-
def assert_backtrace(self, ino, expected_path):
"""
Assert that the backtrace in the data pool for an inode matches