Path: blob/master/tools/testing/ktest/examples/kvm.conf
26296 views
#1# This config is an example usage of ktest.pl with a kvm guest2#3# The guest is called 'Guest' and this would be something that4# could be run on the host to test a virtual machine target.56MACHINE = Guest789# Use virsh to read the serial console of the guest10CONSOLE = virsh console ${MACHINE}1112# Use SIGKILL to terminate virsh console. We can't kill virsh console13# by the default signal, SIGINT.14CLOSE_CONSOLE_SIGNAL = KILL1516#*************************************#17# This part is the same as test.conf #18#*************************************#1920# The include files will set up the type of test to run. Just set TEST to21# which test you want to run.22#23# TESTS = patchcheck, randconfig, boot, test, config-bisect, bisect, min-config24#25# See the include/*.conf files that define these tests26#27TEST := patchcheck2829# Some tests may have more than one test to run. Define MULTI := 1 to run30# the extra tests.31MULTI := 03233# In case you want to differentiate which type of system you are testing34BITS := 643536# REBOOT = none, error, fail, empty37# See include/defaults.conf38REBOOT := empty394041# The defaults file will set up various settings that can be used by all42# machine configs.43INCLUDE include/defaults.conf444546#*************************************#47# Now we are different from test.conf #48#*************************************#495051# The example here assumes that Guest is running a Fedora release52# that uses dracut for its initfs. The POST_INSTALL will be executed53# after the install of the kernel and modules are complete.54#55POST_INSTALL = ${SSH} /sbin/dracut -f /boot/initramfs-test.img $KERNEL_VERSION5657# Guests sometimes get stuck on reboot. We wait 3 seconds after running58# the reboot command and then do a full power-cycle of the guest.59# This forces the guest to restart.60#61POWERCYCLE_AFTER_REBOOT = 36263# We do the same after the halt command, but this time we wait 20 seconds.64POWEROFF_AFTER_HALT = 20656667# As the defaults.conf file has a POWER_CYCLE option already defined,68# and options can not be defined in the same section more than once69# (all DEFAULTS sections are considered the same). We use the70# DEFAULTS OVERRIDE to tell ktest.pl to ignore the previous defined71# options, for the options set in the OVERRIDE section.72#73DEFAULTS OVERRIDE7475# Instead of using the default POWER_CYCLE option defined in76# defaults.conf, we use virsh to cycle it. To do so, we destroy77# the guest, wait 5 seconds, and then start it up again.78# Crude, but effective.79#80POWER_CYCLE = virsh destroy ${MACHINE}; sleep 5; virsh start ${MACHINE}818283DEFAULTS8485# The following files each handle a different test case.86# Having them included allows you to set up more than one machine and share87# the same tests.88INCLUDE include/patchcheck.conf89INCLUDE include/tests.conf90INCLUDE include/bisect.conf91INCLUDE include/min-config.conf92INCLUDE include/bootconfig.conf9394