From d8b139b5847cb46aa13486ee85e26f26421f36d6 Mon Sep 17 00:00:00 2001 From: John Spray Date: Wed, 1 Feb 2017 00:38:08 +0000 Subject: [PATCH] tasks/cephfs: switch open vs. write in test_open_inode Do the write after opening the file, so that we get good behaviour wrt the change in Mount.open_background that uses file existence to confirm that the open happened. Signed-off-by: John Spray (cherry picked from commit a027dba78fc8bc84ae39d7998b386ce21c01e1bf) --- qa/tasks/cephfs/test_strays.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qa/tasks/cephfs/test_strays.py b/qa/tasks/cephfs/test_strays.py index e01e0a1ee9404..68427eea89e4c 100644 --- a/qa/tasks/cephfs/test_strays.py +++ b/qa/tasks/cephfs/test_strays.py @@ -235,11 +235,11 @@ class TestStrays(CephFSTestCase): # Write some bytes to a file size_mb = 8 - self.mount_a.write_n_mb("open_file", size_mb) - open_file_ino = self.mount_a.path_to_ino("open_file") # Hold the file open p = self.mount_a.open_background("open_file") + self.mount_a.write_n_mb("open_file", size_mb) + open_file_ino = self.mount_a.path_to_ino("open_file") self.assertEqual(self.get_session(mount_a_client_id)['num_caps'], 2) -- 2.39.5