162306a36Sopenharmony_ci# 262306a36Sopenharmony_ci# This config is an example usage of ktest.pl with a vmware guest 362306a36Sopenharmony_ci# 462306a36Sopenharmony_ci# VMware Setup: 562306a36Sopenharmony_ci# ------------- 662306a36Sopenharmony_ci# - Edit the Virtual Machine ("Edit virtual machine settings") 762306a36Sopenharmony_ci# - Add a Serial Port 862306a36Sopenharmony_ci# - You almost certainly want it set "Connect at power on" 962306a36Sopenharmony_ci# - Select "Use socket (named pipe)" 1062306a36Sopenharmony_ci# - Select a name that you'll recognize, like 'ktestserialpipe' 1162306a36Sopenharmony_ci# - From: Server 1262306a36Sopenharmony_ci# - To: A Virtual Machine 1362306a36Sopenharmony_ci# - Save 1462306a36Sopenharmony_ci# - Make sure you note the name, it will be in the base directory of the 1562306a36Sopenharmony_ci# virtual machine (where the "disks" are stored. The default 1662306a36Sopenharmony_ci# is /var/lib/vmware/<virtual machine name>/<the name you entered above> 1762306a36Sopenharmony_ci# 1862306a36Sopenharmony_ci# - Make note of the path to the VM 1962306a36Sopenharmony_ci# </End VMware setup> 2062306a36Sopenharmony_ci# 2162306a36Sopenharmony_ci# The guest is called 'Guest' and this would be something that 2262306a36Sopenharmony_ci# could be run on the host to test a virtual machine target. 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ciMACHINE = Guest 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci# Name of the serial pipe you set in the VMware settings 2762306a36Sopenharmony_ciVMWARE_SERIAL_NAME = <the name you entered above> 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci# Define a variable of the name of the VM 3062306a36Sopenharmony_ci# Noting this needs to be the name of the kmx file, and usually, the 3162306a36Sopenharmony_ci# name of the directory that it's in. If the directory and name 3262306a36Sopenharmony_ci# differ change the VMWARE_VM_DIR accordingly. 3362306a36Sopenharmony_ci# Please ommit the .kmx extension 3462306a36Sopenharmony_ciVMWARE_VM_NAME = <virtual machine name> 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci# VM dir name. This is usually the same as the virtual machine's name, 3762306a36Sopenharmony_ci# but not always the case. Change if they differ 3862306a36Sopenharmony_ciVMWARE_VM_DIR = ${VMWARE_VM_NAME} 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci# Base directory that the Virtual machine is contained in 4162306a36Sopenharmony_ci# /var/lib/vmware is the default on Linux 4262306a36Sopenharmony_ciVMWARE_VM_BASE_DIR = /var/lib/vmware/${VMWARE_VM_DIR} 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci# Use ncat to read the unix pipe. Anything that can read the Unix Pipe 4562306a36Sopenharmony_ci# and output it's contents to stdout will work 4662306a36Sopenharmony_ciCONSOLE = /usr/bin/ncat -U ${VMWARE_VM_BASE_DIR}/${VMWARE_SERIAL_NAME} 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci# Define what version of Workstation you are using 4962306a36Sopenharmony_ci# This is used by vmrun to use the appropriate appripriate pieces to 5062306a36Sopenharmony_ci# test this. In all likelihood you want 'ws' or 'player' 5162306a36Sopenharmony_ci# Valid options: 5262306a36Sopenharmony_ci# ws - Workstation (Windows or Linux host) 5362306a36Sopenharmony_ci# fusion - Fusion (Mac host) 5462306a36Sopenharmony_ci# player - Using VMware Player (Windows or Linux host) 5562306a36Sopenharmony_ci# Note: vmrun has to run directly on the host machine 5662306a36Sopenharmony_ciVMWARE_HOST_TYPE = ws 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci# VMware provides `vmrun` to allow you to do certain things to the virtual machine 5962306a36Sopenharmony_ci# This should hard reset the VM and force a boot 6062306a36Sopenharmony_ciVMWARE_POWER_CYCLE = /usr/bin/vmrun -T ${VMWARE_HOST_TYPE} reset ${VMWARE_VM_BASE_DIR}/${VMWARE_VM_NAME}.kmx nogui 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci#*************************************# 6362306a36Sopenharmony_ci# This part is the same as test.conf # 6462306a36Sopenharmony_ci#*************************************# 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci# The include files will set up the type of test to run. Just set TEST to 6762306a36Sopenharmony_ci# which test you want to run. 6862306a36Sopenharmony_ci# 6962306a36Sopenharmony_ci# TESTS = patchcheck, randconfig, boot, test, config-bisect, bisect, min-config 7062306a36Sopenharmony_ci# 7162306a36Sopenharmony_ci# See the include/*.conf files that define these tests 7262306a36Sopenharmony_ci# 7362306a36Sopenharmony_ciTEST := patchcheck 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ci# Some tests may have more than one test to run. Define MULTI := 1 to run 7662306a36Sopenharmony_ci# the extra tests. 7762306a36Sopenharmony_ciMULTI := 0 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_ci# In case you want to differentiate which type of system you are testing 8062306a36Sopenharmony_ciBITS := 64 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ci# REBOOT = none, error, fail, empty 8362306a36Sopenharmony_ci# See include/defaults.conf 8462306a36Sopenharmony_ciREBOOT := empty 8562306a36Sopenharmony_ci 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_ci# The defaults file will set up various settings that can be used by all 8862306a36Sopenharmony_ci# machine configs. 8962306a36Sopenharmony_ciINCLUDE include/defaults.conf 9062306a36Sopenharmony_ci 9162306a36Sopenharmony_ci 9262306a36Sopenharmony_ci#*************************************# 9362306a36Sopenharmony_ci# Now we are different from test.conf # 9462306a36Sopenharmony_ci#*************************************# 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ci# The example here assumes that Guest is running a Fedora release 9862306a36Sopenharmony_ci# that uses dracut for its initfs. The POST_INSTALL will be executed 9962306a36Sopenharmony_ci# after the install of the kernel and modules are complete. 10062306a36Sopenharmony_ci# 10162306a36Sopenharmony_ciPOST_INSTALL = ${SSH} /sbin/dracut -f /boot/initramfs-test.img $KERNEL_VERSION 10262306a36Sopenharmony_ci 10362306a36Sopenharmony_ci# Guests sometimes get stuck on reboot. We wait 3 seconds after running 10462306a36Sopenharmony_ci# the reboot command and then do a full power-cycle of the guest. 10562306a36Sopenharmony_ci# This forces the guest to restart. 10662306a36Sopenharmony_ci# 10762306a36Sopenharmony_ciPOWERCYCLE_AFTER_REBOOT = 3 10862306a36Sopenharmony_ci 10962306a36Sopenharmony_ci# We do the same after the halt command, but this time we wait 20 seconds. 11062306a36Sopenharmony_ciPOWEROFF_AFTER_HALT = 20 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_ci# As the defaults.conf file has a POWER_CYCLE option already defined, 11462306a36Sopenharmony_ci# and options can not be defined in the same section more than once 11562306a36Sopenharmony_ci# (all DEFAULTS sections are considered the same). We use the 11662306a36Sopenharmony_ci# DEFAULTS OVERRIDE to tell ktest.pl to ignore the previous defined 11762306a36Sopenharmony_ci# options, for the options set in the OVERRIDE section. 11862306a36Sopenharmony_ci# 11962306a36Sopenharmony_ciDEFAULTS OVERRIDE 12062306a36Sopenharmony_ci 12162306a36Sopenharmony_ci# Instead of using the default POWER_CYCLE option defined in 12262306a36Sopenharmony_ci# defaults.conf, we use virsh to cycle it. To do so, we destroy 12362306a36Sopenharmony_ci# the guest, wait 5 seconds, and then start it up again. 12462306a36Sopenharmony_ci# Crude, but effective. 12562306a36Sopenharmony_ci# 12662306a36Sopenharmony_ciPOWER_CYCLE = ${VMWARE_POWER_CYCLE} 12762306a36Sopenharmony_ci 12862306a36Sopenharmony_ci 12962306a36Sopenharmony_ciDEFAULTS 13062306a36Sopenharmony_ci 13162306a36Sopenharmony_ci# The following files each handle a different test case. 13262306a36Sopenharmony_ci# Having them included allows you to set up more than one machine and share 13362306a36Sopenharmony_ci# the same tests. 13462306a36Sopenharmony_ciINCLUDE include/patchcheck.conf 13562306a36Sopenharmony_ciINCLUDE include/tests.conf 13662306a36Sopenharmony_ciINCLUDE include/bisect.conf 13762306a36Sopenharmony_ciINCLUDE include/min-config.conf 138