Skip to content

Commit

Permalink
vm: use sync after touching a file
Browse files Browse the repository at this point in the history
Without it, snapshotting a VM right after creating the file will not have
the data written to disk.
  • Loading branch information
ydirson committed Mar 22, 2024
1 parent 32409f0 commit 9dc1a15
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def wait_for_vm_running_and_ssh_up(self):
def ssh_touch_file(self, filepath):
logging.info("Create file on VM (%s)" % filepath)
self.ssh(['touch', filepath])
self.ssh(['sync', filepath])
logging.info("Check file created")
self.ssh(['test -f ' + filepath])

Expand Down

0 comments on commit 9dc1a15

Please sign in to comment.