From b2ed779ce9276a8f379cb72537eff37f01fd3020 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Fri, 3 Jun 2022 15:02:45 -0700 Subject: [PATCH] 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'. --- tools/runner.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/runner.py b/tools/runner.py index 8e9530a0..2ce26de0 100644 --- 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,