Created attachment 788871 [details] Patch to qemu.spec Description of problem: About a year ago I wrote a small qemu/kernel "sanity checker". It simply checks that a given kernel boots on a given qemu. It works by having a small initramfs which prints a "hello world"-style message, and we check the serial port output of the qemu process to ensure the message is eventually printed. It's a sanity check, not a full test of functionality. http://people.redhat.com/~rjones/qemu-sanity-check/ I'm now trying to get this packaged in Fedora. See: https://bugzilla.redhat.com/show_bug.cgi?id=999108 Once it's packaged in Fedora, I think qemu should use it, to start with as an advisory test, but eventually as a mandatory test (the difference is the advisory test just prints a message but does not stop the build). Version-Release number of selected component (if applicable): qemu 1.6.0-4.fc21 Additional info: See attachment, which is the suggested change to qemu.spec.
Scratch build with the patch: http://koji.fedoraproject.org/koji/taskinfo?taskID=5836862
(In reply to Richard W.M. Jones from comment #1) > Scratch build with the patch: > http://koji.fedoraproject.org/koji/taskinfo?taskID=5836862 Of course, ignore that, qemu-sanity-checker isn't in Fedora yet :-(
Scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=5842962 If you search through the build log for the string "qemu-sanity-check" you should see the test running (successfully): http://kojipkgs.fedoraproject.org//work/tasks/2964/5842964/build.log
I have pushed this to Rawhide only (qemu-1.6.0-5.fc21). It's an advisory test only. http://koji.fedoraproject.org/koji/taskinfo?taskID=5864749
Lucky it's advisory because the test is failing for some reason with: + qemu-sanity-check --qemu=x86_64-softmmu/qemu-system-x86_64 ls: cannot access /boot/vmlinuz-*.x86_64: No such file or directory /usr/bin/qemu-sanity-check: cannot find a Linux kernel in /boot Choose a kernel to test using --kernel=/path/to/vmlinuz + : + exit 0 I'll leave this bug open while I work out what's wrong.
It turns out that 'BuildRequires: kernel' picks 'kernel-debug' (both 'kernel' and 'kernel-debug' provide the 'kernel' dependency, although why yum picks the -debug one is anyone's guess). Anyway, kernel-debug has a file: /boot/vmlinuz-3.11.0-0.rc7.git0.1.fc21.x86_64+debug which does not match what qemu-sanity-check is expecting (/boot/vmlinuz-*.x86_64). This is a bug in qemu-sanity-check since the +debug kernel would be a reasonable choice (bug 1002189).
I've fixed bug 1002189 and done a scratch-build of qemu against the new qemu-sanity-check-1.1.4-2.fc21, and it passed. http://koji.fedoraproject.org/koji/taskinfo?taskID=5865652 Notes: (1) The output: + qemu-sanity-check --qemu=x86_64-softmmu/qemu-system-x86_64 Could not access KVM kernel module: No such file or directory failed to initialize KVM: No such file or directory Back to tcg accelerator. + exit 0 is *correct*! KVM just prints this spew when it falls back to using TCG. (2) Only x86-64 runs the test. We could enable it on i686 too, but I didn't do that because it would require a big conditional to find the right qemu-system-* binary to run, something like: %ifarch x86_64 qemu=x86_64-softmmu/qemu-system-x86_64 %else %ifarch %{ix86} qemu=i386-softmmu/qemu-system-i386 %endif %endif qemu-sanity-check --qemu=$qemu || : (3) It's known to fail on ARM. (4) I checked and qemu will automatically locate its BIOS files in a directory relative to the location of the binary. So we don't need to pass the -L option to qemu, and as we can see from the scratch build it evidently does work.