]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: Use virtio to mount cdrom drives
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 22 Aug 2017 21:58:02 +0000 (22:58 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 Aug 2017 11:06:46 +0000 (12:06 +0100)
The IDE driver in the kernel is fragile and in 4.12 is causing backtraces.
To unblock 4.12 kernel merging use the virtio CD driver instead to mount
iso images which should be faster and more stable.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/runqemu.py
scripts/runqemu

index 8805a3837ef66afd6e6191e3c23f9b081f3b3574..1991be7d0c52067fba86f47e046e89f4d38e5003 100644 (file)
@@ -62,7 +62,7 @@ SYSLINUX_TIMEOUT = "10"
         cmd = "%s %s iso" % (self.cmd_common, self.machine)
         with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
             with open(qemu.qemurunnerlog) as f:
-                self.assertTrue(' -cdrom ' in f.read(), "Failed: %s" % cmd)
+                self.assertTrue('media=cdrom' in f.read(), "Failed: %s" % cmd)
 
     @OETestID(2004)
     def test_boot_recipe_image(self):
index fd2717ec87eeb80e886e1dc045b154e753d53098..1131324ccc5d3fe4aa95bb46ebedc54b91a38f69 100755 (executable)
@@ -1005,7 +1005,7 @@ class BaseConfig(object):
             vm_drive = ''
             if self.fstype in self.vmtypes:
                 if self.fstype == 'iso':
-                    vm_drive = '-cdrom %s' % self.rootfs
+                    vm_drive = '-drive file=%s,if=virtio,media=cdrom' % self.rootfs
                 elif self.get('QB_DRIVE_TYPE'):
                     drive_type = self.get('QB_DRIVE_TYPE')
                     if drive_type.startswith("/dev/sd"):