xref: /linux/tools/testing/ktest/sample.conf (revision 9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e)
1a75fececSSteven Rostedt#
2a57419b3SSteven Rostedt# Config file for ktest.pl
3a75fececSSteven Rostedt#
46dd3791dSSteven Rostedt (VMware)# Place your customized version of this, in the working directory that
56dd3791dSSteven Rostedt (VMware)# ktest.pl is run from. By default, ktest.pl will look for a file
66dd3791dSSteven Rostedt (VMware)# called "ktest.conf", but you can name it anything you like and specify
76dd3791dSSteven Rostedt (VMware)# the name of your config file as the first argument of ktest.pl.
8edbd0edeSScott Wood#
9a75fececSSteven Rostedt# Note, all paths must be absolute
10a75fececSSteven Rostedt#
11a75fececSSteven Rostedt
12a57419b3SSteven Rostedt# Options set in the beginning of the file are considered to be
13afbac6c5SMasanari Iida# default options. These options can be overridden by test specific
14a57419b3SSteven Rostedt# options, with the following exceptions:
15a75fececSSteven Rostedt#
16a75fececSSteven Rostedt#  LOG_FILE
17a75fececSSteven Rostedt#  CLEAR_LOG
18a75fececSSteven Rostedt#  POWEROFF_ON_SUCCESS
19a75fececSSteven Rostedt#  REBOOT_ON_SUCCESS
20a75fececSSteven Rostedt#
21a57419b3SSteven Rostedt# Test specific options are set after the label:
22a57419b3SSteven Rostedt#
23a57419b3SSteven Rostedt# TEST_START
24a57419b3SSteven Rostedt#
25a57419b3SSteven Rostedt# The options after a TEST_START label are specific to that test.
26a57419b3SSteven Rostedt# Each TEST_START label will set up a new test. If you want to
27a57419b3SSteven Rostedt# perform a test more than once, you can add the ITERATE label
28a57419b3SSteven Rostedt# to it followed by the number of times you want that test
29a57419b3SSteven Rostedt# to iterate. If the ITERATE is left off, the test will only
30a57419b3SSteven Rostedt# be performed once.
31a57419b3SSteven Rostedt#
32a57419b3SSteven Rostedt# TEST_START ITERATE 10
33a57419b3SSteven Rostedt#
34a57419b3SSteven Rostedt# You can skip a test by adding SKIP (before or after the ITERATE
35a57419b3SSteven Rostedt# and number)
36a57419b3SSteven Rostedt#
37a57419b3SSteven Rostedt# TEST_START SKIP
38a57419b3SSteven Rostedt#
39a57419b3SSteven Rostedt# TEST_START SKIP ITERATE 10
40a57419b3SSteven Rostedt#
41a57419b3SSteven Rostedt# TEST_START ITERATE 10 SKIP
42a57419b3SSteven Rostedt#
43a57419b3SSteven Rostedt# The SKIP label causes the options and the test itself to be ignored.
44a57419b3SSteven Rostedt# This is useful to set up several different tests in one config file, and
45a57419b3SSteven Rostedt# only enabling the ones you want to use for a current test run.
46a57419b3SSteven Rostedt#
47a57419b3SSteven Rostedt# You can add default options anywhere in the file as well
48a57419b3SSteven Rostedt# with the DEFAULTS tag. This allows you to have default options
49a57419b3SSteven Rostedt# after the test options to keep the test options at the top
50a57419b3SSteven Rostedt# of the file. You can even place the DEFAULTS tag between
51a57419b3SSteven Rostedt# test cases (but not in the middle of a single test case)
52a57419b3SSteven Rostedt#
53a57419b3SSteven Rostedt# TEST_START
54a57419b3SSteven Rostedt# MIN_CONFIG = /home/test/config-test1
55a57419b3SSteven Rostedt#
56a57419b3SSteven Rostedt# DEFAULTS
57a57419b3SSteven Rostedt# MIN_CONFIG = /home/test/config-default
58a57419b3SSteven Rostedt#
59a57419b3SSteven Rostedt# TEST_START ITERATE 10
60a57419b3SSteven Rostedt#
61a57419b3SSteven Rostedt# The above will run the first test with MIN_CONFIG set to
62a57419b3SSteven Rostedt# /home/test/config-test-1. Then 10 tests will be executed
63a57419b3SSteven Rostedt# with MIN_CONFIG with /home/test/config-default.
64a57419b3SSteven Rostedt#
65a57419b3SSteven Rostedt# You can also disable defaults with the SKIP option
66a57419b3SSteven Rostedt#
67a57419b3SSteven Rostedt# DEFAULTS SKIP
68a57419b3SSteven Rostedt# MIN_CONFIG = /home/test/config-use-sometimes
69a57419b3SSteven Rostedt#
70a57419b3SSteven Rostedt# DEFAULTS
71a57419b3SSteven Rostedt# MIN_CONFIG = /home/test/config-most-times
72a57419b3SSteven Rostedt#
73a57419b3SSteven Rostedt# The above will ignore the first MIN_CONFIG. If you want to
74a57419b3SSteven Rostedt# use the first MIN_CONFIG, remove the SKIP from the first
75a57419b3SSteven Rostedt# DEFAULTS tag and add it to the second. Be careful, options
76a57419b3SSteven Rostedt# may only be declared once per test or default. If you have
77a57419b3SSteven Rostedt# the same option name under the same test or as default
78a57419b3SSteven Rostedt# ktest will fail to execute, and no tests will run.
79a57419b3SSteven Rostedt#
803d1cc414SSteven Rostedt# DEFAULTS OVERRIDE
813d1cc414SSteven Rostedt#
823d1cc414SSteven Rostedt# Options defined in the DEFAULTS section can not be duplicated
833d1cc414SSteven Rostedt# even if they are defined in two different DEFAULT sections.
843d1cc414SSteven Rostedt# This is done to catch mistakes where an option is added but
853d1cc414SSteven Rostedt# the previous option was forgotten about and not commented.
863d1cc414SSteven Rostedt#
873d1cc414SSteven Rostedt# The OVERRIDE keyword can be added to a section to allow this
883d1cc414SSteven Rostedt# section to override other DEFAULT sections values that have
893d1cc414SSteven Rostedt# been defined previously. It will only override options that
903d1cc414SSteven Rostedt# have been defined before its use. Options defined later
913d1cc414SSteven Rostedt# in a non override section will still error. The same option
923d1cc414SSteven Rostedt# can not be defined in the same section even if that section
933d1cc414SSteven Rostedt# is marked OVERRIDE.
943d1cc414SSteven Rostedt#
95ab7a3f52SSteven Rostedt#
96ab7a3f52SSteven Rostedt#
9745d73a5dSSteven Rostedt# Both TEST_START and DEFAULTS sections can also have the IF keyword
9845d73a5dSSteven Rostedt# The value after the IF must evaluate into a 0 or non 0 positive
9945d73a5dSSteven Rostedt# integer, and can use the config variables (explained below).
10045d73a5dSSteven Rostedt#
10145d73a5dSSteven Rostedt# DEFAULTS IF ${IS_X86_32}
10245d73a5dSSteven Rostedt#
10345d73a5dSSteven Rostedt# The above will process the DEFAULTS section if the config
10445d73a5dSSteven Rostedt# variable IS_X86_32 evaluates to a non zero positive integer
10545d73a5dSSteven Rostedt# otherwise if it evaluates to zero, it will act the same
10645d73a5dSSteven Rostedt# as if the SKIP keyword was used.
10745d73a5dSSteven Rostedt#
10845d73a5dSSteven Rostedt# The ELSE keyword can be used directly after a section with
10945d73a5dSSteven Rostedt# a IF statement.
11045d73a5dSSteven Rostedt#
11145d73a5dSSteven Rostedt# TEST_START IF ${RUN_NET_TESTS}
11245d73a5dSSteven Rostedt# BUILD_TYPE = useconfig:${CONFIG_DIR}/config-network
11345d73a5dSSteven Rostedt#
11445d73a5dSSteven Rostedt# ELSE
11545d73a5dSSteven Rostedt#
11645d73a5dSSteven Rostedt# BUILD_TYPE = useconfig:${CONFIG_DIR}/config-normal
11745d73a5dSSteven Rostedt#
11845d73a5dSSteven Rostedt#
11945d73a5dSSteven Rostedt# The ELSE keyword can also contain an IF statement to allow multiple
12045d73a5dSSteven Rostedt# if then else sections. But all the sections must be either
12145d73a5dSSteven Rostedt# DEFAULT or TEST_START, they can not be a mixture.
12245d73a5dSSteven Rostedt#
12345d73a5dSSteven Rostedt# TEST_START IF ${RUN_NET_TESTS}
12445d73a5dSSteven Rostedt# BUILD_TYPE = useconfig:${CONFIG_DIR}/config-network
12545d73a5dSSteven Rostedt#
12645d73a5dSSteven Rostedt# ELSE IF ${RUN_DISK_TESTS}
12745d73a5dSSteven Rostedt# BUILD_TYPE = useconfig:${CONFIG_DIR}/config-tests
12845d73a5dSSteven Rostedt#
12945d73a5dSSteven Rostedt# ELSE IF ${RUN_CPU_TESTS}
13045d73a5dSSteven Rostedt# BUILD_TYPE = useconfig:${CONFIG_DIR}/config-cpu
13145d73a5dSSteven Rostedt#
13245d73a5dSSteven Rostedt# ELSE
13345d73a5dSSteven Rostedt# BUILD_TYPE = useconfig:${CONFIG_DIR}/config-network
13445d73a5dSSteven Rostedt#
135ab7a3f52SSteven Rostedt# The if statement may also have comparisons that will and for
136ab7a3f52SSteven Rostedt# == and !=, strings may be used for both sides.
137ab7a3f52SSteven Rostedt#
138ab7a3f52SSteven Rostedt# BOX_TYPE := x86_32
139ab7a3f52SSteven Rostedt#
140ab7a3f52SSteven Rostedt# DEFAULTS IF ${BOX_TYPE} == x86_32
141ab7a3f52SSteven Rostedt# BUILD_TYPE = useconfig:${CONFIG_DIR}/config-32
142ab7a3f52SSteven Rostedt# ELSE
143ab7a3f52SSteven Rostedt# BUILD_TYPE = useconfig:${CONFIG_DIR}/config-64
144ab7a3f52SSteven Rostedt#
1459900b5dcSSteven Rostedt# The DEFINED keyword can be used by the IF statements too.
1469900b5dcSSteven Rostedt# It returns true if the given config variable or option has been defined
1479900b5dcSSteven Rostedt# or false otherwise.
1489900b5dcSSteven Rostedt#
1499900b5dcSSteven Rostedt#
1509900b5dcSSteven Rostedt# DEFAULTS IF DEFINED USE_CC
1519900b5dcSSteven Rostedt# CC := ${USE_CC}
1529900b5dcSSteven Rostedt# ELSE
1539900b5dcSSteven Rostedt# CC := gcc
1549900b5dcSSteven Rostedt#
1559900b5dcSSteven Rostedt#
1569900b5dcSSteven Rostedt# As well as NOT DEFINED.
1579900b5dcSSteven Rostedt#
1589900b5dcSSteven Rostedt# DEFAULTS IF NOT DEFINED MAKE_CMD
1599900b5dcSSteven Rostedt# MAKE_CMD := make ARCH=x86
1609900b5dcSSteven Rostedt#
1619900b5dcSSteven Rostedt#
1628d735212SSteven Rostedt# And/or ops (&&,||) may also be used to make complex conditionals.
1638d735212SSteven Rostedt#
1648d735212SSteven Rostedt# TEST_START IF (DEFINED ALL_TESTS || ${MYTEST} == boottest) && ${MACHINE} == gandalf
1658d735212SSteven Rostedt#
16611c38b75SJesper Juhl# Notice the use of parentheses. Without any parentheses the above would be
1678d735212SSteven Rostedt# processed the same as:
1688d735212SSteven Rostedt#
1698d735212SSteven Rostedt# TEST_START IF DEFINED ALL_TESTS || (${MYTEST} == boottest && ${MACHINE} == gandalf)
1708d735212SSteven Rostedt#
1718d735212SSteven Rostedt#
1722ed3b161SSteven Rostedt#
1732ed3b161SSteven Rostedt# INCLUDE file
1742ed3b161SSteven Rostedt#
1752ed3b161SSteven Rostedt# The INCLUDE keyword may be used in DEFAULT sections. This will
1762ed3b161SSteven Rostedt# read another config file and process that file as well. The included
1772ed3b161SSteven Rostedt# file can include other files, add new test cases or default
1782ed3b161SSteven Rostedt# statements. Config variables will be passed to these files and changes
1792ed3b161SSteven Rostedt# to config variables will be seen by top level config files. Including
1802ed3b161SSteven Rostedt# a file is processed just like the contents of the file was cut and pasted
1812ed3b161SSteven Rostedt# into the top level file, except, that include files that end with
1822ed3b161SSteven Rostedt# TEST_START sections will have that section ended at the end of
1832ed3b161SSteven Rostedt# the include file. That is, an included file is included followed
1842ed3b161SSteven Rostedt# by another DEFAULT keyword.
1852ed3b161SSteven Rostedt#
1862ed3b161SSteven Rostedt# Unlike other files referenced in this config, the file path does not need
1872ed3b161SSteven Rostedt# to be absolute. If the file does not start with '/', then the directory
1882ed3b161SSteven Rostedt# that the current config file was located in is used. If no config by the
1892ed3b161SSteven Rostedt# given name is found there, then the current directory is searched.
1902ed3b161SSteven Rostedt#
1912ed3b161SSteven Rostedt# INCLUDE myfile
1922ed3b161SSteven Rostedt# DEFAULT
1932ed3b161SSteven Rostedt#
1942ed3b161SSteven Rostedt# is the same as:
1952ed3b161SSteven Rostedt#
1962ed3b161SSteven Rostedt# INCLUDE myfile
1972ed3b161SSteven Rostedt#
1982ed3b161SSteven Rostedt# Note, if the include file does not contain a full path, the file is
1992ed3b161SSteven Rostedt# searched first by the location of the original include file, and then
2002ed3b161SSteven Rostedt# by the location that ktest.pl was executed in.
2012ed3b161SSteven Rostedt#
202a75fececSSteven Rostedt
20377d942ceSSteven Rostedt#### Config variables ####
20477d942ceSSteven Rostedt#
20577d942ceSSteven Rostedt# This config file can also contain "config variables".
20677d942ceSSteven Rostedt# These are assigned with ":=" instead of the ktest option
207afbac6c5SMasanari Iida# assignment "=".
20877d942ceSSteven Rostedt#
20977d942ceSSteven Rostedt# The difference between ktest options and config variables
21077d942ceSSteven Rostedt# is that config variables can be used multiple times,
21177d942ceSSteven Rostedt# where each instance will override the previous instance.
21277d942ceSSteven Rostedt# And that they only live at time of processing this config.
21377d942ceSSteven Rostedt#
21477d942ceSSteven Rostedt# The advantage to config variables are that they can be used
21577d942ceSSteven Rostedt# by any option or any other config variables to define thing
21677d942ceSSteven Rostedt# that you may use over and over again in the options.
21777d942ceSSteven Rostedt#
21877d942ceSSteven Rostedt# For example:
21977d942ceSSteven Rostedt#
22077d942ceSSteven Rostedt# USER      := root
22177d942ceSSteven Rostedt# TARGET    := mybox
22277d942ceSSteven Rostedt# TEST_CASE := ssh ${USER}@${TARGET} /path/to/my/test
22377d942ceSSteven Rostedt#
22477d942ceSSteven Rostedt# TEST_START
22577d942ceSSteven Rostedt# MIN_CONFIG = config1
22677d942ceSSteven Rostedt# TEST = ${TEST_CASE}
22777d942ceSSteven Rostedt#
22877d942ceSSteven Rostedt# TEST_START
22977d942ceSSteven Rostedt# MIN_CONFIG = config2
23077d942ceSSteven Rostedt# TEST = ${TEST_CASE}
23177d942ceSSteven Rostedt#
23277d942ceSSteven Rostedt# TEST_CASE := ssh ${USER}@${TARGET} /path/to/my/test2
23377d942ceSSteven Rostedt#
23477d942ceSSteven Rostedt# TEST_START
23577d942ceSSteven Rostedt# MIN_CONFIG = config1
23677d942ceSSteven Rostedt# TEST = ${TEST_CASE}
23777d942ceSSteven Rostedt#
23877d942ceSSteven Rostedt# TEST_START
23977d942ceSSteven Rostedt# MIN_CONFIG = config2
24077d942ceSSteven Rostedt# TEST = ${TEST_CASE}
24177d942ceSSteven Rostedt#
24277d942ceSSteven Rostedt# TEST_DIR := /home/me/test
24377d942ceSSteven Rostedt#
24477d942ceSSteven Rostedt# BUILD_DIR = ${TEST_DIR}/linux.git
24577d942ceSSteven Rostedt# OUTPUT_DIR = ${TEST_DIR}/test
24677d942ceSSteven Rostedt#
24777d942ceSSteven Rostedt# Note, the config variables are evaluated immediately, thus
24877d942ceSSteven Rostedt# updating TARGET after TEST_CASE has been assigned does nothing
24977d942ceSSteven Rostedt# to TEST_CASE.
25077d942ceSSteven Rostedt#
25177d942ceSSteven Rostedt# As shown in the example, to evaluate a config variable, you
25277d942ceSSteven Rostedt# use the ${X} convention. Simple $X will not work.
25377d942ceSSteven Rostedt#
25477d942ceSSteven Rostedt# If the config variable does not exist, the ${X} will not
25577d942ceSSteven Rostedt# be evaluated. Thus:
25677d942ceSSteven Rostedt#
25777d942ceSSteven Rostedt# MAKE_CMD = PATH=/mypath:${PATH} make
25877d942ceSSteven Rostedt#
25977d942ceSSteven Rostedt# If PATH is not a config variable, then the ${PATH} in
26077d942ceSSteven Rostedt# the MAKE_CMD option will be evaluated by the shell when
26177d942ceSSteven Rostedt# the MAKE_CMD option is passed into shell processing.
26288a51b4fSSteven Rostedt (Google)#
26388a51b4fSSteven Rostedt (Google)# Shell commands can also be inserted with the ${shell <command>}
26488a51b4fSSteven Rostedt (Google)# expression. Note, this is case sensitive, thus ${SHELL <command>}
26588a51b4fSSteven Rostedt (Google)# will not work.
26688a51b4fSSteven Rostedt (Google)#
26788a51b4fSSteven Rostedt (Google)# HOSTNAME := ${shell hostname}
26888a51b4fSSteven Rostedt (Google)# DEFAULTS IF "${HOSTNAME}" == "frodo"
26988a51b4fSSteven Rostedt (Google)#
270a57419b3SSteven Rostedt
2712a62512bSSteven Rostedt#### Using options in other options ####
2722a62512bSSteven Rostedt#
2732a62512bSSteven Rostedt# Options that are defined in the config file may also be used
274afbac6c5SMasanari Iida# by other options. All options are evaluated at time of
2752a62512bSSteven Rostedt# use (except that config variables are evaluated at config
2762a62512bSSteven Rostedt# processing time).
2772a62512bSSteven Rostedt#
2782a62512bSSteven Rostedt# If an ktest option is used within another option, instead of
2792a62512bSSteven Rostedt# typing it again in that option you can simply use the option
2802a62512bSSteven Rostedt# just like you can config variables.
2812a62512bSSteven Rostedt#
2822a62512bSSteven Rostedt# MACHINE = mybox
2832a62512bSSteven Rostedt#
2842a62512bSSteven Rostedt# TEST = ssh root@${MACHINE} /path/to/test
2852a62512bSSteven Rostedt#
2862a62512bSSteven Rostedt# The option will be used per test case. Thus:
2872a62512bSSteven Rostedt#
2882a62512bSSteven Rostedt# TEST_TYPE = test
2892a62512bSSteven Rostedt# TEST = ssh root@{MACHINE}
2902a62512bSSteven Rostedt#
2912a62512bSSteven Rostedt# TEST_START
2922a62512bSSteven Rostedt# MACHINE = box1
2932a62512bSSteven Rostedt#
2942a62512bSSteven Rostedt# TEST_START
2952a62512bSSteven Rostedt# MACHINE = box2
2962a62512bSSteven Rostedt#
2972a62512bSSteven Rostedt# For both test cases, MACHINE will be evaluated at the time
2982a62512bSSteven Rostedt# of the test case. The first test will run ssh root@box1
2992a62512bSSteven Rostedt# and the second will run ssh root@box2.
3002a62512bSSteven Rostedt
301a57419b3SSteven Rostedt#### Mandatory Default Options ####
302a57419b3SSteven Rostedt
303a57419b3SSteven Rostedt# These options must be in the default section, although most
304a57419b3SSteven Rostedt# may be overridden by test options.
305a75fececSSteven Rostedt
306a75fececSSteven Rostedt# The machine hostname that you will test
307a75fececSSteven Rostedt#MACHINE = target
308a75fececSSteven Rostedt
309a75fececSSteven Rostedt# The box is expected to have ssh on normal bootup, provide the user
310a75fececSSteven Rostedt#  (most likely root, since you need privileged operations)
311a75fececSSteven Rostedt#SSH_USER = root
312a75fececSSteven Rostedt
313a75fececSSteven Rostedt# The directory that contains the Linux source code
314a75fececSSteven Rostedt#BUILD_DIR = /home/test/linux.git
315a75fececSSteven Rostedt
316a75fececSSteven Rostedt# The directory that the objects will be built
317a75fececSSteven Rostedt# (can not be same as BUILD_DIR)
318a75fececSSteven Rostedt#OUTPUT_DIR = /home/test/build/target
319a75fececSSteven Rostedt
320a75fececSSteven Rostedt# The location of the compiled file to copy to the target
321a75fececSSteven Rostedt# (relative to OUTPUT_DIR)
322a75fececSSteven Rostedt#BUILD_TARGET = arch/x86/boot/bzImage
323a75fececSSteven Rostedt
324a75fececSSteven Rostedt# The place to put your image on the test machine
325a75fececSSteven Rostedt#TARGET_IMAGE = /boot/vmlinuz-test
326a75fececSSteven Rostedt
327a75fececSSteven Rostedt# A script or command to reboot the box
328a57419b3SSteven Rostedt#
329a75fececSSteven Rostedt# Here is a digital loggers power switch example
330a75fececSSteven Rostedt#POWER_CYCLE = wget --no-proxy -O /dev/null -q  --auth-no-challenge 'http://admin:admin@power/outlet?5=CCL'
331a57419b3SSteven Rostedt#
332a75fececSSteven Rostedt# Here is an example to reboot a virtual box on the current host
333a75fececSSteven Rostedt# with the name "Guest".
334a57419b3SSteven Rostedt#POWER_CYCLE = virsh destroy Guest; sleep 5; virsh start Guest
335a75fececSSteven Rostedt
336a75fececSSteven Rostedt# The script or command that reads the console
337a57419b3SSteven Rostedt#
338a75fececSSteven Rostedt#  If you use ttywatch server, something like the following would work.
339a75fececSSteven Rostedt#CONSOLE = nc -d localhost 3001
340a57419b3SSteven Rostedt#
341a75fececSSteven Rostedt# For a virtual machine with guest name "Guest".
342a57419b3SSteven Rostedt#CONSOLE =  virsh console Guest
343a75fececSSteven Rostedt
344298a0d1dSSteven Rostedt (Red Hat)# Signal to send to kill console.
345298a0d1dSSteven Rostedt (Red Hat)# ktest.pl will create a child process to monitor the console.
346298a0d1dSSteven Rostedt (Red Hat)# When the console is finished, ktest will kill the child process
347298a0d1dSSteven Rostedt (Red Hat)# with this signal.
348298a0d1dSSteven Rostedt (Red Hat)# (default INT)
349298a0d1dSSteven Rostedt (Red Hat)#CLOSE_CONSOLE_SIGNAL = HUP
350298a0d1dSSteven Rostedt (Red Hat)
351a75fececSSteven Rostedt# Required version ending to differentiate the test
352a75fececSSteven Rostedt# from other linux builds on the system.
353a75fececSSteven Rostedt#LOCALVERSION = -test
354a75fececSSteven Rostedt
355a15ba913SSteven Rostedt# For REBOOT_TYPE = grub2, you must specify where the grub.cfg
356a15ba913SSteven Rostedt# file is. This is the file that is searched to find the menu
357a15ba913SSteven Rostedt# option to boot to with GRUB_REBOOT
358a15ba913SSteven Rostedt#GRUB_FILE = /boot/grub2/grub.cfg
359a15ba913SSteven Rostedt
360d20f6b41SMasayoshi Mizuma# The tool for REBOOT_TYPE = grub2 or grub2bls to set the next reboot kernel
361a15ba913SSteven Rostedt# to boot into (one shot mode).
362a15ba913SSteven Rostedt# (default grub2_reboot)
363a15ba913SSteven Rostedt#GRUB_REBOOT = grub2_reboot
364a15ba913SSteven Rostedt
365a75fececSSteven Rostedt# The grub title name for the test kernel to boot
366d20f6b41SMasayoshi Mizuma# (Only mandatory if REBOOT_TYPE = grub or grub2 or grub2bls)
367a75fececSSteven Rostedt#
368a57419b3SSteven Rostedt# Note, ktest.pl will not update the grub menu.lst, you need to
369a57419b3SSteven Rostedt# manually add an option for the test. ktest.pl will search
370a57419b3SSteven Rostedt# the grub menu.lst for this option to find what kernel to
371a57419b3SSteven Rostedt# reboot into.
372a57419b3SSteven Rostedt#
373a75fececSSteven Rostedt# For example, if in the /boot/grub/menu.lst the test kernel title has:
374a75fececSSteven Rostedt# title Test Kernel
375a57419b3SSteven Rostedt# kernel vmlinuz-test
376a15ba913SSteven Rostedt#
377a15ba913SSteven Rostedt# For grub2, a search of top level "menuentry"s are done. No
378a15ba913SSteven Rostedt# submenu is searched. The menu is found by searching for the
379a15ba913SSteven Rostedt# contents of GRUB_MENU in the line that starts with "menuentry".
380a15ba913SSteven Rostedt# You may want to include the quotes around the option. For example:
381a15ba913SSteven Rostedt# for: menuentry 'Test Kernel'
382a15ba913SSteven Rostedt# do a: GRUB_MENU = 'Test Kernel'
383a15ba913SSteven Rostedt# For customizing, add your entry in /etc/grub.d/40_custom.
384a15ba913SSteven Rostedt#
385d20f6b41SMasayoshi Mizuma# For grub2bls, a search of "title"s are done. The menu is found
386d20f6b41SMasayoshi Mizuma# by searching for the contents of GRUB_MENU in the line that starts
387d20f6b41SMasayoshi Mizuma# with "title".
388d20f6b41SMasayoshi Mizuma#
389a75fececSSteven Rostedt#GRUB_MENU = Test Kernel
390a75fececSSteven Rostedt
3917786954cSSteven Rostedt# For REBOOT_TYPE = syslinux, the name of the syslinux executable
3927786954cSSteven Rostedt# (on the target) to use to set up the next reboot to boot the
3937786954cSSteven Rostedt# test kernel.
3947786954cSSteven Rostedt# (default extlinux)
3957786954cSSteven Rostedt#SYSLINUX = syslinux
3967786954cSSteven Rostedt
3977786954cSSteven Rostedt# For REBOOT_TYPE = syslinux, the path that is passed to to the
3987786954cSSteven Rostedt# syslinux command where syslinux is installed.
3997786954cSSteven Rostedt# (default /boot/extlinux)
4007786954cSSteven Rostedt#SYSLINUX_PATH = /boot/syslinux
4017786954cSSteven Rostedt
4027786954cSSteven Rostedt# For REBOOT_TYPE = syslinux, the syslinux label that references the
4037786954cSSteven Rostedt# test kernel in the syslinux config file.
4047786954cSSteven Rostedt# (default undefined)
4057786954cSSteven Rostedt#SYSLINUX_LABEL = "test-kernel"
4067786954cSSteven Rostedt
407a75fececSSteven Rostedt# A script to reboot the target into the test kernel
40896f6a0dfSSteven Rostedt# This and SWITCH_TO_TEST are about the same, except
40996f6a0dfSSteven Rostedt# SWITCH_TO_TEST is run even for REBOOT_TYPE = grub.
41096f6a0dfSSteven Rostedt# This may be left undefined.
41196f6a0dfSSteven Rostedt# (default undefined)
412a75fececSSteven Rostedt#REBOOT_SCRIPT =
413a75fececSSteven Rostedt
414a75fececSSteven Rostedt#### Optional Config Options (all have defaults) ####
415a75fececSSteven Rostedt
416eaaa1e28STim Tianyang Chen# Email options for receiving notifications. Users must setup
417eaaa1e28STim Tianyang Chen# the specified mailer prior to using this feature.
418eaaa1e28STim Tianyang Chen#
419eaaa1e28STim Tianyang Chen# (default undefined)
420eaaa1e28STim Tianyang Chen#MAILTO =
421eaaa1e28STim Tianyang Chen#
422eaaa1e28STim Tianyang Chen# Supported mailers: sendmail, mail, mailx
423eaaa1e28STim Tianyang Chen# (default sendmail)
424eaaa1e28STim Tianyang Chen#MAILER = sendmail
425eaaa1e28STim Tianyang Chen#
426be1546b8SSteven Rostedt (VMware)# The executable to run
427be1546b8SSteven Rostedt (VMware)# (default: for sendmail "/usr/sbin/sendmail", otherwise equals ${MAILER})
428be1546b8SSteven Rostedt (VMware)#MAIL_EXEC = /usr/sbin/sendmail
429be1546b8SSteven Rostedt (VMware)#
430c2d84ddbSSteven Rostedt (VMware)# The command used to send mail, which uses the above options
431c2d84ddbSSteven Rostedt (VMware)# can be modified. By default if the mailer is "sendmail" then
432c2d84ddbSSteven Rostedt (VMware)#  MAIL_COMMAND = echo \'Subject: $SUBJECT\n\n$MESSAGE\' | $MAIL_PATH/$MAILER -t $MAILTO
433c2d84ddbSSteven Rostedt (VMware)# For mail or mailx:
434c2d84ddbSSteven Rostedt (VMware)#  MAIL_COMMAND = "$MAIL_PATH/$MAILER -s \'$SUBJECT\' $MAILTO <<< \'$MESSAGE\'
435c2d84ddbSSteven Rostedt (VMware)# ktest.pl will do the substitution for MAIL_PATH, MAILER, MAILTO at the time
436c2d84ddbSSteven Rostedt (VMware)#    it sends the mail if "$FOO" format is used. If "${FOO}" format is used,
437c2d84ddbSSteven Rostedt (VMware)#    then the substitutions will occur at the time the config file is read.
438c2d84ddbSSteven Rostedt (VMware)#    But note, MAIL_PATH and MAILER require being set by the config file if
439c2d84ddbSSteven Rostedt (VMware)#     ${MAIL_PATH} or ${MAILER} are used, but not if $MAIL_PATH or $MAILER are.
440c2d84ddbSSteven Rostedt (VMware)#MAIL_COMMAND = echo \'Subject: $SUBJECT\n\n$MESSAGE\' | $MAIL_PATH/$MAILER -t $MAILTO
441c2d84ddbSSteven Rostedt (VMware)#
442eaaa1e28STim Tianyang Chen# Errors are defined as those would terminate the script
443eaaa1e28STim Tianyang Chen# (default 1)
444eaaa1e28STim Tianyang Chen#EMAIL_ON_ERROR = 1
445eaaa1e28STim Tianyang Chen# (default 1)
446eaaa1e28STim Tianyang Chen#EMAIL_WHEN_FINISHED = 1
447eaaa1e28STim Tianyang Chen# (default 0)
448eaaa1e28STim Tianyang Chen#EMAIL_WHEN_STARTED = 1
449eaaa1e28STim Tianyang Chen#
450eaaa1e28STim Tianyang Chen# Users can cancel the test by Ctrl^C
451eaaa1e28STim Tianyang Chen# (default 0)
452eaaa1e28STim Tianyang Chen#EMAIL_WHEN_CANCELED = 1
453f9869002SSteven Rostedt (VMware)#
454f9869002SSteven Rostedt (VMware)# If a test ends with an error and EMAIL_ON_ERROR is set as well
455f9869002SSteven Rostedt (VMware)# as a LOG_FILE is defined, then the log of the failing test will
456f9869002SSteven Rostedt (VMware)# be included in the email that is sent.
457f9869002SSteven Rostedt (VMware)# It is possible that the log may be very large, in which case,
458f9869002SSteven Rostedt (VMware)# only the last amount of the log should be sent. To limit how
459f9869002SSteven Rostedt (VMware)# much of the log is sent, set MAIL_MAX_SIZE. This will be the
460f9869002SSteven Rostedt (VMware)# size in bytes of the last portion of the log of the failed
461f9869002SSteven Rostedt (VMware)# test file. That is, if this is set to 100000, then only the
462f9869002SSteven Rostedt (VMware)# last 100 thousand bytes of the log file will be included in
463f9869002SSteven Rostedt (VMware)# the email.
464f9869002SSteven Rostedt (VMware)# (default undef)
465f9869002SSteven Rostedt (VMware)#MAIL_MAX_SIZE = 1000000
466eaaa1e28STim Tianyang Chen
467a57419b3SSteven Rostedt# Start a test setup. If you leave this off, all options
468a57419b3SSteven Rostedt# will be default and the test will run once.
469a57419b3SSteven Rostedt# This is a label and not really an option (it takes no value).
470a57419b3SSteven Rostedt# You can append ITERATE and a number after it to iterate the
471a57419b3SSteven Rostedt# test a number of times, or SKIP to ignore this test.
472a57419b3SSteven Rostedt#
473a57419b3SSteven Rostedt#TEST_START
474a57419b3SSteven Rostedt#TEST_START ITERATE 5
475a57419b3SSteven Rostedt#TEST_START SKIP
476a75fececSSteven Rostedt
477dc895688SSteven Rostedt# Have the following options as default again. Used after tests
478dc895688SSteven Rostedt# have already been defined by TEST_START. Optionally, you can
479dc895688SSteven Rostedt# just define all default options before the first TEST_START
480dc895688SSteven Rostedt# and you do not need this option.
481dc895688SSteven Rostedt#
482dc895688SSteven Rostedt# This is a label and not really an option (it takes no value).
483dc895688SSteven Rostedt# You can append SKIP to this label and the options within this
484dc895688SSteven Rostedt# section will be ignored.
485dc895688SSteven Rostedt#
486dc895688SSteven Rostedt# DEFAULTS
487dc895688SSteven Rostedt# DEFAULTS SKIP
488dc895688SSteven Rostedt
489921ed4c7SSteven Rostedt# If you want to execute some command before the first test runs
490921ed4c7SSteven Rostedt# you can set this option. Note, it can be set as a default option
491921ed4c7SSteven Rostedt# or an option in the first test case. All other test cases will
492921ed4c7SSteven Rostedt# ignore it. If both the default and first test have this option
493921ed4c7SSteven Rostedt# set, then the first test will take precedence.
494921ed4c7SSteven Rostedt#
495921ed4c7SSteven Rostedt# default (undefined)
496921ed4c7SSteven Rostedt#PRE_KTEST = ${SSH} ~/set_up_test
497921ed4c7SSteven Rostedt
498921ed4c7SSteven Rostedt# If you want to execute some command after all the tests have
499921ed4c7SSteven Rostedt# completed, you can set this option. Note, it can be set as a
500921ed4c7SSteven Rostedt# default or any test case can override it. If multiple test cases
501921ed4c7SSteven Rostedt# set this option, then the last test case that set it will take
502921ed4c7SSteven Rostedt# precedence
503921ed4c7SSteven Rostedt#
504921ed4c7SSteven Rostedt# default (undefined)
505921ed4c7SSteven Rostedt#POST_KTEST = ${SSH} ~/dismantle_test
506921ed4c7SSteven Rostedt
507d20f6b41SMasayoshi Mizuma# If you want to remove the kernel entry in Boot Loader Specification (BLS)
508d20f6b41SMasayoshi Mizuma# environment, use kernel-install command.
509d20f6b41SMasayoshi Mizuma# Here's the example:
510d20f6b41SMasayoshi Mizuma#POST_KTEST = ssh root@Test "/usr/bin/kernel-install remove $KERNEL_VERSION"
511d20f6b41SMasayoshi Mizuma
512a75fececSSteven Rostedt# The default test type (default test)
513a75fececSSteven Rostedt# The test types may be:
514a75fececSSteven Rostedt#   build   - only build the kernel, do nothing else
515cd8e368fSSteven Rostedt#   install - build and install, but do nothing else (does not reboot)
516cd8e368fSSteven Rostedt#   boot    - build, install, and boot the kernel
517a75fececSSteven Rostedt#   test    - build, boot and if TEST is set, run the test script
518a57419b3SSteven Rostedt#          (If TEST is not set, it defaults back to boot)
519a75fececSSteven Rostedt#   bisect - Perform a bisect on the kernel (see BISECT_TYPE below)
520a75fececSSteven Rostedt#   patchcheck - Do a test on a series of commits in git (see PATCHCHECK below)
521a75fececSSteven Rostedt#TEST_TYPE = test
522a75fececSSteven Rostedt
523a57419b3SSteven Rostedt# Test to run if there is a successful boot and TEST_TYPE is test.
524a57419b3SSteven Rostedt# Must exit with 0 on success and non zero on error
525a57419b3SSteven Rostedt# default (undefined)
526a57419b3SSteven Rostedt#TEST = ssh user@machine /root/run_test
527a57419b3SSteven Rostedt
528a57419b3SSteven Rostedt# The build type is any make config type or special command
529791dc9d6SSteven Rostedt (VMware)#  (default oldconfig)
530a75fececSSteven Rostedt#   nobuild - skip the clean and build step
531a57419b3SSteven Rostedt#   useconfig:/path/to/config - use the given config and run
532a57419b3SSteven Rostedt#              oldconfig on it.
533a57419b3SSteven Rostedt# This option is ignored if TEST_TYPE is patchcheck or bisect
534a75fececSSteven Rostedt#BUILD_TYPE = randconfig
535a75fececSSteven Rostedt
536a75fececSSteven Rostedt# The make command (default make)
537a75fececSSteven Rostedt# If you are building a 32bit x86 on a 64 bit host
538a75fececSSteven Rostedt#MAKE_CMD = CC=i386-gcc AS=i386-as make ARCH=i386
539a75fececSSteven Rostedt
540dc895688SSteven Rostedt# Any build options for the make of the kernel (not for other makes, like configs)
541dc895688SSteven Rostedt# (default "")
542dc895688SSteven Rostedt#BUILD_OPTIONS = -j20
543dc895688SSteven Rostedt
544e5c2ec11SSteven Rostedt# If you need to do some special handling before installing
545e5c2ec11SSteven Rostedt# you can add a script with this option.
546e5c2ec11SSteven Rostedt# The environment variable KERNEL_VERSION will be set to the
547e5c2ec11SSteven Rostedt# kernel version that is used.
548e5c2ec11SSteven Rostedt#
549e5c2ec11SSteven Rostedt# default (undefined)
550e5c2ec11SSteven Rostedt#PRE_INSTALL = ssh user@target rm -rf '/lib/modules/*-test*'
551e5c2ec11SSteven Rostedt
5528b37ca8cSSteven Rostedt# If you need an initrd, you can add a script or code here to install
5538b37ca8cSSteven Rostedt# it. The environment variable KERNEL_VERSION will be set to the
554a57419b3SSteven Rostedt# kernel version that is used. Remember to add the initrd line
555a57419b3SSteven Rostedt# to your grub menu.lst file.
556a57419b3SSteven Rostedt#
557a57419b3SSteven Rostedt# Here's a couple of examples to use:
5588b37ca8cSSteven Rostedt#POST_INSTALL = ssh user@target /sbin/mkinitrd --allow-missing -f /boot/initramfs-test.img $KERNEL_VERSION
559a57419b3SSteven Rostedt#
560a57419b3SSteven Rostedt# or on some systems:
561a57419b3SSteven Rostedt#POST_INSTALL = ssh user@target /sbin/dracut -f /boot/initramfs-test.img $KERNEL_VERSION
5628b37ca8cSSteven Rostedt
563d20f6b41SMasayoshi Mizuma# If you want to add the kernel entry in Boot Loader Specification (BLS)
564d20f6b41SMasayoshi Mizuma# environment, use kernel-install command.
565d20f6b41SMasayoshi Mizuma# Here's the example:
566d20f6b41SMasayoshi Mizuma#POST_INSTALL = ssh root@Test "/usr/bin/kernel-install add $KERNEL_VERSION /boot/vmlinuz-$KERNEL_VERSION"
567d20f6b41SMasayoshi Mizuma
568e0a8742eSSteven Rostedt# If for some reason you just want to boot the kernel and you do not
569e0a8742eSSteven Rostedt# want the test to install anything new. For example, you may just want
570e0a8742eSSteven Rostedt# to boot test the same kernel over and over and do not want to go through
571e0a8742eSSteven Rostedt# the hassle of installing anything, you can set this option to 1
572e0a8742eSSteven Rostedt# (default 0)
573e0a8742eSSteven Rostedt#NO_INSTALL = 1
574e0a8742eSSteven Rostedt
575921ed4c7SSteven Rostedt# If there is a command that you want to run before the individual test
576921ed4c7SSteven Rostedt# case executes, then you can set this option
577921ed4c7SSteven Rostedt#
578921ed4c7SSteven Rostedt# default (undefined)
579921ed4c7SSteven Rostedt#PRE_TEST = ${SSH} reboot_to_special_kernel
580921ed4c7SSteven Rostedt
581d53cdda3SSteven Rostedt (VMware)# To kill the entire test if PRE_TEST is defined but fails set this
582d53cdda3SSteven Rostedt (VMware)# to 1.
583d53cdda3SSteven Rostedt (VMware)# (default 0)
584d53cdda3SSteven Rostedt (VMware)#PRE_TEST_DIE = 1
585d53cdda3SSteven Rostedt (VMware)
586921ed4c7SSteven Rostedt# If there is a command you want to run after the individual test case
587921ed4c7SSteven Rostedt# completes, then you can set this option.
588921ed4c7SSteven Rostedt#
589921ed4c7SSteven Rostedt# default (undefined)
590921ed4c7SSteven Rostedt#POST_TEST = cd ${BUILD_DIR}; git reset --hard
591921ed4c7SSteven Rostedt
5920bd6c1a3SSteven Rostedt# If there is a script that you require to run before the build is done
5930bd6c1a3SSteven Rostedt# you can specify it with PRE_BUILD.
5940bd6c1a3SSteven Rostedt#
5950bd6c1a3SSteven Rostedt# One example may be if you must add a temporary patch to the build to
5960bd6c1a3SSteven Rostedt# fix a unrelated bug to perform a patchcheck test. This will apply the
5970bd6c1a3SSteven Rostedt# patch before each build that is made. Use the POST_BUILD to do a git reset --hard
5980bd6c1a3SSteven Rostedt# to remove the patch.
5990bd6c1a3SSteven Rostedt#
6000bd6c1a3SSteven Rostedt# (default undef)
6010bd6c1a3SSteven Rostedt#PRE_BUILD = cd ${BUILD_DIR} && patch -p1 < /tmp/temp.patch
6020bd6c1a3SSteven Rostedt
6030bd6c1a3SSteven Rostedt# To specify if the test should fail if the PRE_BUILD fails,
6040bd6c1a3SSteven Rostedt# PRE_BUILD_DIE needs to be set to 1. Otherwise the PRE_BUILD
6050bd6c1a3SSteven Rostedt# result is ignored.
6060bd6c1a3SSteven Rostedt# (default 0)
6070bd6c1a3SSteven Rostedt# PRE_BUILD_DIE = 1
6080bd6c1a3SSteven Rostedt
6090bd6c1a3SSteven Rostedt# If there is a script that should run after the build is done
6100bd6c1a3SSteven Rostedt# you can specify it with POST_BUILD.
6110bd6c1a3SSteven Rostedt#
6120bd6c1a3SSteven Rostedt# As the example in PRE_BUILD, POST_BUILD can be used to reset modifications
6130bd6c1a3SSteven Rostedt# made by the PRE_BUILD.
6140bd6c1a3SSteven Rostedt#
6150bd6c1a3SSteven Rostedt# (default undef)
6160bd6c1a3SSteven Rostedt#POST_BUILD = cd ${BUILD_DIR} && git reset --hard
6170bd6c1a3SSteven Rostedt
6180bd6c1a3SSteven Rostedt# To specify if the test should fail if the POST_BUILD fails,
6190bd6c1a3SSteven Rostedt# POST_BUILD_DIE needs to be set to 1. Otherwise the POST_BUILD
6200bd6c1a3SSteven Rostedt# result is ignored.
6210bd6c1a3SSteven Rostedt# (default 0)
6220bd6c1a3SSteven Rostedt#POST_BUILD_DIE = 1
6230bd6c1a3SSteven Rostedt
624a75fececSSteven Rostedt# Way to reboot the box to the test kernel.
6257786954cSSteven Rostedt# Only valid options so far are "grub", "grub2", "syslinux" and "script"
626a75fececSSteven Rostedt# (default grub)
627a75fececSSteven Rostedt# If you specify grub, it will assume grub version 1
628a75fececSSteven Rostedt# and will search in /boot/grub/menu.lst for the title $GRUB_MENU
629a75fececSSteven Rostedt# and select that target to reboot to the kernel. If this is not
630a75fececSSteven Rostedt# your setup, then specify "script" and have a command or script
631a75fececSSteven Rostedt# specified in REBOOT_SCRIPT to boot to the target.
632a57419b3SSteven Rostedt#
633a15ba913SSteven Rostedt# For REBOOT_TYPE = grub2, you must define both GRUB_MENU and
634a15ba913SSteven Rostedt# GRUB_FILE.
635a15ba913SSteven Rostedt#
636d20f6b41SMasayoshi Mizuma# For REBOOT_TYPE = grub2bls, you must define GRUB_MENU.
637d20f6b41SMasayoshi Mizuma#
6387786954cSSteven Rostedt# For REBOOT_TYPE = syslinux, you must define SYSLINUX_LABEL, and
6397786954cSSteven Rostedt# perhaps modify SYSLINUX (default extlinux) and SYSLINUX_PATH
6407786954cSSteven Rostedt# (default /boot/extlinux)
6417786954cSSteven Rostedt#
642a57419b3SSteven Rostedt# The entry in /boot/grub/menu.lst must be entered in manually.
643a57419b3SSteven Rostedt# The test will not modify that file.
644a75fececSSteven Rostedt#REBOOT_TYPE = grub
645a75fececSSteven Rostedt
646bc7c5803SSteven Rostedt# If you are using a machine that doesn't boot with grub, and
647bc7c5803SSteven Rostedt# perhaps gets its kernel from a remote server (tftp), then
648bc7c5803SSteven Rostedt# you can use this option to update the target image with the
649bc7c5803SSteven Rostedt# test image.
650bc7c5803SSteven Rostedt#
651bc7c5803SSteven Rostedt# You could also do the same with POST_INSTALL, but the difference
652bc7c5803SSteven Rostedt# between that option and this option is that POST_INSTALL runs
653bc7c5803SSteven Rostedt# after the install, where this one runs just before a reboot.
654bc7c5803SSteven Rostedt# (default undefined)
655bc7c5803SSteven Rostedt#SWITCH_TO_TEST = cp ${OUTPUT_DIR}/${BUILD_TARGET} ${TARGET_IMAGE}
656bc7c5803SSteven Rostedt
657bc7c5803SSteven Rostedt# If you are using a machine that doesn't boot with grub, and
658bc7c5803SSteven Rostedt# perhaps gets its kernel from a remote server (tftp), then
659bc7c5803SSteven Rostedt# you can use this option to update the target image with the
660bc7c5803SSteven Rostedt# the known good image to reboot safely back into.
661bc7c5803SSteven Rostedt#
662bc7c5803SSteven Rostedt# This option holds a command that will execute before needing
663bc7c5803SSteven Rostedt# to reboot to a good known image.
664bc7c5803SSteven Rostedt# (default undefined)
665bc7c5803SSteven Rostedt#SWITCH_TO_GOOD = ssh ${SSH_USER}/${MACHINE} cp good_image ${TARGET_IMAGE}
666bc7c5803SSteven Rostedt
667a75fececSSteven Rostedt# The min config that is needed to build for the machine
668a57419b3SSteven Rostedt# A nice way to create this is with the following:
669a75fececSSteven Rostedt#
670a57419b3SSteven Rostedt#   $ ssh target
671a57419b3SSteven Rostedt#   $ lsmod > mymods
672a57419b3SSteven Rostedt#   $ scp mymods host:/tmp
673a57419b3SSteven Rostedt#   $ exit
674a57419b3SSteven Rostedt#   $ cd linux.git
675a57419b3SSteven Rostedt#   $ rm .config
676a57419b3SSteven Rostedt#   $ make LSMOD=mymods localyesconfig
677a57419b3SSteven Rostedt#   $ grep '^CONFIG' .config > /home/test/config-min
678a57419b3SSteven Rostedt#
679a57419b3SSteven Rostedt# If you want even less configs:
680a57419b3SSteven Rostedt#
681a57419b3SSteven Rostedt#   log in directly to target (do not ssh)
682a57419b3SSteven Rostedt#
683a57419b3SSteven Rostedt#   $ su
684a57419b3SSteven Rostedt#   # lsmod | cut -d' ' -f1 | xargs rmmod
685a57419b3SSteven Rostedt#
686a57419b3SSteven Rostedt#   repeat the above several times
687a57419b3SSteven Rostedt#
688a57419b3SSteven Rostedt#   # lsmod > mymods
689a57419b3SSteven Rostedt#   # reboot
690a57419b3SSteven Rostedt#
691a57419b3SSteven Rostedt# May need to reboot to get your network back to copy the mymods
692a57419b3SSteven Rostedt# to the host, and then remove the previous .config and run the
693a57419b3SSteven Rostedt# localyesconfig again. The CONFIG_MIN generated like this will
694a57419b3SSteven Rostedt# not guarantee network activity to the box so the TEST_TYPE of
695a57419b3SSteven Rostedt# test may fail.
696a57419b3SSteven Rostedt#
697a57419b3SSteven Rostedt# You might also want to set:
698a75fececSSteven Rostedt#   CONFIG_CMDLINE="<your options here>"
699a75fececSSteven Rostedt#  randconfig may set the above and override your real command
700a75fececSSteven Rostedt#  line options.
701a57419b3SSteven Rostedt# (default undefined)
702a75fececSSteven Rostedt#MIN_CONFIG = /home/test/config-min
703a75fececSSteven Rostedt
704a75fececSSteven Rostedt# Sometimes there's options that just break the boot and
705a75fececSSteven Rostedt# you do not care about. Here are a few:
706a75fececSSteven Rostedt#   # CONFIG_STAGING is not set
707a75fececSSteven Rostedt#  Staging drivers are horrible, and can break the build.
708a75fececSSteven Rostedt#   # CONFIG_SCSI_DEBUG is not set
709a75fececSSteven Rostedt#  SCSI_DEBUG may change your root partition
710a75fececSSteven Rostedt#   # CONFIG_KGDB_SERIAL_CONSOLE is not set
711a75fececSSteven Rostedt#  KGDB may cause oops waiting for a connection that's not there.
712a75fececSSteven Rostedt# This option points to the file containing config options that will be prepended
713a75fececSSteven Rostedt# to the MIN_CONFIG (or be the MIN_CONFIG if it is not set)
714a57419b3SSteven Rostedt#
715a57419b3SSteven Rostedt# Note, config options in MIN_CONFIG will override these options.
716a57419b3SSteven Rostedt#
717a57419b3SSteven Rostedt# (default undefined)
718a75fececSSteven Rostedt#ADD_CONFIG = /home/test/config-broken
719a75fececSSteven Rostedt
720dc895688SSteven Rostedt# The location on the host where to write temp files
72148920630SSteven Rostedt# (default /tmp/ktest/${MACHINE})
72248920630SSteven Rostedt#TMP_DIR = /tmp/ktest/${MACHINE}
723dc895688SSteven Rostedt
724dc895688SSteven Rostedt# Optional log file to write the status (recommended)
725dc895688SSteven Rostedt#  Note, this is a DEFAULT section only option.
726dc895688SSteven Rostedt# (default undefined)
727dc895688SSteven Rostedt#LOG_FILE = /home/test/logfiles/target.log
728dc895688SSteven Rostedt
729dc895688SSteven Rostedt# Remove old logfile if it exists before starting all tests.
730dc895688SSteven Rostedt#  Note, this is a DEFAULT section only option.
731dc895688SSteven Rostedt# (default 0)
732dc895688SSteven Rostedt#CLEAR_LOG = 0
733dc895688SSteven Rostedt
734dc895688SSteven Rostedt# Line to define a successful boot up in console output.
735dc895688SSteven Rostedt# This is what the line contains, not the entire line. If you need
736afbac6c5SMasanari Iida# the entire line to match, then use regular expression syntax like:
737dc895688SSteven Rostedt#  (do not add any quotes around it)
738dc895688SSteven Rostedt#
739dc895688SSteven Rostedt#  SUCCESS_LINE = ^MyBox Login:$
740dc895688SSteven Rostedt#
741dc895688SSteven Rostedt# (default "login:")
742dc895688SSteven Rostedt#SUCCESS_LINE = login:
743dc895688SSteven Rostedt
7442b803365SSteven Rostedt# To speed up between reboots, defining a line that the
7452b803365SSteven Rostedt# default kernel produces that represents that the default
7462b803365SSteven Rostedt# kernel has successfully booted and can be used to pass
7472b803365SSteven Rostedt# a new test kernel to it. Otherwise ktest.pl will wait till
7482b803365SSteven Rostedt# SLEEP_TIME to continue.
7492b803365SSteven Rostedt# (default undefined)
7502b803365SSteven Rostedt#REBOOT_SUCCESS_LINE = login:
7512b803365SSteven Rostedt
7521c8a617aSSteven Rostedt# In case the console constantly fills the screen, having
7531c8a617aSSteven Rostedt# a specified time to stop the test after success is recommended.
7541c8a617aSSteven Rostedt# (in seconds)
7551c8a617aSSteven Rostedt# (default 10)
7561c8a617aSSteven Rostedt#STOP_AFTER_SUCCESS = 10
7571c8a617aSSteven Rostedt
7581c8a617aSSteven Rostedt# In case the console constantly fills the screen, having
7591c8a617aSSteven Rostedt# a specified time to stop the test after failure is recommended.
7601c8a617aSSteven Rostedt# (in seconds)
7611c8a617aSSteven Rostedt# (default 60)
7621c8a617aSSteven Rostedt#STOP_AFTER_FAILURE = 60
7631c8a617aSSteven Rostedt
7642d01b26aSSteven Rostedt# In case the console constantly fills the screen, having
7652d01b26aSSteven Rostedt# a specified time to stop the test if it never succeeds nor fails
7662d01b26aSSteven Rostedt# is recommended.
7672d01b26aSSteven Rostedt# Note: this is ignored if a success or failure is detected.
7682d01b26aSSteven Rostedt# (in seconds)
7692d01b26aSSteven Rostedt# (default 600, -1 is to never stop)
7702d01b26aSSteven Rostedt#STOP_TEST_AFTER = 600
7712d01b26aSSteven Rostedt
772dc895688SSteven Rostedt# Stop testing if a build fails. If set, the script will end if
773dc895688SSteven Rostedt# a failure is detected, otherwise it will save off the .config,
774dc895688SSteven Rostedt# dmesg and bootlog in a directory called
775dc895688SSteven Rostedt# MACHINE-TEST_TYPE_BUILD_TYPE-fail-yyyymmddhhmmss
776dc895688SSteven Rostedt# if the STORE_FAILURES directory is set.
777dc895688SSteven Rostedt# (default 1)
778dc895688SSteven Rostedt# Note, even if this is set to zero, there are some errors that still
779dc895688SSteven Rostedt# stop the tests.
780dc895688SSteven Rostedt#DIE_ON_FAILURE = 1
781dc895688SSteven Rostedt
782dc895688SSteven Rostedt# Directory to store failure directories on failure. If this is not
783dc895688SSteven Rostedt# set, DIE_ON_FAILURE=0 will not save off the .config, dmesg and
784dc895688SSteven Rostedt# bootlog. This option is ignored if DIE_ON_FAILURE is not set.
785dc895688SSteven Rostedt# (default undefined)
786dc895688SSteven Rostedt#STORE_FAILURES = /home/test/failures
787dc895688SSteven Rostedt
788de5b6e3bSRabin Vincent# Directory to store success directories on success. If this is not
789de5b6e3bSRabin Vincent# set, the .config, dmesg and bootlog will not be saved if a
790de5b6e3bSRabin Vincent# test succeeds.
791de5b6e3bSRabin Vincent# (default undefined)
792de5b6e3bSRabin Vincent#STORE_SUCCESSES = /home/test/successes
793de5b6e3bSRabin Vincent
794dc895688SSteven Rostedt# Build without doing a make mrproper, or removing .config
795dc895688SSteven Rostedt# (default 0)
796dc895688SSteven Rostedt#BUILD_NOCLEAN = 0
797dc895688SSteven Rostedt
798dc895688SSteven Rostedt# As the test reads the console, after it hits the SUCCESS_LINE
799dc895688SSteven Rostedt# the time it waits for the monitor to settle down between reads
800dc895688SSteven Rostedt# can usually be lowered.
801dc895688SSteven Rostedt# (in seconds) (default 1)
802dc895688SSteven Rostedt#BOOTED_TIMEOUT = 1
803dc895688SSteven Rostedt
804dc895688SSteven Rostedt# The timeout in seconds when we consider the box hung after
805dc895688SSteven Rostedt# the console stop producing output. Be sure to leave enough
806dc895688SSteven Rostedt# time here to get pass a reboot. Some machines may not produce
807dc895688SSteven Rostedt# any console output for a long time during a reboot. You do
808dc895688SSteven Rostedt# not want the test to fail just because the system was in
809dc895688SSteven Rostedt# the process of rebooting to the test kernel.
810dc895688SSteven Rostedt# (default 120)
811dc895688SSteven Rostedt#TIMEOUT = 120
812dc895688SSteven Rostedt
8133e1d3678SSteven Rostedt (VMware)# The timeout in seconds when to test if the box can be rebooted
8143e1d3678SSteven Rostedt (VMware)# or not. Before issuing the reboot command, a ssh connection
8153e1d3678SSteven Rostedt (VMware)# is attempted to see if the target machine is still active.
8163e1d3678SSteven Rostedt (VMware)# If the target does not connect within this timeout, a power cycle
8173e1d3678SSteven Rostedt (VMware)# is issued instead of a reboot.
8183e1d3678SSteven Rostedt (VMware)# CONNECT_TIMEOUT = 25
8193e1d3678SSteven Rostedt (VMware)
820*4e7d2a8fSSteven Rostedt# The timeout in seconds for how long to wait for any running command
821*4e7d2a8fSSteven Rostedt# to timeout. If not defined, it will let it go indefinitely.
822*4e7d2a8fSSteven Rostedt# (default undefined)
823*4e7d2a8fSSteven Rostedt#RUN_TIMEOUT = 600
824*4e7d2a8fSSteven Rostedt
825dc895688SSteven Rostedt# In between tests, a reboot of the box may occur, and this
826dc895688SSteven Rostedt# is the time to wait for the console after it stops producing
827dc895688SSteven Rostedt# output. Some machines may not produce a large lag on reboot
828dc895688SSteven Rostedt# so this should accommodate it.
829dc895688SSteven Rostedt# The difference between this and TIMEOUT, is that TIMEOUT happens
830dc895688SSteven Rostedt# when rebooting to the test kernel. This sleep time happens
831dc895688SSteven Rostedt# after a test has completed and we are about to start running
832dc895688SSteven Rostedt# another test. If a reboot to the reliable kernel happens,
833dc895688SSteven Rostedt# we wait SLEEP_TIME for the console to stop producing output
834dc895688SSteven Rostedt# before starting the next test.
8352b803365SSteven Rostedt#
8362b803365SSteven Rostedt# You can speed up reboot times even more by setting REBOOT_SUCCESS_LINE.
837dc895688SSteven Rostedt# (default 60)
838dc895688SSteven Rostedt#SLEEP_TIME = 60
839dc895688SSteven Rostedt
840dc895688SSteven Rostedt# The time in between bisects to sleep (in seconds)
841dc895688SSteven Rostedt# (default 60)
842dc895688SSteven Rostedt#BISECT_SLEEP_TIME = 60
843dc895688SSteven Rostedt
844407b95b7SSteven Rostedt# The max wait time (in seconds) for waiting for the console to finish.
845407b95b7SSteven Rostedt# If for some reason, the console is outputting content without
846407b95b7SSteven Rostedt# ever finishing, this will cause ktest to get stuck. This
847407b95b7SSteven Rostedt# option is the max time ktest will wait for the monitor (console)
848407b95b7SSteven Rostedt# to settle down before continuing.
849407b95b7SSteven Rostedt# (default 1800)
850407b95b7SSteven Rostedt#MAX_MONITOR_WAIT
851407b95b7SSteven Rostedt
85227d934b2SSteven Rostedt# The time in between patch checks to sleep (in seconds)
85327d934b2SSteven Rostedt# (default 60)
85427d934b2SSteven Rostedt#PATCHCHECK_SLEEP_TIME = 60
85527d934b2SSteven Rostedt
856dc895688SSteven Rostedt# Reboot the target box on error (default 0)
857dc895688SSteven Rostedt#REBOOT_ON_ERROR = 0
858dc895688SSteven Rostedt
859dc895688SSteven Rostedt# Power off the target on error (ignored if REBOOT_ON_ERROR is set)
860dc895688SSteven Rostedt#  Note, this is a DEFAULT section only option.
861dc895688SSteven Rostedt# (default 0)
862dc895688SSteven Rostedt#POWEROFF_ON_ERROR = 0
863dc895688SSteven Rostedt
864dc895688SSteven Rostedt# Power off the target after all tests have completed successfully
865dc895688SSteven Rostedt#  Note, this is a DEFAULT section only option.
866dc895688SSteven Rostedt# (default 0)
867dc895688SSteven Rostedt#POWEROFF_ON_SUCCESS = 0
868dc895688SSteven Rostedt
869dc895688SSteven Rostedt# Reboot the target after all test completed successfully (default 1)
870dc895688SSteven Rostedt# (ignored if POWEROFF_ON_SUCCESS is set)
871dc895688SSteven Rostedt#REBOOT_ON_SUCCESS = 1
872dc895688SSteven Rostedt
873afbac6c5SMasanari Iida# In case there are issues with rebooting, you can specify this
874dc895688SSteven Rostedt# to always powercycle after this amount of time after calling
875dc895688SSteven Rostedt# reboot.
876dc895688SSteven Rostedt# Note, POWERCYCLE_AFTER_REBOOT = 0 does NOT disable it. It just
877dc895688SSteven Rostedt# makes it powercycle immediately after rebooting. Do not define
878dc895688SSteven Rostedt# it if you do not want it.
879dc895688SSteven Rostedt# (default undefined)
880dc895688SSteven Rostedt#POWERCYCLE_AFTER_REBOOT = 5
881dc895688SSteven Rostedt
882afbac6c5SMasanari Iida# In case there's issues with halting, you can specify this
883dc895688SSteven Rostedt# to always poweroff after this amount of time after calling
884dc895688SSteven Rostedt# halt.
885dc895688SSteven Rostedt# Note, POWEROFF_AFTER_HALT = 0 does NOT disable it. It just
886dc895688SSteven Rostedt# makes it poweroff immediately after halting. Do not define
887dc895688SSteven Rostedt# it if you do not want it.
888dc895688SSteven Rostedt# (default undefined)
889dc895688SSteven Rostedt#POWEROFF_AFTER_HALT = 20
890dc895688SSteven Rostedt
891dc895688SSteven Rostedt# A script or command to power off the box (default undefined)
892dc895688SSteven Rostedt# Needed for POWEROFF_ON_ERROR and SUCCESS
893dc895688SSteven Rostedt#
894dc895688SSteven Rostedt# Example for digital loggers power switch:
895dc895688SSteven Rostedt#POWER_OFF = wget --no-proxy -O /dev/null -q  --auth-no-challenge 'http://admin:admin@power/outlet?5=OFF'
896dc895688SSteven Rostedt#
897dc895688SSteven Rostedt# Example for a virtual guest call "Guest".
898dc895688SSteven Rostedt#POWER_OFF = virsh destroy Guest
899dc895688SSteven Rostedt
9004283b169SSteven Rostedt (Red Hat)# To have the build fail on "new" warnings, create a file that
9014283b169SSteven Rostedt (Red Hat)# contains a list of all known warnings (they must match exactly
9024283b169SSteven Rostedt (Red Hat)# to the line with 'warning:', 'error:' or 'Error:'. If the option
9034283b169SSteven Rostedt (Red Hat)# WARNINGS_FILE is set, then that file will be read, and if the
9044283b169SSteven Rostedt (Red Hat)# build detects a warning, it will examine this file and if the
9054283b169SSteven Rostedt (Red Hat)# warning does not exist in it, it will fail the build.
9064283b169SSteven Rostedt (Red Hat)#
9074283b169SSteven Rostedt (Red Hat)# Note, if this option is defined to a file that does not exist
9084283b169SSteven Rostedt (Red Hat)# then any warning will fail the build.
9094283b169SSteven Rostedt (Red Hat)#  (see make_warnings_file below)
9104283b169SSteven Rostedt (Red Hat)#
9114283b169SSteven Rostedt (Red Hat)# (optional, default undefined)
9124283b169SSteven Rostedt (Red Hat)#WARNINGS_FILE = ${OUTPUT_DIR}/warnings_file
9134283b169SSteven Rostedt (Red Hat)
914d1fbd7e6SSteven Rostedt# The way to execute a command on the target
915d1fbd7e6SSteven Rostedt# (default ssh $SSH_USER@$MACHINE $SSH_COMMAND";)
916d1fbd7e6SSteven Rostedt# The variables SSH_USER, MACHINE and SSH_COMMAND are defined
917d1fbd7e6SSteven Rostedt#SSH_EXEC = ssh $SSH_USER@$MACHINE $SSH_COMMAND";
918d1fbd7e6SSteven Rostedt
91902ad2617SSteven Rostedt# The way to copy a file to the target (install and modules)
920d1fbd7e6SSteven Rostedt# (default scp $SRC_FILE $SSH_USER@$MACHINE:$DST_FILE)
92102ad2617SSteven Rostedt# The variables SSH_USER, MACHINE are defined by the config
92202ad2617SSteven Rostedt# SRC_FILE and DST_FILE are ktest internal variables and
92302ad2617SSteven Rostedt# should only have '$' and not the '${}' notation.
92402ad2617SSteven Rostedt# (default scp $SRC_FILE ${SSH_USER}@${MACHINE}:$DST_FILE)
92502ad2617SSteven Rostedt#SCP_TO_TARGET = echo skip scp for $SRC_FILE $DST_FILE
92602ad2617SSteven Rostedt
92702ad2617SSteven Rostedt# If install needs to be different than modules, then this
92802ad2617SSteven Rostedt# option will override the SCP_TO_TARGET for installation.
92902ad2617SSteven Rostedt# (default ${SCP_TO_TARGET} )
93002ad2617SSteven Rostedt#SCP_TO_TARGET_INSTALL = scp $SRC_FILE tftp@tftpserver:$DST_FILE
931d1fbd7e6SSteven Rostedt
932d1fbd7e6SSteven Rostedt# The nice way to reboot the target
933d1fbd7e6SSteven Rostedt# (default ssh $SSH_USER@$MACHINE reboot)
934d1fbd7e6SSteven Rostedt# The variables SSH_USER and MACHINE are defined.
935d1fbd7e6SSteven Rostedt#REBOOT = ssh $SSH_USER@$MACHINE reboot
936d1fbd7e6SSteven Rostedt
93737e16773SMasayoshi Mizuma# The return code of REBOOT
93837e16773SMasayoshi Mizuma# (default 255)
93937e16773SMasayoshi Mizuma#REBOOT_RETURN_CODE = 255
94037e16773SMasayoshi Mizuma
941f1a5b962SSteven Rostedt# The way triple faults are detected is by testing the kernel
942f1a5b962SSteven Rostedt# banner. If the kernel banner for the kernel we are testing is
943f1a5b962SSteven Rostedt# found, and then later a kernel banner for another kernel version
944f1a5b962SSteven Rostedt# is found, it is considered that we encountered a triple fault,
945f1a5b962SSteven Rostedt# and there is no panic or callback, but simply a reboot.
946f1a5b962SSteven Rostedt# To disable this (because it did a false positive) set the following
947f1a5b962SSteven Rostedt# to 0.
948f1a5b962SSteven Rostedt# (default 1)
949f1a5b962SSteven Rostedt#DETECT_TRIPLE_FAULT = 0
950f1a5b962SSteven Rostedt
9519cc9e091SSteven Rostedt# All options in the config file should be either used by ktest
9529cc9e091SSteven Rostedt# or could be used within a value of another option. If an option
9539cc9e091SSteven Rostedt# in the config file is not used, ktest will warn about it and ask
9549cc9e091SSteven Rostedt# if you want to continue.
9559cc9e091SSteven Rostedt#
9569cc9e091SSteven Rostedt# If you don't care if there are non-used options, enable this
9579cc9e091SSteven Rostedt# option. Be careful though, a non-used option is usually a sign
9589cc9e091SSteven Rostedt# of an option name being typed incorrectly.
9599cc9e091SSteven Rostedt# (default 0)
9609cc9e091SSteven Rostedt#IGNORE_UNUSED = 1
9619cc9e091SSteven Rostedt
962be405f95SSteven Rostedt# When testing a kernel that happens to have WARNINGs, and call
963be405f95SSteven Rostedt# traces, ktest.pl will detect these and fail a boot or test run
964be405f95SSteven Rostedt# due to warnings. By setting this option, ktest will ignore
965be405f95SSteven Rostedt# call traces, and will not fail a test if the kernel produces
966be405f95SSteven Rostedt# an oops. Use this option with care.
967be405f95SSteven Rostedt# (default 0)
968be405f95SSteven Rostedt#IGNORE_ERRORS = 1
969be405f95SSteven Rostedt
970a75fececSSteven Rostedt#### Per test run options ####
971a57419b3SSteven Rostedt# The following options are only allowed in TEST_START sections.
972a57419b3SSteven Rostedt# They are ignored in the DEFAULTS sections.
973a75fececSSteven Rostedt#
974a57419b3SSteven Rostedt# All of these are optional and undefined by default, although
975a57419b3SSteven Rostedt#  some of these options are required for TEST_TYPE of patchcheck
976a57419b3SSteven Rostedt#  and bisect.
977a75fececSSteven Rostedt#
978a57419b3SSteven Rostedt#
979a57419b3SSteven Rostedt# CHECKOUT = branch
980a75fececSSteven Rostedt#
981a75fececSSteven Rostedt#  If the BUILD_DIR is a git repository, then you can set this option
982a75fececSSteven Rostedt#  to checkout the given branch before running the TEST. If you
983a75fececSSteven Rostedt#  specify this for the first run, that branch will be used for
984a57419b3SSteven Rostedt#  all preceding tests until a new CHECKOUT is set.
985a75fececSSteven Rostedt#
986a57419b3SSteven Rostedt#
9879064af52SSteven Rostedt# TEST_NAME = name
9889064af52SSteven Rostedt#
9899064af52SSteven Rostedt#  If you want the test to have a name that is displayed in
9909064af52SSteven Rostedt#  the test result banner at the end of the test, then use this
9919064af52SSteven Rostedt#  option. This is useful to search for the RESULT keyword and
9929064af52SSteven Rostedt#  not have to translate a test number to a test in the config.
993a57419b3SSteven Rostedt#
994a57419b3SSteven Rostedt# For TEST_TYPE = patchcheck
995a75fececSSteven Rostedt#
996a75fececSSteven Rostedt#  This expects the BUILD_DIR to be a git repository, and
997a57419b3SSteven Rostedt#  will checkout the PATCHCHECK_START commit.
998a75fececSSteven Rostedt#
999a57419b3SSteven Rostedt#  The option BUILD_TYPE will be ignored.
1000a75fececSSteven Rostedt#
1001a57419b3SSteven Rostedt#  The MIN_CONFIG will be used for all builds of the patchcheck. The build type
1002a57419b3SSteven Rostedt#  used for patchcheck is oldconfig.
1003a75fececSSteven Rostedt#
1004a57419b3SSteven Rostedt#  PATCHCHECK_START is required and is the first patch to
1005a57419b3SSteven Rostedt#   test (the SHA1 of the commit). You may also specify anything
1006afbac6c5SMasanari Iida#   that git checkout allows (branch name, tag, HEAD~3).
1007a57419b3SSteven Rostedt#
1008a57419b3SSteven Rostedt#  PATCHCHECK_END is the last patch to check (default HEAD)
1009a57419b3SSteven Rostedt#
101023a0e161SSteven Rostedt (Red Hat)#  PATCHCHECK_CHERRY if set to non zero, then git cherry will be
101123a0e161SSteven Rostedt (Red Hat)#      performed against PATCHCHECK_START and PATCHCHECK_END. That is
101223a0e161SSteven Rostedt (Red Hat)#
101323a0e161SSteven Rostedt (Red Hat)#      git cherry ${PATCHCHECK_START} ${PATCHCHECK_END}
101423a0e161SSteven Rostedt (Red Hat)#
101523a0e161SSteven Rostedt (Red Hat)#      Then the changes found will be tested.
101623a0e161SSteven Rostedt (Red Hat)#
101723a0e161SSteven Rostedt (Red Hat)#      Note, PATCHCHECK_CHERRY requires PATCHCHECK_END to be defined.
101823a0e161SSteven Rostedt (Red Hat)#      (default 0)
101923a0e161SSteven Rostedt (Red Hat)#
1020a57419b3SSteven Rostedt#  PATCHCHECK_TYPE is required and is the type of test to run:
1021a75fececSSteven Rostedt#      build, boot, test.
1022a75fececSSteven Rostedt#
1023a75fececSSteven Rostedt#   Note, the build test will look for warnings, if a warning occurred
10241990207dSSteven Rostedt#     in a file that a commit touches, the build will fail, unless
10251990207dSSteven Rostedt#     IGNORE_WARNINGS is set for the given commit's sha1
10261990207dSSteven Rostedt#
10271990207dSSteven Rostedt#   IGNORE_WARNINGS can be used to disable the failure of patchcheck
1028afbac6c5SMasanari Iida#     on a particular commit (SHA1). You can add more than one commit
10291990207dSSteven Rostedt#     by adding a list of SHA1s that are space delimited.
1030a75fececSSteven Rostedt#
1031a75fececSSteven Rostedt#   If BUILD_NOCLEAN is set, then make mrproper will not be run on
1032a75fececSSteven Rostedt#   any of the builds, just like all other TEST_TYPE tests. But
1033a75fececSSteven Rostedt#   what makes patchcheck different from the other tests, is if
1034a75fececSSteven Rostedt#   BUILD_NOCLEAN is not set, only the first and last patch run
1035a75fececSSteven Rostedt#   make mrproper. This helps speed up the test.
1036a75fececSSteven Rostedt#
1037a75fececSSteven Rostedt# Example:
1038a57419b3SSteven Rostedt#   TEST_START
1039a57419b3SSteven Rostedt#   TEST_TYPE = patchcheck
1040a57419b3SSteven Rostedt#   CHECKOUT = mybranch
1041a57419b3SSteven Rostedt#   PATCHCHECK_TYPE = boot
1042a57419b3SSteven Rostedt#   PATCHCHECK_START = 747e94ae3d1b4c9bf5380e569f614eb9040b79e7
1043d1fbd7e6SSteven Rostedt#   PATCHCHECK_END = HEAD~2
10441990207dSSteven Rostedt#   IGNORE_WARNINGS = 42f9c6b69b54946ffc0515f57d01dc7f5c0e4712 0c17ca2c7187f431d8ffc79e81addc730f33d128
1045a75fececSSteven Rostedt#
1046a75fececSSteven Rostedt#
1047a57419b3SSteven Rostedt#
1048a57419b3SSteven Rostedt# For TEST_TYPE = bisect
1049a75fececSSteven Rostedt#
1050a75fececSSteven Rostedt#  You can specify a git bisect if the BUILD_DIR is a git repository.
1051a75fececSSteven Rostedt#  The MIN_CONFIG will be used for all builds of the bisect. The build type
1052a75fececSSteven Rostedt#  used for bisecting is oldconfig.
1053a75fececSSteven Rostedt#
1054a57419b3SSteven Rostedt#  The option BUILD_TYPE will be ignored.
1055a57419b3SSteven Rostedt#
1056a57419b3SSteven Rostedt#  BISECT_TYPE is the type of test to perform:
1057a75fececSSteven Rostedt#	build	- bad fails to build
1058a75fececSSteven Rostedt#	boot	- bad builds but fails to boot
1059a75fececSSteven Rostedt#	test	- bad boots but fails a test
1060a75fececSSteven Rostedt#
1061a57419b3SSteven Rostedt# BISECT_GOOD is the commit (SHA1) to label as good (accepts all git good commit types)
1062a57419b3SSteven Rostedt# BISECT_BAD is the commit to label as bad (accepts all git bad commit types)
1063a75fececSSteven Rostedt#
1064a75fececSSteven Rostedt# The above three options are required for a bisect operation.
1065a75fececSSteven Rostedt#
1066a57419b3SSteven Rostedt# BISECT_REPLAY = /path/to/replay/file (optional, default undefined)
1067a75fececSSteven Rostedt#
1068a75fececSSteven Rostedt#   If an operation failed in the bisect that was not expected to
1069a75fececSSteven Rostedt#   fail. Then the test ends. The state of the BUILD_DIR will be
1070a57419b3SSteven Rostedt#   left off at where the failure occurred. You can examine the
1071a75fececSSteven Rostedt#   reason for the failure, and perhaps even find a git commit
1072a75fececSSteven Rostedt#   that would work to continue with. You can run:
1073a75fececSSteven Rostedt#
1074a75fececSSteven Rostedt#   git bisect log > /path/to/replay/file
1075a75fececSSteven Rostedt#
1076a57419b3SSteven Rostedt#   The adding:
1077a75fececSSteven Rostedt#
1078a57419b3SSteven Rostedt#    BISECT_REPLAY= /path/to/replay/file
1079a75fececSSteven Rostedt#
1080a57419b3SSteven Rostedt#   And running the test again. The test will perform the initial
1081a57419b3SSteven Rostedt#    git bisect start, git bisect good, and git bisect bad, and
1082a57419b3SSteven Rostedt#    then it will run git bisect replay on this file, before
1083a57419b3SSteven Rostedt#    continuing with the bisect.
1084a57419b3SSteven Rostedt#
1085a57419b3SSteven Rostedt# BISECT_START = commit (optional, default undefined)
1086a57419b3SSteven Rostedt#
1087a57419b3SSteven Rostedt#   As with BISECT_REPLAY, if the test failed on a commit that
1088a75fececSSteven Rostedt#   just happen to have a bad commit in the middle of the bisect,
1089a57419b3SSteven Rostedt#   and you need to skip it. If BISECT_START is defined, it
1090a57419b3SSteven Rostedt#   will checkout that commit after doing the initial git bisect start,
1091a57419b3SSteven Rostedt#   git bisect good, git bisect bad, and running the git bisect replay
1092a57419b3SSteven Rostedt#   if the BISECT_REPLAY is set.
1093a75fececSSteven Rostedt#
1094c23dca7cSSteven Rostedt# BISECT_SKIP = 1 (optional, default 0)
1095c23dca7cSSteven Rostedt#
1096c23dca7cSSteven Rostedt#   If BISECT_TYPE is set to test but the build fails, ktest will
1097c23dca7cSSteven Rostedt#   simply fail the test and end their. You could use BISECT_REPLAY
1098c23dca7cSSteven Rostedt#   and BISECT_START to resume after you found a new starting point,
1099c23dca7cSSteven Rostedt#   or you could set BISECT_SKIP to 1. If BISECT_SKIP is set to 1,
1100c23dca7cSSteven Rostedt#   when something other than the BISECT_TYPE fails, ktest.pl will
1101c23dca7cSSteven Rostedt#   run "git bisect skip" and try again.
1102c23dca7cSSteven Rostedt#
11033410f6fdSSteven Rostedt# BISECT_FILES = <path> (optional, default undefined)
11043410f6fdSSteven Rostedt#
11053410f6fdSSteven Rostedt#   To just run the git bisect on a specific path, set BISECT_FILES.
11063410f6fdSSteven Rostedt#   For example:
11073410f6fdSSteven Rostedt#
11083410f6fdSSteven Rostedt#     BISECT_FILES = arch/x86 kernel/time
11093410f6fdSSteven Rostedt#
11103410f6fdSSteven Rostedt#   Will run the bisect with "git bisect start -- arch/x86 kernel/time"
11113410f6fdSSteven Rostedt#
1112a57419b3SSteven Rostedt# BISECT_REVERSE = 1 (optional, default 0)
1113a75fececSSteven Rostedt#
1114a75fececSSteven Rostedt#   In those strange instances where it was broken forever
1115a75fececSSteven Rostedt#   and you are trying to find where it started to work!
1116a57419b3SSteven Rostedt#   Set BISECT_GOOD to the commit that was last known to fail
1117a57419b3SSteven Rostedt#   Set BISECT_BAD to the commit that is known to start working.
1118a57419b3SSteven Rostedt#   With BISECT_REVERSE = 1, The test will consider failures as
1119a57419b3SSteven Rostedt#   good, and success as bad.
1120a75fececSSteven Rostedt#
1121c960bb9fSSteven Rostedt# BISECT_MANUAL = 1 (optional, default 0)
1122c960bb9fSSteven Rostedt#
1123c960bb9fSSteven Rostedt#   In case there's a problem with automating the bisect for
1124c960bb9fSSteven Rostedt#   whatever reason. (Can't reboot, want to inspect each iteration)
1125c960bb9fSSteven Rostedt#   Doing a BISECT_MANUAL will have the test wait for you to
1126c960bb9fSSteven Rostedt#   tell it if the test passed or failed after each iteration.
1127afbac6c5SMasanari Iida#   This is basically the same as running git bisect yourself
1128c960bb9fSSteven Rostedt#   but ktest will rebuild and install the kernel for you.
1129c960bb9fSSteven Rostedt#
1130a57419b3SSteven Rostedt# BISECT_CHECK = 1 (optional, default 0)
1131a75fececSSteven Rostedt#
1132a75fececSSteven Rostedt#   Just to be sure the good is good and bad is bad, setting
1133a57419b3SSteven Rostedt#   BISECT_CHECK to 1 will start the bisect by first checking
1134a57419b3SSteven Rostedt#   out BISECT_BAD and makes sure it fails, then it will check
1135a57419b3SSteven Rostedt#   out BISECT_GOOD and makes sure it succeeds before starting
1136a57419b3SSteven Rostedt#   the bisect (it works for BISECT_REVERSE too).
1137a75fececSSteven Rostedt#
1138a57419b3SSteven Rostedt#   You can limit the test to just check BISECT_GOOD or
1139a57419b3SSteven Rostedt#   BISECT_BAD with BISECT_CHECK = good or
1140a57419b3SSteven Rostedt#   BISECT_CHECK = bad, respectively.
1141a75fececSSteven Rostedt#
1142961d9cacSSteven Rostedt (Red Hat)# BISECT_TRIES = 5 (optional, default 1)
1143961d9cacSSteven Rostedt (Red Hat)#
1144961d9cacSSteven Rostedt (Red Hat)#   For those cases that it takes several tries to hit a bug,
1145961d9cacSSteven Rostedt (Red Hat)#   the BISECT_TRIES is useful. It is the number of times the
1146961d9cacSSteven Rostedt (Red Hat)#   test is ran before it says the kernel is good. The first failure
1147961d9cacSSteven Rostedt (Red Hat)#   will stop trying and mark the current SHA1 as bad.
1148961d9cacSSteven Rostedt (Red Hat)#
1149961d9cacSSteven Rostedt (Red Hat)#   Note, as with all race bugs, there's no guarantee that if
1150961d9cacSSteven Rostedt (Red Hat)#   it succeeds, it is really a good bisect. But it helps in case
1151961d9cacSSteven Rostedt (Red Hat)#   the bug is some what reliable.
1152961d9cacSSteven Rostedt (Red Hat)#
1153961d9cacSSteven Rostedt (Red Hat)#   You can set BISECT_TRIES to zero, and all tests will be considered
1154961d9cacSSteven Rostedt (Red Hat)#   good, unless you also set BISECT_MANUAL.
1155961d9cacSSteven Rostedt (Red Hat)#
1156c5dacb88SSteven Rostedt# BISECT_RET_GOOD = 0 (optional, default undefined)
1157c5dacb88SSteven Rostedt#
1158c5dacb88SSteven Rostedt#   In case the specificed test returns something other than just
1159c5dacb88SSteven Rostedt#   0 for good, and non-zero for bad, you can override 0 being
1160c5dacb88SSteven Rostedt#   good by defining BISECT_RET_GOOD.
1161c5dacb88SSteven Rostedt#
1162c5dacb88SSteven Rostedt# BISECT_RET_BAD = 1 (optional, default undefined)
1163c5dacb88SSteven Rostedt#
1164c5dacb88SSteven Rostedt#   In case the specificed test returns something other than just
1165c5dacb88SSteven Rostedt#   0 for good, and non-zero for bad, you can override non-zero being
1166c5dacb88SSteven Rostedt#   bad by defining BISECT_RET_BAD.
1167c5dacb88SSteven Rostedt#
1168c5dacb88SSteven Rostedt# BISECT_RET_ABORT = 255 (optional, default undefined)
1169c5dacb88SSteven Rostedt#
1170c5dacb88SSteven Rostedt#   If you need to abort the bisect if the test discovers something
1171c5dacb88SSteven Rostedt#   that was wrong, you can define BISECT_RET_ABORT to be the error
1172c5dacb88SSteven Rostedt#   code returned by the test in order to abort the bisect.
1173c5dacb88SSteven Rostedt#
1174c5dacb88SSteven Rostedt# BISECT_RET_SKIP = 2 (optional, default undefined)
1175c5dacb88SSteven Rostedt#
1176c5dacb88SSteven Rostedt#   If the test detects that the current commit is neither good
1177c5dacb88SSteven Rostedt#   nor bad, but something else happened (another bug detected)
1178c5dacb88SSteven Rostedt#   you can specify BISECT_RET_SKIP to an error code that the
1179c5dacb88SSteven Rostedt#   test returns when it should skip the current commit.
1180c5dacb88SSteven Rostedt#
1181c5dacb88SSteven Rostedt# BISECT_RET_DEFAULT = good (optional, default undefined)
1182c5dacb88SSteven Rostedt#
1183c5dacb88SSteven Rostedt#   You can override the default of what to do when the above
1184c5dacb88SSteven Rostedt#   options are not hit. This may be one of, "good", "bad",
1185c5dacb88SSteven Rostedt#   "abort" or "skip" (without the quotes).
1186c5dacb88SSteven Rostedt#
1187c5dacb88SSteven Rostedt#   Note, if you do not define any of the previous BISECT_RET_*
1188c5dacb88SSteven Rostedt#   and define BISECT_RET_DEFAULT, all bisects results will do
1189c5dacb88SSteven Rostedt#   what the BISECT_RET_DEFAULT has.
1190c5dacb88SSteven Rostedt#
1191c5dacb88SSteven Rostedt#
1192a75fececSSteven Rostedt# Example:
1193a57419b3SSteven Rostedt#   TEST_START
1194a57419b3SSteven Rostedt#   TEST_TYPE = bisect
1195a57419b3SSteven Rostedt#   BISECT_GOOD = v2.6.36
1196a57419b3SSteven Rostedt#   BISECT_BAD = b5153163ed580e00c67bdfecb02b2e3843817b3e
1197a57419b3SSteven Rostedt#   BISECT_TYPE = build
1198a57419b3SSteven Rostedt#   MIN_CONFIG = /home/test/config-bisect
1199d1fbd7e6SSteven Rostedt#
1200d1fbd7e6SSteven Rostedt#
1201d1fbd7e6SSteven Rostedt#
1202d1fbd7e6SSteven Rostedt# For TEST_TYPE = config_bisect
1203d1fbd7e6SSteven Rostedt#
1204d1fbd7e6SSteven Rostedt#  In those cases that you have two different configs. One of them
1205d1fbd7e6SSteven Rostedt#  work, the other does not, and you do not know what config causes
1206d1fbd7e6SSteven Rostedt#  the problem.
1207d1fbd7e6SSteven Rostedt#  The TEST_TYPE config_bisect will bisect the bad config looking for
1208d1fbd7e6SSteven Rostedt#  what config causes the failure.
1209d1fbd7e6SSteven Rostedt#
1210d1fbd7e6SSteven Rostedt#  The way it works is this:
1211d1fbd7e6SSteven Rostedt#
12124c16b1d6SSteven Rostedt (Red Hat)#   You can specify a good config with CONFIG_BISECT_GOOD, otherwise it
12134c16b1d6SSteven Rostedt (Red Hat)#   will use the MIN_CONFIG, and if that's not specified, it will use
12144c16b1d6SSteven Rostedt (Red Hat)#   the config that comes with "make defconfig".
1215d1fbd7e6SSteven Rostedt#
12164c16b1d6SSteven Rostedt (Red Hat)#   It runs both the good and bad configs through a make oldconfig to
12174c16b1d6SSteven Rostedt (Red Hat)#   make sure that they are set up for the kernel that is checked out.
1218d1fbd7e6SSteven Rostedt#
12194c16b1d6SSteven Rostedt (Red Hat)#   It then reads the configs that are set, as well as the ones that are
12204c16b1d6SSteven Rostedt (Red Hat)#   not set for both the good and bad configs, and then compares them.
12214c16b1d6SSteven Rostedt (Red Hat)#   It will set half of the good configs within the bad config (note,
12224c16b1d6SSteven Rostedt (Red Hat)#   "set" means to make the bad config match the good config, a config
12234c16b1d6SSteven Rostedt (Red Hat)#   in the good config that is off, will be turned off in the bad
12244c16b1d6SSteven Rostedt (Red Hat)#   config. That is considered a "set").
1225d1fbd7e6SSteven Rostedt#
12264c16b1d6SSteven Rostedt (Red Hat)#   It tests this new config and if it works, it becomes the new good
12274c16b1d6SSteven Rostedt (Red Hat)#   config, otherwise it becomes the new bad config. It continues this
12284c16b1d6SSteven Rostedt (Red Hat)#   process until there's only one config left and it will report that
12294c16b1d6SSteven Rostedt (Red Hat)#   config.
1230d1fbd7e6SSteven Rostedt#
12314c16b1d6SSteven Rostedt (Red Hat)#   The "bad config" can also be a config that is needed to boot but was
12324c16b1d6SSteven Rostedt (Red Hat)#   disabled because it depended on something that wasn't set.
1233d1fbd7e6SSteven Rostedt#
12344c16b1d6SSteven Rostedt (Red Hat)#   During this process, it saves the current good and bad configs in
12354c16b1d6SSteven Rostedt (Red Hat)#   ${TMP_DIR}/good_config and ${TMP_DIR}/bad_config respectively.
12364c16b1d6SSteven Rostedt (Red Hat)#   If you stop the test, you can copy them to a new location to
12374c16b1d6SSteven Rostedt (Red Hat)#   reuse them again.
1238d1fbd7e6SSteven Rostedt#
12394c16b1d6SSteven Rostedt (Red Hat)#   Although the MIN_CONFIG may be the config it starts with, the
12404c16b1d6SSteven Rostedt (Red Hat)#   MIN_CONFIG is ignored.
1241d1fbd7e6SSteven Rostedt#
1242d1fbd7e6SSteven Rostedt#  The option BUILD_TYPE will be ignored.
1243d1fbd7e6SSteven Rostedt#
1244d1fbd7e6SSteven Rostedt#  CONFIG_BISECT_TYPE is the type of test to perform:
1245d1fbd7e6SSteven Rostedt#	build	- bad fails to build
1246d1fbd7e6SSteven Rostedt#	boot	- bad builds but fails to boot
1247d1fbd7e6SSteven Rostedt#	test	- bad boots but fails a test
1248d1fbd7e6SSteven Rostedt#
1249d1fbd7e6SSteven Rostedt#  CONFIG_BISECT is the config that failed to boot
1250d1fbd7e6SSteven Rostedt#
1251c960bb9fSSteven Rostedt#  If BISECT_MANUAL is set, it will pause between iterations.
1252c960bb9fSSteven Rostedt#  This is useful to use just ktest.pl just for the config bisect.
1253c960bb9fSSteven Rostedt#  If you set it to build, it will run the bisect and you can
1254c960bb9fSSteven Rostedt#  control what happens in between iterations. It will ask you if
1255c960bb9fSSteven Rostedt#  the test succeeded or not and continue the config bisect.
125630f75da5SSteven Rostedt#
125730f75da5SSteven Rostedt# CONFIG_BISECT_GOOD (optional)
125830f75da5SSteven Rostedt#  If you have a good config to start with, then you
125930f75da5SSteven Rostedt#  can specify it with CONFIG_BISECT_GOOD. Otherwise
12604c16b1d6SSteven Rostedt (Red Hat)#  the MIN_CONFIG is the base, if MIN_CONFIG is not set
12614c16b1d6SSteven Rostedt (Red Hat)#  It will build a config with "make defconfig"
1262c960bb9fSSteven Rostedt#
1263b0918612SSteven Rostedt# CONFIG_BISECT_CHECK (optional)
1264b0918612SSteven Rostedt#  Set this to 1 if you want to confirm that the config ktest
1265b0918612SSteven Rostedt#  generates (the bad config with the min config) is still bad.
1266b0918612SSteven Rostedt#  It may be that the min config fixes what broke the bad config
1267b0918612SSteven Rostedt#  and the test will not return a result.
12684c16b1d6SSteven Rostedt (Red Hat)#  Set it to "good" to test only the good config and set it
12694c16b1d6SSteven Rostedt (Red Hat)#  to "bad" to only test the bad config.
1270b0918612SSteven Rostedt#
127140667fb5SSteven Rostedt (VMware)# CONFIG_BISECT_EXEC (optional)
127240667fb5SSteven Rostedt (VMware)#  The config bisect is a separate program that comes with ktest.pl.
1273afbac6c5SMasanari Iida#  By default, it will look for:
127440667fb5SSteven Rostedt (VMware)#    `pwd`/config-bisect.pl # the location ktest.pl was executed from.
127540667fb5SSteven Rostedt (VMware)#  If it does not find it there, it will look for:
127640667fb5SSteven Rostedt (VMware)#    `dirname <ktest.pl>`/config-bisect.pl # The directory that holds ktest.pl
127740667fb5SSteven Rostedt (VMware)#  If it does not find it there, it will look for:
127840667fb5SSteven Rostedt (VMware)#    ${BUILD_DIR}/tools/testing/ktest/config-bisect.pl
127940667fb5SSteven Rostedt (VMware)#  Setting CONFIG_BISECT_EXEC will override where it looks.
128040667fb5SSteven Rostedt (VMware)#
1281d1fbd7e6SSteven Rostedt# Example:
1282d1fbd7e6SSteven Rostedt#   TEST_START
1283d1fbd7e6SSteven Rostedt#   TEST_TYPE = config_bisect
1284d1fbd7e6SSteven Rostedt#   CONFIG_BISECT_TYPE = build
1285d36b6910SAl Viro#   CONFIG_BISECT = /home/test/config-bad
1286d1fbd7e6SSteven Rostedt#   MIN_CONFIG = /home/test/config-min
1287c960bb9fSSteven Rostedt#   BISECT_MANUAL = 1
1288d1fbd7e6SSteven Rostedt#
12894c4ab120SSteven Rostedt#
12904c4ab120SSteven Rostedt#
12914c4ab120SSteven Rostedt# For TEST_TYPE = make_min_config
12924c4ab120SSteven Rostedt#
12934c4ab120SSteven Rostedt#  After doing a make localyesconfig, your kernel configuration may
12944c4ab120SSteven Rostedt#  not be the most useful minimum configuration. Having a true minimum
12954c4ab120SSteven Rostedt#  config that you can use against other configs is very useful if
12964c4ab120SSteven Rostedt#  someone else has a config that breaks on your code. By only forcing
12974c4ab120SSteven Rostedt#  those configurations that are truly required to boot your machine
12984c4ab120SSteven Rostedt#  will give you less of a chance that one of your set configurations
12994c4ab120SSteven Rostedt#  will make the bug go away. This will give you a better chance to
13004c4ab120SSteven Rostedt#  be able to reproduce the reported bug matching the broken config.
13014c4ab120SSteven Rostedt#
13024c4ab120SSteven Rostedt#  Note, this does take some time, and may require you to run the
13034c4ab120SSteven Rostedt#  test over night, or perhaps over the weekend. But it also allows
13044c4ab120SSteven Rostedt#  you to interrupt it, and gives you the current minimum config
13054c4ab120SSteven Rostedt#  that was found till that time.
13064c4ab120SSteven Rostedt#
13074c4ab120SSteven Rostedt#  Note, this test automatically assumes a BUILD_TYPE of oldconfig
13084c4ab120SSteven Rostedt#  and its test type acts like boot.
13094c4ab120SSteven Rostedt#  TODO: add a test version that makes the config do more than just
13104c4ab120SSteven Rostedt#   boot, like having network access.
13114c4ab120SSteven Rostedt#
1312b9066f6cSSteven Rostedt#  To save time, the test does not just grab any option and test
1313b9066f6cSSteven Rostedt#  it. The Kconfig files are examined to determine the dependencies
1314b9066f6cSSteven Rostedt#  of the configs. If a config is chosen that depends on another
1315b9066f6cSSteven Rostedt#  config, that config will be checked first. By checking the
1316b9066f6cSSteven Rostedt#  parents first, we can eliminate whole groups of configs that
1317b9066f6cSSteven Rostedt#  may have been enabled.
1318b9066f6cSSteven Rostedt#
1319b9066f6cSSteven Rostedt#  For example, if a USB device config is chosen and depends on CONFIG_USB,
1320b9066f6cSSteven Rostedt#  the CONFIG_USB will be tested before the device. If CONFIG_USB is
1321b9066f6cSSteven Rostedt#  found not to be needed, it, as well as all configs that depend on
1322b9066f6cSSteven Rostedt#  it, will be disabled and removed from the current min_config.
1323b9066f6cSSteven Rostedt#
13244c4ab120SSteven Rostedt#  OUTPUT_MIN_CONFIG is the path and filename of the file that will
13254c4ab120SSteven Rostedt#   be created from the MIN_CONFIG. If you interrupt the test, set
13264c4ab120SSteven Rostedt#   this file as your new min config, and use it to continue the test.
13274c4ab120SSteven Rostedt#   This file does not need to exist on start of test.
13284c4ab120SSteven Rostedt#   This file is not created until a config is found that can be removed.
132935ce5952SSteven Rostedt#   If this file exists, you will be prompted if you want to use it
133035ce5952SSteven Rostedt#   as the min_config (overriding MIN_CONFIG) if START_MIN_CONFIG
133135ce5952SSteven Rostedt#   is not defined.
13324c4ab120SSteven Rostedt#   (required field)
13334c4ab120SSteven Rostedt#
13344c4ab120SSteven Rostedt#  START_MIN_CONFIG is the config to use to start the test with.
13354c4ab120SSteven Rostedt#   you can set this as the same OUTPUT_MIN_CONFIG, but if you do
13364c4ab120SSteven Rostedt#   the OUTPUT_MIN_CONFIG file must exist.
13374c4ab120SSteven Rostedt#   (default MIN_CONFIG)
13384c4ab120SSteven Rostedt#
13394c4ab120SSteven Rostedt#  IGNORE_CONFIG is used to specify a config file that has configs that
13404c4ab120SSteven Rostedt#   you already know must be set. Configs are written here that have
13414c4ab120SSteven Rostedt#   been tested and proved to be required. It is best to define this
13424c4ab120SSteven Rostedt#   file if you intend on interrupting the test and running it where
13434c4ab120SSteven Rostedt#   it left off. New configs that it finds will be written to this file
13444c4ab120SSteven Rostedt#   and will not be tested again in later runs.
13454c4ab120SSteven Rostedt#   (optional)
13464c4ab120SSteven Rostedt#
1347ccc513b6SSteven Rostedt#  MIN_CONFIG_TYPE can be either 'boot' or 'test'. With 'boot' it will
1348ccc513b6SSteven Rostedt#   test if the created config can just boot the machine. If this is
1349ccc513b6SSteven Rostedt#   set to 'test', then the TEST option must be defined and the created
1350ccc513b6SSteven Rostedt#   config will not only boot the target, but also make sure that the
1351ccc513b6SSteven Rostedt#   config lets the test succeed. This is useful to make sure the final
1352ccc513b6SSteven Rostedt#   config that is generated allows network activity (ssh).
1353ccc513b6SSteven Rostedt#   (optional)
1354ccc513b6SSteven Rostedt#
135543de3316SSteven Rostedt#  USE_OUTPUT_MIN_CONFIG set this to 1 if you do not want to be prompted
135643de3316SSteven Rostedt#   about using the OUTPUT_MIN_CONFIG as the MIN_CONFIG as the starting
135743de3316SSteven Rostedt#   point. Set it to 0 if you want to always just use the given MIN_CONFIG.
135843de3316SSteven Rostedt#   If it is not defined, it will prompt you to pick which config
135943de3316SSteven Rostedt#   to start with (MIN_CONFIG or OUTPUT_MIN_CONFIG).
136043de3316SSteven Rostedt#
13614c4ab120SSteven Rostedt# Example:
13624c4ab120SSteven Rostedt#
13634c4ab120SSteven Rostedt#  TEST_TYPE = make_min_config
13644c4ab120SSteven Rostedt#  OUTPUT_MIN_CONFIG = /path/to/config-new-min
13654c4ab120SSteven Rostedt#  START_MIN_CONFIG = /path/to/config-min
13664c4ab120SSteven Rostedt#  IGNORE_CONFIG = /path/to/config-tested
1367ccc513b6SSteven Rostedt#  MIN_CONFIG_TYPE = test
1368ccc513b6SSteven Rostedt#  TEST = ssh ${USER}@${MACHINE} echo hi
13694c4ab120SSteven Rostedt#
13704283b169SSteven Rostedt (Red Hat)#
13714283b169SSteven Rostedt (Red Hat)#
13724283b169SSteven Rostedt (Red Hat)#
13734283b169SSteven Rostedt (Red Hat)# For TEST_TYPE = make_warnings_file
13744283b169SSteven Rostedt (Red Hat)#
13754283b169SSteven Rostedt (Red Hat)# If you want the build to fail when a new warning is discovered
13764283b169SSteven Rostedt (Red Hat)# you set the WARNINGS_FILE to point to a file of known warnings.
13774283b169SSteven Rostedt (Red Hat)#
13784283b169SSteven Rostedt (Red Hat)# The test "make_warnings_file" will let you create a new warnings
13794283b169SSteven Rostedt (Red Hat)# file before you run other tests, like patchcheck.
13804283b169SSteven Rostedt (Red Hat)#
13814283b169SSteven Rostedt (Red Hat)# What this test does is to run just a build, you still need to
13824283b169SSteven Rostedt (Red Hat)# specify BUILD_TYPE to tell the test what type of config to use.
13834283b169SSteven Rostedt (Red Hat)# A BUILD_TYPE of nobuild will fail this test.
13844283b169SSteven Rostedt (Red Hat)#
13854283b169SSteven Rostedt (Red Hat)# The test will do the build and scan for all warnings. Any warning
13864283b169SSteven Rostedt (Red Hat)# it discovers will be saved in the WARNINGS_FILE (required) option.
13874283b169SSteven Rostedt (Red Hat)#
13884283b169SSteven Rostedt (Red Hat)# It is recommended (but not necessary) to make sure BUILD_NOCLEAN is
13894283b169SSteven Rostedt (Red Hat)# off, so that a full build is done (make mrproper is performed).
13904283b169SSteven Rostedt (Red Hat)# That way, all warnings will be captured.
13914283b169SSteven Rostedt (Red Hat)#
13924283b169SSteven Rostedt (Red Hat)# Example:
13934283b169SSteven Rostedt (Red Hat)#
13944283b169SSteven Rostedt (Red Hat)#  TEST_TYPE = make_warnings_file
13954283b169SSteven Rostedt (Red Hat)#  WARNINGS_FILE = ${OUTPUT_DIR}
13964283b169SSteven Rostedt (Red Hat)#  BUILD_TYPE = useconfig:oldconfig
13974283b169SSteven Rostedt (Red Hat)#  CHECKOUT = v3.8
13984283b169SSteven Rostedt (Red Hat)#  BUILD_NOCLEAN = 0
13994283b169SSteven Rostedt (Red Hat)#
1400