Merge lp:~brendan-donegan/checkbox/bug1224854_redux into lp:checkbox

Proposed by Brendan Donegan
Status: Merged
Approved by: Daniel Manrique
Approved revision: 2399
Merged at revision: 2402
Proposed branch: lp:~brendan-donegan/checkbox/bug1224854_redux
Merge into: lp:checkbox
Diff against target: 46 lines (+7/-7)
2 files modified
checkbox-old/debian/changelog (+4/-5)
checkbox-old/scripts/virtualization (+3/-2)
To merge this branch: bzr merge lp:~brendan-donegan/checkbox/bug1224854_redux
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Checkbox Developers Pending
Review via email: mp+188282@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Another shot at changing the virtualization test script to use qemu-system-x86_64 instead of the deprecated 'kvm' command. Previously we had forgotten the '-machine accel=kvm:tcg' extra parameter (actually the /usr/bin/kvm script is not very clear about the importance of this) so the test was failing in our CI loop. This version of the fix has been tested thoroughly and is passing.

Please don't Approve this until Daniel has had a look since he's the one who tested the solution in the CI loop.

Revision history for this message
Ara Pulido (ara) wrote :

Shouldn't we make the command depending on architecture? i.e. if the architecture is x86_64, then we run x86_64, but if the architecture is ARM, then we run an ARM VM.

Revision history for this message
Daniel Manrique (roadmr) wrote :

+1 from me on the code, this is exactly what I tested and it does work fine. It appears to have been the "missing sauce" to get this to work.

The "machine" argument specifies the type of machine to emulate. I guess this is auto-set depending on the command. Then, the accel parameter does the following:

          accel=accels1[:accels2[:...]]
               This is used to enable an accelerator. Depending on the target
               architecture, kvm, xen, or tcg can be available. By default,
               tcg is used. If there is more than one accelerator specified,
               the next one is used if the previous one fails to initialize.

Without specifying this, it was defaulting to tcg (http://en.wikipedia.org/wiki/QEMU#Tiny_Code_Generator), which is NOT what we wanted, as it was not doing hardware-assisted virtualization. Instead, the specified parameter asks it to prefer kvm, and then fall back to tcg. Conceivably we could just say accel=kvm since we don't care about the fallback, but this seems to work fine.

As for Ara's suggestion, I believe arm awareness is planned, but since it's a new feature I'd say it's reasonable to merge this bugfix first and work on features to support arm (which will require somewhat more code) later.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'checkbox-old/debian/changelog'
2--- checkbox-old/debian/changelog 2013-09-27 20:37:49 +0000
3+++ checkbox-old/debian/changelog 2013-09-30 09:29:47 +0000
4@@ -1,13 +1,14 @@
5 checkbox (0.16.12) UNRELEASED; urgency=low
6
7- [ Brendan Donegan ]
8- * Incremented changelog
9-
10 [ Daniel Manrique ]
11 * scripts/gpu_test: Better validation that glxgears windows were found, to
12 avoid manipulation of nonexisting windows which causes threads to crash
13 and the entire program to stall. (LP: #1232232)
14
15+ [ Brendan Donegan ]
16+ * scripts/virtualization - change kvm command to qemu-system-x86_64 as the
17+ former is deprecated (LP: #1224854)
18+
19 -- Brendan Donegan <brendan.donegan@canonical.com> Fri, 20 Sep 2013 16:10:13 +0100
20
21 checkbox (0.16.11) saucy; urgency=low
22@@ -30,8 +31,6 @@
23 [ Brendan Donegan ]
24 * scripts/fwts_test: Removed dmi_decode and smbios tests that are no longer present
25 in fwts and change version dependency to latest version (LP: #1218993)
26- * scripts/virtualization - change kvm command to qemu-system-x86_64 as the
27- former is deprecated (LP: #1224854)
28 * jobs/virtualization.txt.in - remove virtualization-check test and the
29 virt_check script (LP: #1227071)
30
31
32=== modified file 'checkbox-old/scripts/virtualization'
33--- checkbox-old/scripts/virtualization 2013-09-26 16:03:12 +0000
34+++ checkbox-old/scripts/virtualization 2013-09-30 09:29:47 +0000
35@@ -98,8 +98,9 @@
36
37 params = \
38 '''
39- kvm -m {0} -net nic -net user,net={1},host={2},
40- hostfwd={3} -drive file={4},if=virtio -display none -nographic
41+ qemu-system-x86_64 -machine accel=kvm:tcg -m {0} -net nic
42+ -net user,net={1},host={2}, hostfwd={3} -drive file={4},if=virtio
43+ -display none -nographic
44 '''.format(
45 "256",
46 netrange,

Subscribers

People subscribed via source and target branches