Testing KVM with kvm autotest

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(add first draft of kvm-autotest instructions)
 
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
[[Category:Virtualization]]
 
[http://www.linux-kvm.org/page/KVM-Autotest kvm-autotest] is an effort by KVM developers to create a suite of regression tests for KVM.
 
[http://www.linux-kvm.org/page/KVM-Autotest kvm-autotest] is an effort by KVM developers to create a suite of regression tests for KVM.
  
Line 6: Line 7:
 
  $> yum install qemu-system-x86 qemu-img
 
  $> yum install qemu-system-x86 qemu-img
  
  $> mkdir -p ~/autotest/iso && cd ~/autotest
+
  $> mkdir -p ~/autotest/iso && cd ~/autotest/iso
 
+
  $> wget http://download.fedoraproject.org/pub/fedora/linux/releases/8/Fedora/i386/iso/Fedora-8-i386-DVD.iso
  $> wget http://download.fedoraproject.org/pub/fedora/linux/releases/8/Fedora/i386/iso/Fedora-8-i386-DVD.iso iso/
+
$> cd ..
  $> git clone git://git.kernel.org/pub/scm/virt/kvm/kvm-autotest.git
+
  $> git clone git://github.com/ehabkost/autotest.git
  
 
  $> mkdir -p /tmp/kvm_autotest_root/{iso/linux,images}
 
  $> mkdir -p /tmp/kvm_autotest_root/{iso/linux,images}
Line 16: Line 17:
 
  $> ln -s /usr/bin/qemu-img /tmp/kvm_autotest_root/qemu-img
 
  $> ln -s /usr/bin/qemu-img /tmp/kvm_autotest_root/qemu-img
  
  $> cd kvm-autotest/client/tests/kvm_runtest_2
+
  $> cd kvm-autotest/client/tests/kvm
 
  $> cp kvm_tests.cfg.sample kvm_tests.cfg
 
  $> cp kvm_tests.cfg.sample kvm_tests.cfg
  
 
  # FIXME: this is lame, just disables kvm_install
 
  # FIXME: this is lame, just disables kvm_install
  $> sed -e 's/^\(job.run_test\)/#\1/' < control > control.fedora
+
  $> sed -e 's/^\(r = job.run_test\)/#\1/' < control > control.fedora
 
</pre>
 
</pre>
  
Line 32: Line 33:
  
 
Note: this requires Fedora rawhide and at least qemu-0.10-5.fc11.
 
Note: this requires Fedora rawhide and at least qemu-0.10-5.fc11.
 +
 +
== Common Problem:==
 +
If kvm_autotest fails with an error similar the one below it may be the fact your machine is slower than the one use to generate the step files:
 +
 +
<pre>
 +
20090429-143237 Fedora.8.32.install: ERROR: barrier_2: Barrier failed at step 3 after 85 seconds (timeout)
 +
</pre>
 +
 +
you can use the step editor to edit the step file and increase the time-out:
 +
 +
<pre>
 +
[kvm_runtest_2]# ./stepeditor.py steps/Fedora-8-i386.steps
 +
</pre>

Latest revision as of 17:43, 9 June 2009

kvm-autotest is an effort by KVM developers to create a suite of regression tests for KVM.

Fedora virtualization testers can help improve KVM by running kvm-autotest on their own hardware. The kvm-autotest wiki contains some instructions on doing this, but to get started quickly try the following:

 $> yum install qemu-system-x86 qemu-img

 $> mkdir -p ~/autotest/iso && cd ~/autotest/iso
 $> wget http://download.fedoraproject.org/pub/fedora/linux/releases/8/Fedora/i386/iso/Fedora-8-i386-DVD.iso
 $> cd ..
 $> git clone git://github.com/ehabkost/autotest.git

 $> mkdir -p /tmp/kvm_autotest_root/{iso/linux,images}
 $> ln -s ~/autotest/iso/Fedora-8-i386-DVD.iso /tmp/kvm_autotest_root/iso/linux/
 $> ln -s /usr/bin/qemu-kvm /tmp/kvm_autotest_root/qemu
 $> ln -s /usr/bin/qemu-img /tmp/kvm_autotest_root/qemu-img

 $> cd kvm-autotest/client/tests/kvm
 $> cp kvm_tests.cfg.sample kvm_tests.cfg

 # FIXME: this is lame, just disables kvm_install
 $> sed -e 's/^\(r = job.run_test\)/#\1/' < control > control.fedora

and then as root:

 $> ../../bin/autotest ./control.fedora

Any errors encountered should be reported via bugzilla.

Note: this requires Fedora rawhide and at least qemu-0.10-5.fc11.

[edit] Common Problem:

If kvm_autotest fails with an error similar the one below it may be the fact your machine is slower than the one use to generate the step files:

20090429-143237 Fedora.8.32.install: ERROR: barrier_2: Barrier failed at step 3 after 85 seconds (timeout)

you can use the step editor to edit the step file and increase the time-out:

 
[kvm_runtest_2]# ./stepeditor.py steps/Fedora-8-i386.steps