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)
# 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)