162306a36Sopenharmony_ci#
262306a36Sopenharmony_ci# This config is an example usage of ktest.pl with a kvm guest
362306a36Sopenharmony_ci#
462306a36Sopenharmony_ci# The guest is called 'Guest' and this would be something that
562306a36Sopenharmony_ci# could be run on the host to test a virtual machine target.
662306a36Sopenharmony_ci
762306a36Sopenharmony_ciMACHINE = Guest
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci# Use virsh to read the serial console of the guest
1162306a36Sopenharmony_ciCONSOLE =  virsh console ${MACHINE}
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci# Use SIGKILL to terminate virsh console. We can't kill virsh console
1462306a36Sopenharmony_ci# by the default signal, SIGINT.
1562306a36Sopenharmony_ciCLOSE_CONSOLE_SIGNAL = KILL
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci#*************************************#
1862306a36Sopenharmony_ci# This part is the same as test.conf  #
1962306a36Sopenharmony_ci#*************************************#
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci# The include files will set up the type of test to run. Just set TEST to
2262306a36Sopenharmony_ci# which test you want to run.
2362306a36Sopenharmony_ci#
2462306a36Sopenharmony_ci# TESTS = patchcheck, randconfig, boot, test, config-bisect, bisect, min-config
2562306a36Sopenharmony_ci#
2662306a36Sopenharmony_ci# See the include/*.conf files that define these tests
2762306a36Sopenharmony_ci#
2862306a36Sopenharmony_ciTEST := patchcheck
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci# Some tests may have more than one test to run. Define MULTI := 1 to run
3162306a36Sopenharmony_ci# the extra tests.
3262306a36Sopenharmony_ciMULTI := 0
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci# In case you want to differentiate which type of system you are testing
3562306a36Sopenharmony_ciBITS := 64
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ci# REBOOT = none, error, fail, empty
3862306a36Sopenharmony_ci#  See include/defaults.conf
3962306a36Sopenharmony_ciREBOOT := empty
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ci# The defaults file will set up various settings that can be used by all
4362306a36Sopenharmony_ci# machine configs.
4462306a36Sopenharmony_ciINCLUDE include/defaults.conf
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci#*************************************#
4862306a36Sopenharmony_ci# Now we are different from test.conf #
4962306a36Sopenharmony_ci#*************************************#
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ci# The example here assumes that Guest is running a Fedora release
5362306a36Sopenharmony_ci# that uses dracut for its initfs. The POST_INSTALL will be executed
5462306a36Sopenharmony_ci# after the install of the kernel and modules are complete.
5562306a36Sopenharmony_ci#
5662306a36Sopenharmony_ciPOST_INSTALL = ${SSH} /sbin/dracut -f /boot/initramfs-test.img $KERNEL_VERSION
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ci# Guests sometimes get stuck on reboot. We wait 3 seconds after running
5962306a36Sopenharmony_ci# the reboot command and then  do a full power-cycle of the guest.
6062306a36Sopenharmony_ci# This forces the guest to restart.
6162306a36Sopenharmony_ci#
6262306a36Sopenharmony_ciPOWERCYCLE_AFTER_REBOOT = 3
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ci# We do the same after the halt command, but this time we wait 20 seconds.
6562306a36Sopenharmony_ciPOWEROFF_AFTER_HALT = 20
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ci
6862306a36Sopenharmony_ci# As the defaults.conf file has a POWER_CYCLE option already defined,
6962306a36Sopenharmony_ci# and options can not be defined in the same section more than once
7062306a36Sopenharmony_ci# (all DEFAULTS sections are considered the same). We use the
7162306a36Sopenharmony_ci# DEFAULTS OVERRIDE to tell ktest.pl to ignore the previous defined
7262306a36Sopenharmony_ci# options, for the options set in the OVERRIDE section.
7362306a36Sopenharmony_ci#
7462306a36Sopenharmony_ciDEFAULTS OVERRIDE
7562306a36Sopenharmony_ci
7662306a36Sopenharmony_ci# Instead of using the default POWER_CYCLE option defined in
7762306a36Sopenharmony_ci# defaults.conf, we use virsh to cycle it. To do so, we destroy
7862306a36Sopenharmony_ci# the guest, wait 5 seconds, and then start it up again.
7962306a36Sopenharmony_ci# Crude, but effective.
8062306a36Sopenharmony_ci#
8162306a36Sopenharmony_ciPOWER_CYCLE = virsh destroy ${MACHINE}; sleep 5; virsh start ${MACHINE}
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ci
8462306a36Sopenharmony_ciDEFAULTS
8562306a36Sopenharmony_ci
8662306a36Sopenharmony_ci# The following files each handle a different test case.
8762306a36Sopenharmony_ci# Having them included allows you to set up more than one machine and share
8862306a36Sopenharmony_ci# the same tests.
8962306a36Sopenharmony_ciINCLUDE include/patchcheck.conf
9062306a36Sopenharmony_ciINCLUDE include/tests.conf
9162306a36Sopenharmony_ciINCLUDE include/bisect.conf
9262306a36Sopenharmony_ciINCLUDE include/min-config.conf
9362306a36Sopenharmony_ciINCLUDE include/bootconfig.conf