public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: [PATCH kvm-unit-tests v2 00/14] API test framework
Date: Wed, 15 Dec 2010 18:09:29 +0200	[thread overview]
Message-ID: <1292429383-15326-1-git-send-email-avi@redhat.com> (raw)

This patchset adds an API test framework.  Rather than driving kvm from qemu,
we now have a way of calling the kvm API directly and observing the results.
We can switch to guest mode and back at will and see any micro effects such
as the result of executing particular instructions.

A first test is added, for commit edde99ce0 ("KVM: Write protect memory
after slot swap").  This would be pretty hard to test for using the current
qemu-driven tests, but detects 5 million failures in about two minutes on
my machine.

As an experiment, the framework is coded in C++.

Avi Kivity (14):
  Makefile: add support for C++
  Improve autodepend includes
    v2: new
  Add exception class for kernel errors (errno)
    v2: new
  Add try_main() for running a program under an exception handler
    v2: new
  Introduce a C++ wrapper for the kvm APIs
    v2: throw std::exception exceptions, not ints, for libc failures
        better msr list management
  Add support for calling a function in guest mode
    v2: use tr1::function instead of boost::function
  Add sample test using the api test harness
  api: add support for KVM_SET_USER_MEMORY_REGION flags field
    v2: new
  api: support KVM_GET_DIRTY_LOG ioctl
    v2: new
  api: add memory map management
    v2: new
  Build tests with debug information
    v2: new
  api: Add support for creating an identity map with a hole
    v2: new
  Introduce libapi.a to avoid long Makefile recipes
    v2: new
  Add dirty log test
    v2: new

 Makefile              |    8 +-
 api/api-sample.cc     |   30 ++++++++
 api/dirty-log.cc      |   78 ++++++++++++++++++++
 api/exception.cc      |   33 ++++++++
 api/exception.hh      |   19 +++++
 api/identity.cc       |   95 ++++++++++++++++++++++++
 api/identity.hh       |   43 +++++++++++
 api/kvmxx.cc          |  194 +++++++++++++++++++++++++++++++++++++++++++++++++
 api/kvmxx.hh          |   85 +++++++++++++++++++++
 api/memmap.cc         |   76 +++++++++++++++++++
 api/memmap.hh         |   43 +++++++++++
 config-x86-common.mak |   15 ++++-
 12 files changed, 715 insertions(+), 4 deletions(-)
 create mode 100644 api/api-sample.cc
 create mode 100644 api/dirty-log.cc
 create mode 100644 api/exception.cc
 create mode 100644 api/exception.hh
 create mode 100644 api/identity.cc
 create mode 100644 api/identity.hh
 create mode 100644 api/kvmxx.cc
 create mode 100644 api/kvmxx.hh
 create mode 100644 api/memmap.cc
 create mode 100644 api/memmap.hh


             reply	other threads:[~2010-12-15 16:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-15 16:09 Avi Kivity [this message]
2010-12-15 16:09 ` [PATCH kvm-unit-tests v2 01/14] Makefile: add support for C++ Avi Kivity
2010-12-15 16:09 ` [PATCH kvm-unit-tests v2 02/14] Improve autodepend includes Avi Kivity
2010-12-15 16:09 ` [PATCH kvm-unit-tests v2 03/14] Add exception class for kernel errors (errno) Avi Kivity
2010-12-15 16:09 ` [PATCH kvm-unit-tests v2 04/14] Add try_main() for running a program under an exception handler Avi Kivity
2010-12-15 16:09 ` [PATCH kvm-unit-tests v2 05/14] Introduce a C++ wrapper for the kvm APIs Avi Kivity
2010-12-15 16:09 ` [PATCH kvm-unit-tests v2 06/14] Add support for calling a function in guest mode Avi Kivity
2010-12-15 16:09 ` [PATCH kvm-unit-tests v2 07/14] Add sample test using the api test harness Avi Kivity
2010-12-15 16:09 ` [PATCH kvm-unit-tests v2 08/14] api: add support for KVM_SET_USER_MEMORY_REGION flags field Avi Kivity
2010-12-15 16:09 ` [PATCH kvm-unit-tests v2 09/14] api: support KVM_GET_DIRTY_LOG ioctl Avi Kivity
2010-12-15 16:09 ` [PATCH kvm-unit-tests v2 10/14] api: add memory map management Avi Kivity
2010-12-15 16:09 ` [PATCH kvm-unit-tests v2 11/14] Build tests with debug information Avi Kivity
2010-12-15 16:09 ` [PATCH kvm-unit-tests v2 12/14] api: Add support for creating an identity map with a hole Avi Kivity
2010-12-15 16:09 ` [PATCH kvm-unit-tests v2 13/14] Introduce libapi.a to avoid long Makefile recipes Avi Kivity
2010-12-15 16:09 ` [PATCH kvm-unit-tests v2 14/14] Add dirty log test Avi Kivity
2010-12-22 13:14 ` [PATCH kvm-unit-tests v2 00/14] API test framework Marcelo Tosatti

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=1292429383-15326-1-git-send-email-avi@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /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