xref: /linux/tools/testing/ktest/examples/include/defaults.conf (revision e5451c8f8330e03ad3cfa16048b4daf961af434f)
1# This file holds defaults for most the tests. It defines the options that
2# are most common to tests that are likely to be shared.
3#
4# Note, after including this file, a config file may override any option
5# with a DEFAULTS OVERRIDE section.
6#
7
8# For those cases that use the same machine to boot a 64 bit
9# and a 32 bit version. The MACHINE is the DNS name to get to the
10# box (usually different if it was 64 bit or 32 bit) but the
11# BOX here is defined as a variable that will be the name of the box
12# itself. It is useful for calling scripts that will power cycle
13# the box, as only one script needs to be created to power cycle
14# even though the box itself has multiple operating systems on it.
15# By default, BOX and MACHINE are the same.
16
17DEFAULTS IF NOT DEFINED BOX
18BOX := ${MACHINE}
19
20
21# Consider each box as 64 bit box, unless the config including this file
22# has defined BITS = 32
23
24DEFAULTS IF NOT DEFINED BITS
25BITS := 64
26
27
28DEFAULTS
29
30# THIS_DIR is used through out the configs and defaults to ${PWD} which
31# is the directory that ktest.pl was called from.
32
33THIS_DIR := ${PWD}
34
35
36# to organize your configs, having each machine save their configs
37# into a separate directly is useful.
38CONFIG_DIR := ${THIS_DIR}/configs/${MACHINE}
39
40# Reset the log before running each test.
41CLEAR_LOG = 1
42
43# As installing kernels usually requires root privilege, default the
44# user on the target as root. It is also required that the target
45# allows ssh to root from the host without asking for a password.
46
47SSH_USER = root
48
49# For accesing the machine, we will ssh to root@machine.
50SSH := ssh ${SSH_USER}@${MACHINE}
51
52# Update this. The default here is ktest will ssh to the target box
53# and run a script called 'run-test' located on that box.
54TEST = ${SSH} run-test
55
56# Point build dir to the git repo you use
57BUILD_DIR = ${THIS_DIR}/linux.git
58
59# Each machine will have its own output build directory.
60OUTPUT_DIR = ${THIS_DIR}/build/${MACHINE}
61
62# Yes this config is focused on x86 (but ktest works for other archs too)
63BUILD_TARGET = arch/x86/boot/bzImage
64TARGET_IMAGE = /boot/vmlinuz-test
65
66# have directory for the scripts to reboot and power cycle the boxes
67SCRIPTS_DIR := ${THIS_DIR}/scripts
68
69# You can have each box/machine have a script to power cycle it.
70# Name your script <box>-cycle.
71POWER_CYCLE = ${SCRIPTS_DIR}/${BOX}-cycle
72
73# This script is used to power off the box.
74POWER_OFF = ${SCRIPTS_DIR}/${BOX}-poweroff
75
76# Keep your test kernels separate from your other kernels.
77LOCALVERSION = -test
78
79# The /boot/grub/menu.lst is searched for the line:
80#  title Test Kernel
81# and ktest will use that kernel to reboot into.
82# For grub2 or other boot loaders, you need to set BOOT_TYPE
83# to 'script' and define other ways to load the kernel.
84# See snowball.conf example.
85#
86GRUB_MENU = Test Kernel
87
88# The kernel build will use this option.
89BUILD_OPTIONS = -j8
90
91# Keeping the log file with the output dir is convenient.
92LOG_FILE = ${OUTPUT_DIR}/${MACHINE}.log
93
94# Each box should have their own minum configuration
95# See min-config.conf
96MIN_CONFIG = ${CONFIG_DIR}/config-min
97
98# For things like randconfigs, there may be configs you find that
99# are already broken, or there may be some configs that you always
100# want set. Uncomment ADD_CONFIG and point it to the make config files
101# that set the configs you want to keep on (or off) in your build.
102# ADD_CONFIG is usually something to add configs to all machines,
103# where as, MIN_CONFIG is specific per machine.
104#ADD_CONFIG = ${THIS_DIR}/config-broken ${THIS_DIR}/config-general
105
106# To speed up reboots for bisects and patchcheck, instead of
107# waiting 60 seconds for the console to be idle, if this line is
108# seen in the console output, ktest will know the good kernel has
109# finished rebooting and it will be able to continue the tests.
110REBOOT_SUCCESS_LINE = ${MACHINE} login:
111
112# The following is different ways to end the test.
113# by setting the variable REBOOT to: none, error, fail or
114# something else, ktest will power cycle or reboot the target box
115# at the end of the tests.
116#
117# REBOOT := none
118#   Don't do anything at the end of the test.
119#
120# REBOOT := error
121#   Reboot the box if ktest detects an error
122#
123# REBOOT := fail
124#   Do not stop on failure, and after all tests are complete
125#   power off the box (for both success and error)
126#   This is good to run over a weekend and you don't want to waste
127#   electricity.
128#
129
130DEFAULTS IF ${REBOOT} == none
131REBOOT_ON_SUCCESS = 0
132REBOOT_ON_ERROR = 0
133POWEROFF_ON_ERROR = 0
134POWEROFF_ON_SUCCESS = 0
135
136DEFAULTS ELSE IF ${REBOOT} == error
137REBOOT_ON_SUCCESS = 0
138REBOOT_ON_ERROR = 1
139POWEROFF_ON_ERROR = 0
140POWEROFF_ON_SUCCESS = 0
141
142DEFAULTS ELSE IF ${REBOOT} == fail
143REBOOT_ON_SUCCESS = 0
144POWEROFF_ON_ERROR = 1
145POWEROFF_ON_SUCCESS = 1
146POWEROFF_AFTER_HALT = 120
147DIE_ON_FAILURE = 0
148
149# Store the failure information into this directory
150# such as the .config, dmesg, and build log.
151STORE_FAILURES = ${THIS_DIR}/failures
152
153DEFAULTS ELSE
154REBOOT_ON_SUCCESS = 1
155REBOOT_ON_ERROR = 1
156POWEROFF_ON_ERROR = 0
157POWEROFF_ON_SUCCESS = 0
158