]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/cephfs: switch open vs. write in test_open_inode 14569/head
authorJohn Spray <john.spray@redhat.com>
Wed, 1 Feb 2017 00:38:08 +0000 (00:38 +0000)
committerNathan Cutler <ncutler@suse.com>
Fri, 14 Apr 2017 21:49:25 +0000 (23:49 +0200)
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 <john.spray@redhat.com>
(cherry picked from commit a027dba78fc8bc84ae39d7998b386ce21c01e1bf)

qa/tasks/cephfs/test_strays.py

index 467932b6e4fdc82929d357352b3dd839c07ce307..682917cc579de562381df386b7a8d351624c2608 100644 (file)
@@ -236,11 +236,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)