aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/ktest/sample.conf
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/ktest/sample.conf')
-rw-r--r--tools/testing/ktest/sample.conf330
1 files changed, 330 insertions, 0 deletions
diff --git a/tools/testing/ktest/sample.conf b/tools/testing/ktest/sample.conf
new file mode 100644
index 000000000000..42f803fe4a8d
--- /dev/null
+++ b/tools/testing/ktest/sample.conf
@@ -0,0 +1,330 @@
1#
2# Config file for autotest.pl
3#
4# Note, all paths must be absolute
5#
6
7# Almost all options may be overwritten per test run, by appending
8# a [x] to the config. For example, to change the test type for
9# the third iteration of tests, you can specify:
10# (1 is for the first test, 2 for the second, and so on)
11#
12# TEST_TYPE[3] = build
13#
14# The options that can not be changed like this are:
15# NUM_TESTS
16# LOG_FILE
17# CLEAR_LOG
18# POWEROFF_ON_SUCCESS
19# REBOOT_ON_SUCCESS
20#
21
22#### Mandatory Config Options ####
23
24# The machine hostname that you will test
25#MACHINE = target
26
27# The box is expected to have ssh on normal bootup, provide the user
28# (most likely root, since you need privileged operations)
29#SSH_USER = root
30
31# The directory that contains the Linux source code
32#BUILD_DIR = /home/test/linux.git
33
34# The directory that the objects will be built
35# (can not be same as BUILD_DIR)
36#OUTPUT_DIR = /home/test/build/target
37
38# The location of the compiled file to copy to the target
39# (relative to OUTPUT_DIR)
40#BUILD_TARGET = arch/x86/boot/bzImage
41
42# The place to put your image on the test machine
43#TARGET_IMAGE = /boot/vmlinuz-test
44
45# A script or command to reboot the box
46# Here is a digital loggers power switch example
47#POWER_CYCLE = wget --no-proxy -O /dev/null -q --auth-no-challenge 'http://admin:admin@power/outlet?5=CCL'
48# Here is an example to reboot a virtual box on the current host
49# with the name "Guest".
50#POWER_CYCLE = virsh list | grep '\<Guest\>' | awk '{printf ("%d", $1)}' | xargs virsh destroy; sleep 5; virsh start Guest
51
52# The script or command that reads the console
53# If you use ttywatch server, something like the following would work.
54#CONSOLE = nc -d localhost 3001
55# For a virtual machine with guest name "Guest".
56#CONSOLE = virsh console `virsh list | grep '\<Guest\>' | awk '{printf ("%d", $1)}'`
57
58# Required version ending to differentiate the test
59# from other linux builds on the system.
60#LOCALVERSION = -test
61
62# The grub title name for the test kernel to boot
63# (Only mandatory if REBOOT_TYPE = grub)
64#
65# For example, if in the /boot/grub/menu.lst the test kernel title has:
66# title Test Kernel
67#GRUB_MENU = Test Kernel
68
69# A script to reboot the target into the test kernel
70# (Only mandatory if REBOOT_TYPE = script)
71#REBOOT_SCRIPT =
72
73#### Optional Config Options (all have defaults) ####
74
75# The number of tests to run (default 5)
76#NUM_TESTS = 5
77
78# The default test type (default test)
79# The test types may be:
80# build - only build the kernel, do nothing else
81# boot - build and boot the kernel
82# test - build, boot and if TEST is set, run the test script
83# bisect - Perform a bisect on the kernel (see BISECT_TYPE below)
84# patchcheck - Do a test on a series of commits in git (see PATCHCHECK below)
85#TEST_TYPE = test
86
87# The build type is any make config type or a command.
88# (default randconfig)
89# nobuild - skip the clean and build step
90#BUILD_TYPE = randconfig
91
92# The make command (default make)
93# If you are building a 32bit x86 on a 64 bit host
94#MAKE_CMD = CC=i386-gcc AS=i386-as make ARCH=i386
95
96# Way to reboot the box to the test kernel.
97# Only valid options so far are "grub" and "script"
98# (default grub)
99# If you specify grub, it will assume grub version 1
100# and will search in /boot/grub/menu.lst for the title $GRUB_MENU
101# and select that target to reboot to the kernel. If this is not
102# your setup, then specify "script" and have a command or script
103# specified in REBOOT_SCRIPT to boot to the target.
104#REBOOT_TYPE = grub
105
106# Line to define success in output. (default "login:")
107# This is what the line contains, not the entire line. If you need
108# the entire line to match, then use regural expression syntax like
109# ^MyBox Login:$
110#SUCCESS_LINE = login:
111
112# As the test reads the console, after it hits the SUCCESS_LINE
113# the time it waits for the monitor to settle down between reads
114# can usually be lowered.
115# (in seconds) (default 1)
116#BOOTED_TIMEOUT = 1
117
118# The timeout in seconds when we consider the box hung after
119# the console stop producing output.
120# (default 120)
121#TIMEOUT = 120
122
123# The location on the host where to write temp files
124# (default /tmp/autotest)
125#TMP_DIR = /tmp/autotest
126
127# In between tests, a reboot of the box may occur, and this
128# is the time to wait for the console after it stops producing
129# output. Some machines may not produce a large lag on reboot
130# so this should accommodate it.
131# (default 60)
132#SLEEP_TIME = 60
133
134# The time in between bisects to sleep (in seconds)
135# Can be less than SLEEP_TIME since bisects do more work
136# in between boots. (default 60)
137#BISECT_SLEEP_TIME = 60
138
139# Build without doing a make mrproper, or removing .config
140# (default 0)
141#BUILD_NOCLEAN = 0
142
143# Reboot the target box on error (default 0)
144#REBOOT_ON_ERROR = 0
145
146# Power off the target on error (ignored if REBOOT_ON_ERROR is set)
147# (default 0)
148#POWEROFF_ON_ERROR = 0
149
150# Power off the target after all tests have completed successfully
151# (default 0)
152#POWEROFF_ON_SUCCESS = 0
153
154# Reboot the target after all test completed successfully (default 1)
155# (ignored if POWEROFF_ON_SUCCESS is set)
156#REBOOT_ON_SUCCESS = 1
157
158# Stop testing if a build fails. If set, the script will end if
159# a failure is detected, otherwise it will save off the .config,
160# dmesg and bootlog in a directory called
161# MACHINE-TEST_TYPE_BUILD_TYPE-fail-yyyymmddhhmmss
162# if the STORE_FAILURES directory is set.
163# (default 1)
164# Note, even if this is set to zero, there are some errors that still
165# stop the tests.
166#DIE_ON_FAILURE = 1
167
168# Directory to store failure directories on failure. If this is not
169# set, DIE_ON_FAILURE=0 will not save off the .config, dmesg and
170# bootlog.
171#STORE_FAILURES = /home/test/failures
172
173# A script or command to power off the box (default undef)
174# Needed for POWEROFF_ON_ERROR and SUCCESS
175# Example for digital loggers power switch:
176#POWER_OFF = wget --no-proxy -O /dev/null -q --auth-no-challenge 'http://admin:admin@power/outlet?5=OFF'
177# Example for a virtual guest call "Guest".
178#POWER_OFF = virsh list | grep '\<GuestF12\>' | awk '{printf ("%d", $1)}' | xargs virsh destroy
179
180# Any build options for the make (default "")
181#BUILD_OPTIONS = -j20
182
183# Optional log file to write the status (recommended)
184# (default undef)
185#LOG_FILE = /home/test/logfiles/target.log
186
187# Remove old logfile if it exists before starting all tests.
188# (default 0)
189#CLEAR_LOG = 0
190
191# Test to run if there is a successful boot and TEST_TYPE is test.
192# Must exit with 0 on success and non zero on error
193# default (undef)
194#TEST = ssh user@machine /root/run_test
195#TEST[1] = ssh root@mxtest /root/run_test
196
197# The min config that is needed to build for the machine
198# A nice way to get this to work, is to do a "lsmod > mymods" on the target
199# copy it to the build server, and then run "make LSMOD=mymods localyesconfig".
200# Then copy all the options that are set: "grep '^CONFIG' > /home/test/config-min"
201#
202# You might want to set:
203# CONFIG_CMDLINE="<your options here>"
204# randconfig may set the above and override your real command
205# line options.
206# (default undef)
207#MIN_CONFIG = /home/test/config-min
208
209# Sometimes there's options that just break the boot and
210# you do not care about. Here are a few:
211# # CONFIG_STAGING is not set
212# Staging drivers are horrible, and can break the build.
213# # CONFIG_SCSI_DEBUG is not set
214# SCSI_DEBUG may change your root partition
215# # CONFIG_KGDB_SERIAL_CONSOLE is not set
216# KGDB may cause oops waiting for a connection that's not there.
217# This option points to the file containing config options that will be prepended
218# to the MIN_CONFIG (or be the MIN_CONFIG if it is not set)
219# before running it through randconfig
220# (default undef)
221#ADD_CONFIG = /home/test/config-broken
222
223#### Per test run options ####
224# These are options are per build only. The only exist with the [x]
225# syntax, and there is no general option.
226#
227# All are optional and undef by default
228#
229# CHECKOUT[x] = branch
230#
231# If the BUILD_DIR is a git repository, then you can set this option
232# to checkout the given branch before running the TEST. If you
233# specify this for the first run, that branch will be used for
234# all preceding tests until a new CHECKOUT[x] is set.
235#
236# For TEST_TYPE[x] = patchcheck
237#
238# This expects the BUILD_DIR to be a git repository, and
239# will checkout the PATCHCHECK_START[x].
240#
241# PATCHCHECK_START[x] is required and is the first patch to
242# test (the SHA1 of the commit).
243#
244# PATCHCHECK_END[x] is the last patch to check (default HEAD)
245#
246# PATCHCHECK_TYPE[x] is required and is the type of test to run:
247# build, boot, test.
248#
249# Note, the build test will look for warnings, if a warning occurred
250# in a file that a commit touches, the build will fail.
251#
252# If BUILD_NOCLEAN is set, then make mrproper will not be run on
253# any of the builds, just like all other TEST_TYPE tests. But
254# what makes patchcheck different from the other tests, is if
255# BUILD_NOCLEAN is not set, only the first and last patch run
256# make mrproper. This helps speed up the test.
257#
258# Example:
259# TEST_TYPE[1] = patchcheck
260# CHECKOUT[1] = mybranch
261# PATCHCHECK_TYPE[1] = boot
262# PATCHCHECK_START[1] = 747e94ae3d1b4c9bf5380e569f614eb9040b79e7
263# PATCHCHEKC_END[1] = b8b2663bd7c9da04ac804659b9f617c199d0252c
264#
265#
266# For TEST_TYPE[x] = bisect
267#
268# You can specify a git bisect if the BUILD_DIR is a git repository.
269# The MIN_CONFIG will be used for all builds of the bisect. The build type
270# used for bisecting is oldconfig.
271#
272# BISECT_TYPE[x] is the type of test to perform:
273# build - bad fails to build
274# boot - bad builds but fails to boot
275# test - bad boots but fails a test
276#
277# BISECT_GOOD[x] is the commit (SHA1) to label as good
278# BISECT_BAD[x] is the commit to label as bad
279#
280# The above three options are required for a bisect operation.
281#
282# BISECT_REPLAY[x] = /path/to/replay/file (optional, default undefined)
283#
284# If an operation failed in the bisect that was not expected to
285# fail. Then the test ends. The state of the BUILD_DIR will be
286# left off at where the failur occurred. You can examine the
287# reason for the failure, and perhaps even find a git commit
288# that would work to continue with. You can run:
289#
290# git bisect log > /path/to/replay/file
291#
292# and if BISECT_REPLAY[x] is set, the test will run git bisect replay
293# before continuing with the bisect.
294#
295# BISECT_START[x] = commit (optional, default undefined)
296#
297# As with BISECT_REPLAY[x], if the test failed on a commit that
298# just happen to have a bad commit in the middle of the bisect,
299# and you need to skip it. If BISECT_START[x] is defined, it
300# will checkout that commit before continuing with the bisect.
301#
302# Note, BISECT_REPLAY[x] is executed before BISECT_START[x].
303#
304# BISECT_REVERSE[x] = 1 (optional, default 0)
305#
306# In those strange instances where it was broken forever
307# and you are trying to find where it started to work!
308# Set BISECT_GOOD[x] to the commit that was last known to fail
309# Set BISECT_BAD[x] to the commit that is known where it started
310# to work. With BISECT_REVERSE[x] = 1, The test will consider
311# failures as good, and success as bad.
312#
313# BISECT_CHECK[x] = 1 (optional, default 0)
314#
315# Just to be sure the good is good and bad is bad, setting
316# BISECT_CHECK[x] to 1 will start the bisect by first checking
317# out BISECT_BAD[x] and makes sure it fails, then it will check
318# out BISECT_GOOD[x] and makes sure it succeeds before starting
319# the bisect (it works for BISECT_REVERSE[x] too).
320#
321# You can limit the test to just check BISECT_GOOD[x] or
322# BISECT_BAD[x] with BISECT_CHECK[x] = good or
323# BISECT_CHECK[x] = bad, respectively.
324#
325# Example:
326# TEST_TYPE[1] = bisect
327# BISECT_GOOD[1] = v2.6.36
328# BISECT_BAD[1] = b5153163ed580e00c67bdfecb02b2e3843817b3e
329# BISECT_TYPE[1] = build
330# MIN_CONFIG[1] = /home/test/config-bisect