commit b2ed779ce9276a8f379cb72537eff37f01fd3020
parent db3d6a365262bdfca4a62c0b50a0c9d0cc4aefb3
Author: James Prestwood <prestwoj@gmail.com>
Date: Fri, 3 Jun 2022 15:02:45 -0700
test-runner: fix testhome mounting for QEMU
This was lazily copied from UML but really made no sense in the context
of QEMU. First QEMU needs the virtfs option to define the mount tag and
in addition a 9p mount should be used rather than 'hostfs'.
Diffstat:
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/runner.py b/tools/runner.py
@@ -437,6 +437,11 @@ class QemuRunner(RunnerAbstract):
for addr in pci_adapters:
qemu_cmdline.extend(['-device', 'vfio-pci,host=%s' % addr])
+ qemu_cmdline.extend([
+ '-virtfs',
+ 'local,path=%s,%s' % (args.testhome, mount_options('homedir'))
+ ])
+
if args.log:
#
# Creates a virtfs device that can be mounted. This mount
@@ -469,8 +474,8 @@ class QemuRunner(RunnerAbstract):
def prepare_environment(self):
mounts = [ MountInfo('debugfs', 'debugfs', '/sys/kernel/debug', '', 0) ]
- mounts.append(MountInfo('hostfs', 'hostfs', self.args.testhome,
- self.args.testhome, 0))
+ mounts.append(MountInfo('9p', 'homedir', self.args.testhome,
+ 'trans=virtio,version=9p2000.L,msize=10240', 0))
if self.args.log:
mounts.append(MountInfo('9p', 'logdir', self.args.log,