summaryrefslogtreecommitdiffstats
path: root/nixos/lib/test-driver
diff options
context:
space:
mode:
authorErik Arvstedt <erik.arvstedt@gmail.com>2020-05-27 22:07:43 +0200
committerErik Arvstedt <erik.arvstedt@gmail.com>2020-06-01 21:55:33 +0200
commitd85dc4f6902819be8277d1d65414e51bfbef0ac6 (patch)
tree1f245e3e53dea0710f2d8b48d2b5289a7c9de26b /nixos/lib/test-driver
parentdfa743e49e45bcb6d334e50f24275b04a004a6f6 (diff)
qemu-vm: fix inconsistent caching of xchg dirs
xchg is advertised as a bidirectional exchange dir, but file content transfer from host to VM fails due to caching: If a file is read in the VM and then modified on the host, subsequent re-reads in the VM can yield old, cached data. This is caused by the use of 9p's cache=loose mode that is explicitly meant for read-only mounts. 9p doesn't provide any suitable cache modes, so fix this by disabling caching. Also, remove a now unnecessary sync in the test driver.
Diffstat (limited to 'nixos/lib/test-driver')
-rw-r--r--nixos/lib/test-driver/test-driver.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py
index ff6d763989f5..b96165823721 100644
--- a/nixos/lib/test-driver/test-driver.py
+++ b/nixos/lib/test-driver/test-driver.py
@@ -615,7 +615,6 @@ class Machine:
# Copy the file to the shared directory inside VM
self.succeed(make_command(["mkdir", "-p", vm_shared_temp]))
self.succeed(make_command(["cp", "-r", vm_src, vm_intermediate]))
- self.succeed("sync")
abs_target = out_dir / target_dir / vm_src.name
abs_target.parent.mkdir(exist_ok=True, parents=True)
# Copy the file from the shared directory outside VM