public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [ANNOUNCE] kvm-autotest
@ 2008-07-06 10:16 Uri Lublin
  2008-07-09 15:43 ` Marcelo Tosatti
  0 siblings, 1 reply; 12+ messages in thread
From: Uri Lublin @ 2008-07-06 10:16 UTC (permalink / raw)
  To: kvm; +Cc: uril, Dror Russo

Hello,

     We are happy to announce the availability of kvm-autotest, a test framework 
for KVM based on autotest. Naturally, the purpose is to make KVM stable, 
find/fix bugs faster and prevent regressions. It is to serve developers, to test 
if their new code breaks anything, as well as users, to verify that the KVM they 
are using is stable in their own environment.

     There are many things to improve. Currently supported are only a few tests
(mainly reboot/migration) and a single guest (Fedora 8 i386). This will change 
soon as we add tests and guests to the test matrix.

     We've tried to be very flexible with configuration of tests, so there are
quite a few options to choose from (check the documentation). For example
one may choose to download and install the latest (or a specific) KVM release,
the latest (or a specific) daily snapshot, use git, or use other source.
Almost all configuration is located in kvm.cfg (under client directory).

     By default kvm-autotest creates a machine-local subnet with a
local dhcp server. The dhcp server is configured to ignore unknown clients and
only serves KVM guests. One may disable it by changing kvm.cfg (See documentation)

     The test framework is based on autotest ( http://test.kernel.org/autotest ).
Currently we only using client tests, later we may want to use server tests
for more complicated tests.

To download the source:
     cd /usr/local ( or another root-writeable directory )
     git clone git://git.kernel.org/pub/scm/virt/kvm/kvm-autotest.git
     cd kvm-autotest/client
To read documentation look at http://kvm.qumranet.com/kvmwiki/KVM_RegressionTest

The simplest way to use it is:
0. login as root (not necessary but simpler, as tests must be run as root)
1. Download kvm-autotest (see a few lines above)
2. Change the following in kvm.cfg according to your preference (or leave the 
default settings):
        local_kvm_dir   -- "base"   directory
        local_guest_dir -- "images" directroy (may take a lot of disk space)
        local_iso_dir   -- "isos"   directroy (may take a lot of disk space)
        bridge          -- change if your local network conflicts with
                               192.168.1/24 subnet
                           change bridge name if conflicts with a currently used
                               bridge.
        dhcp_net        -- change accordingly (e.g. use 10.0.1.2)
3. Make sure you have enough disk space for isos and images (df -h /var/local)
4. The default guest-installation test requires Fedora-8-i386-DVD.iso.
    It is configured to fetch it automatically from the web unless it already
      exists in the local_iso_dir (default path is
      /var/local/kvm_regression/isos/linux/Fedora-8-i386-DVD.iso).
    If you already have that iso image locally, create a link or change
      local_iso_dir.
    Alternatively, in tests/kvm_guest_install/Fedora-8-i386/Fedora-8-i386.ini
      set iso=/path/to/Fedora-8-i386-DVD.iso.
5. Default machine-local subnet is 192.168.1/24. If it conflicts with your
    network, you need change network configuration in kvm.cfg
6. Run the tests as root (./bin/autotest tests/kvm_runtest/control)
7. Checkout the results at results/default/

Caveats/Issues:
- Upon failure check results/defualt/debug/error-*
- After first download of KVM sources (and building + loading the modules),
     one needs to either manually remove /var/local/kvm_regression/{src,build}
     or set kvm_install=no in kvm.cfg. Otherwise the test will fail.
     The reason for it is that we do not want to remove directories
     automatically.
- The message "Guest installation completed but guest is not responsive",
     usually means that the guest installation failed.
- The tests must be run as root.
- When a guest is installing, do not move its mouse or type its keyboard.
   It confuses the guest installation algorithm (when watching its progress, e.g.
   with vncviewer).
- Guest installation is currently very sensitive to timing. If installation
   fails, sometimes it's helpfull to enlarge sleep time before the reboot and
   between steps. Do it by modifying
   tests/kvm_guest_install/Fedora-8-i386/Fedora-8-i386.steps
- After the guest is installed and you want to rerun the other tests set
     guest_install=no in kvm.cfg
   Also if you want to test an existing image, create a new vm-class (guest
   configuration) and set guest_install=no in kvm.cfg

     We hope many will test KVM on their systems and report results to the
community. We plan to have a web page with results. We hope many will add tests 
and improve KVM regression tests.

Thanks,
     Uri.

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [ANNOUNCE] kvm-autotest
@ 2008-07-12 14:27 Marcelo Tosatti
  2008-07-15  1:02 ` Uri Lublin
  0 siblings, 1 reply; 12+ messages in thread
From: Marcelo Tosatti @ 2008-07-12 14:27 UTC (permalink / raw)
  To: Uri Lublin; +Cc: kvm, Dror Russo

Hi Uri,

On Thu, Jul 10, 2008 at 03:09:36PM +0300, Uri Lublin wrote:
> You see guests as clients and the host as the server.
> We were thinking of the host as a client and multi-host operations to be 
> done by a server. guest-operations would be done using ssh (for linux 
> guests) as your example above. You make a good point that we can use 
> server/client infrastructure for guest operations. As it is simpler to 
> write autotest client tests, and we thought most of the tests would be 
> run as client tests, we want to postpone the server tests and focus on 
> adding tests and guests to the matrix.

Perhaps you need a main server on top for that, to coordinate various
hosts.

The big problem with writing client tests is that you have to rewrite
what autotest already provides, diverging from mainline. That means work
to be done everytime a new test is added in autotest, which could come
for free if guests were treated as clients and the host treated as a
server.

And the other way around is also true: new OS tests added to
kvm-autotest will not make their way naturally into autotest mainline.

Other than Windows tests, of course, but most Linux OS tests should run
fine in *NIX.

>> - On top of the client tests, we want to be able to force "special
>> stress conditions", such as:
>>     - host memory pressure (to test mmu shrink and mmu notifiers)
> Similar is how many guests (or what to memory over-subscription 
> percentage) we can start while all of them are responsive.
>>     - CPU starvation (lower the priority of the guest process with      
>> higher prio CPU hungry tasks running on the host).
>>     - synthetic cpu migration stress. ChrisW wrote this script sometime
>>       ago to test clock stability:
>>
>>      PID=$1
>>      while :
>>      do
>>         for x in 0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80
>>         do
>>             taskset -p $x $PID > /dev/null 2>&1
>>             usleep 5
>>         done
>>      done
>>     - migration (as it stands now there is no transparent way to 
>> schedule       client tests to run _while_ migration is in progress, 
>> one needs to
>>       manually change the migration test for that).
>
> You probably do not need to change the migration test. I think we need to 
> run some load on the guest (we'd probably have many load options, and the 
> user will choose/configure which one to use) before migration starts and 
> keep it running during the migration process.

Right.

>> - Currently its difficult to debug client test failure inside guests,
>>   since the VM and its image are destroyed. Perhaps the client/server
>>   model handles error handling/reporting much more nicely.
>
> Agreed, we thought of that, but it's not cooked yet. Currently we always  
> cleanup. We should not remove the (temporary) image if the test fails. 
> Should we keep the guest running upon failure ? Currently we continue to 
> test the next guest. We should probably have a configuration flag for 
> that too.

Yes, it should be dependant on a configuration flag. For developer
use, stopping the run makes sense so the failure can be analyzed. For
stress/coverage, you want to know results of the entire test battery.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-07-21 14:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-06 10:16 [ANNOUNCE] kvm-autotest Uri Lublin
2008-07-09 15:43 ` Marcelo Tosatti
2008-07-10 12:09   ` Uri Lublin
2008-07-12 15:31     ` Ryan Harper
2008-07-15  1:22       ` Uri Lublin
2008-07-15  7:39         ` Dor Laor
2008-07-15 12:32         ` Ryan Harper
2008-07-16 23:11           ` Uri Lublin
2008-07-17  0:08             ` Ryan Harper
2008-07-21 14:43               ` Uri Lublin
  -- strict thread matches above, loose matches on Subject: below --
2008-07-12 14:27 Marcelo Tosatti
2008-07-15  1:02 ` Uri Lublin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox