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