summaryrefslogtreecommitdiffstats
path: root/tools/testing/ktest/examples/vmware.conf
blob: 61958163d242c40fef5db9e1862df143d2e253ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#
# This config is an example usage of ktest.pl with a vmware guest
#
# VMware Setup:
# -------------
# - Edit the Virtual Machine ("Edit virtual machine settings")
# - Add a Serial Port
#   - You almost certainly want it set "Connect at power on"
#   - Select "Use socket (named pipe)"
#   - Select a name that you'll recognize, like 'ktestserialpipe'
#   - From: Server
#   - To: A Virtual Machine
#   - Save
# - Make sure you note the name, it will be in the base directory of the
#   virtual machine (where the "disks" are stored.  The default
#   is /var/lib/vmware/<virtual machine name>/<the name you entered above>
#
# - Make note of the path to the VM
# </End VMware setup>
#
# The guest is called 'Guest' and this would be something that
# could be run on the host to test a virtual machine target.

MACHINE = Guest

# Name of the serial pipe you set in the VMware settings
VMWARE_SERIAL_NAME = <the name you entered above>

# Define a variable of the name of the VM
# Noting this needs to be the name of the kmx file, and usually, the
# name of the directory that it's in.  If the directory and name
# differ change the VMWARE_VM_DIR accordingly.
# Please ommit the .kmx extension
VMWARE_VM_NAME = <virtual machine name>

# VM dir name.  This is usually the same as the virtual machine's name,
# but not always the case.  Change if they differ
VMWARE_VM_DIR = ${VMWARE_VM_NAME}

# Base directory that the Virtual machine is contained in
# /var/lib/vmware is the default on Linux
VMWARE_VM_BASE_DIR = /var/lib/vmware/${VMWARE_VM_DIR}

# Use ncat to read the unix pipe.  Anything that can read the Unix Pipe
# and output it's contents to stdout will work
CONSOLE = /usr/bin/ncat -U ${VMWARE_VM_BASE_DIR}/${VMWARE_SERIAL_NAME}

# Define what version of Workstation you are using
# This is used by vmrun to use the appropriate appripriate pieces to 
# test this.  In all likelihood you want 'ws' or 'player' 
# Valid options:
# 	ws - Workstation (Windows or Linux host)
# 	fusion - Fusion (Mac host)
# 	player - Using VMware Player (Windows or Linux host)
# Note: vmrun has to run directly on the host machine
VMWARE_HOST_TYPE = ws

# VMware provides `vmrun` to allow you to do certain things to the virtual machine
# This should hard reset the VM and force a boot
VMWARE_POWER_CYCLE = /usr/bin/vmrun -T ${VMWARE_HOST_TYPE} reset ${VMWARE_VM_BASE_DIR}/${VMWARE_VM_NAME}.kmx nogui

#*************************************#
# This part is the same as test.conf  #
#*************************************#

# The include files will set up the type of test to run. Just set TEST to
# which test you want to run.
#
# TESTS = patchcheck, randconfig, boot, test, config-bisect, bisect, min-config
#
# See the include/*.conf files that define these tests
#
TEST := patchcheck

# Some tests may have more than one test to run. Define MULTI := 1 to run
# the extra tests.
MULTI := 0

# In case you want to differentiate which type of system you are testing
BITS := 64

# REBOOT = none, error, fail, empty
#  See include/defaults.conf
REBOOT := empty


# The defaults file will set up various settings that can be used by all
# machine configs.
INCLUDE include/defaults.conf


#*************************************#
# Now we are different from test.conf #
#*************************************#


# The example here assumes that Guest is running a Fedora release
# that uses dracut for its initfs. The POST_INSTALL will be executed
# after the install of the kernel and modules are complete.
#
POST_INSTALL = ${SSH} /sbin/dracut -f /boot/initramfs-test.img $KERNEL_VERSION

# Guests sometimes get stuck on reboot. We wait 3 seconds after running
# the reboot command and then  do a full power-cycle of the guest.
# This forces the guest to restart.
#
POWERCYCLE_AFTER_REBOOT = 3

# We do the same after the halt command, but this time we wait 20 seconds.
POWEROFF_AFTER_HALT = 20


# As the defaults.conf file has a POWER_CYCLE option already defined,
# and options can not be defined in the same section more than once
# (all DEFAULTS sections are considered the same). We use the
# DEFAULTS OVERRIDE to tell ktest.pl to ignore the previous defined
# options, for the options set in the OVERRIDE section.
#
DEFAULTS OVERRIDE

# Instead of using the default POWER_CYCLE option defined in
# defaults.conf, we use virsh to cycle it. To do so, we destroy
# the guest, wait 5 seconds, and then start it up again.
# Crude, but effective.
#
POWER_CYCLE = ${VMWARE_POWER_CYCLE}


DEFAULTS

# The following files each handle a different test case.
# Having them included allows you to set up more than one machine and share
# the same tests.
INCLUDE include/patchcheck.conf
INCLUDE include/tests.conf
INCLUDE include/bisect.conf
INCLUDE include/min-config.conf