From: Ryan Harper <ryanh@us.ibm.com>
To: kvm@vger.kernel.org
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Ryan Harper <ryanh@us.ibm.com>,
qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 0/1] integrate qemu-test into kvm-userspace
Date: Fri, 25 Jul 2008 11:53:24 -0500 [thread overview]
Message-ID: <1217004805-13955-1-git-send-email-ryanh@us.ibm.com> (raw)
This patch provides a relatively simple method for exercising various
features of qemu/kvm by interacting with the guest via serial and qemu
via the monitor that individual developers can use to validate that
their changes having broken fundamental feature/function. Such tests
need to be very accessable and easy-to-use to encourge there use by
users/developers. As a bonus, in-tree make test is trivially integrated
into higher-level test frameworks such as autotest.
Using such interfaces the guest requirements are very low (serial login)
and thus we can execute tests across a large number of differing
guests. Writing new test cases should also be fairly simple, for
example, the host_shutdown.py test logic is as follows:
def run_test(vm):
vm.wait_for_boot()
vm.login()
vm.guest_command("echo pressing power button")
output = vm.monitor_command('system_powerdown')
if vm.wait_for_shutdown(): return 1
There is a configuration file (test/CONFIG) which can be used to provide
per-distro overrides for various functions. The current defaults have
been tested against: RHEL5, openSUSE 11, Ubuntu 8.04, and Fedora 9 w.r.t
the regular expressions used for login, and prompt.
Getting started is relatively simple for someone familiar with
configuring a guest for serial login and boot output via serial. Once
completed, add a file to $(TOPDIR)/test/images like the following:
% cat images/rhel5.2
DISK="/home/rharper/work/images/rhel5.2_x86_64_10G.qcow2"
COMMAND="qemu-system-x86_64 -m 512 -smp 2 -net tap -net nic,model=e1000
-net nic,model=rtl8139 -drive file=${DISK},if=ide,boot=on
-vnc none"
You can omit the COMMAND variable and a default qemu command will be run
instead (see run.sh). For additional guest image or config just add a
new file in the images dir.
To run the tests, at the toplevel run:
% make && sudo make test
<snip massive amount of output>
************************************************************
Results: 5 passed, 4 FAILED
passed: e820_memory.py:fedora-9-x86_64
passed: host_shutdown.py:fedora-9-x86_64
passed: networking.py:fedora-9-x86_64
passed: reboot.py:fedora-9-x86_64
passed: smp_hotplug.py:fedora-9-x86_64
FAILED: Test:host_reset.py,Image:fedora-9-x86_64
FAILED: Test:migrate.py,Image:fedora-9-x86_64
FAILED: Test:timedrift.py,Image:fedora-9-x86_64
FAILED: Test:writeverify.py,Image:fedora-9-x86_64
************************************************************
Ultimately, I'd like to push this into qemu since nothing we're doing
here is arch or kvm specific. To do so, I'd move the test bits into qemu/tests
and invoke run.sh from there, iterating over the various QEMU_PROG names
available for each configured TARGET_DIRS so that we support running
when qemu has been configured with multiple targets.
The current kvm-userspace integration handles removing and loading the
compiled modules in the kernel dir and some additional symlink-fu to
ensure we run qemu from the build tree and don't need to have run make
install. This integration would stay in the kvm-userspace tree and
change to recursing into qemu and invoking make test.
There is still plenty to do on the framework as well as the test, but I
wanted to get feedback on the current setup before investing significant
efforts.
next reply other threads:[~2008-07-25 16:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-25 16:53 Ryan Harper [this message]
2008-07-25 16:53 ` [Qemu-devel] [PATCH 1/1] integrate qemu-test into kvm-userspace Ryan Harper
2008-07-25 17:12 ` [Qemu-devel] [PATCH 0/1] " Paul Brook
2008-07-25 17:52 ` Anthony Liguori
2008-07-25 17:57 ` Ryan Harper
2008-07-29 13:17 ` [Qemu-devel] " Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1217004805-13955-1-git-send-email-ryanh@us.ibm.com \
--to=ryanh@us.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).