test-runner: fix testhome mounting for QEMU
James Prestwood
PATCH 1/1 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(-)
tools/runner.py +7 -2
@@ -434,6 +434,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
@@ -466,8 +471,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,
Signature · 1 line
2.34.1
Denis Kenzior
AppliedHi James,
Quoted 7 lines · James Prestwood
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(-)
Applied, thanks.
Regards,
-Denis