3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 01:19:23 +01:00

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'.
This commit is contained in:
James Prestwood 2022-06-03 15:02:45 -07:00 committed by Denis Kenzior
parent db3d6a3652
commit b2ed779ce9

View File

@ -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,