162306a36Sopenharmony_ci# This file holds defaults for most the tests. It defines the options that
262306a36Sopenharmony_ci# are most common to tests that are likely to be shared.
362306a36Sopenharmony_ci#
462306a36Sopenharmony_ci# Note, after including this file, a config file may override any option
562306a36Sopenharmony_ci# with a DEFAULTS OVERRIDE section.
662306a36Sopenharmony_ci#
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci# For those cases that use the same machine to boot a 64 bit
962306a36Sopenharmony_ci# and a 32 bit version. The MACHINE is the DNS name to get to the
1062306a36Sopenharmony_ci# box (usually different if it was 64 bit or 32 bit) but the
1162306a36Sopenharmony_ci# BOX here is defined as a variable that will be the name of the box
1262306a36Sopenharmony_ci# itself. It is useful for calling scripts that will power cycle
1362306a36Sopenharmony_ci# the box, as only one script needs to be created to power cycle
1462306a36Sopenharmony_ci# even though the box itself has multiple operating systems on it.
1562306a36Sopenharmony_ci# By default, BOX and MACHINE are the same.
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ciDEFAULTS IF NOT DEFINED BOX
1862306a36Sopenharmony_ciBOX := ${MACHINE}
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci# Consider each box as 64 bit box, unless the config including this file
2262306a36Sopenharmony_ci# has defined BITS = 32
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ciDEFAULTS IF NOT DEFINED BITS
2562306a36Sopenharmony_ciBITS := 64
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ciDEFAULTS
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci# THIS_DIR is used through out the configs and defaults to ${PWD} which
3162306a36Sopenharmony_ci# is the directory that ktest.pl was called from.
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ciTHIS_DIR := ${PWD}
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci# to organize your configs, having each machine save their configs
3762306a36Sopenharmony_ci# into a separate directly is useful.
3862306a36Sopenharmony_ciCONFIG_DIR := ${THIS_DIR}/configs/${MACHINE}
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ci# Reset the log before running each test.
4162306a36Sopenharmony_ciCLEAR_LOG = 1
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci# As installing kernels usually requires root privilege, default the
4462306a36Sopenharmony_ci# user on the target as root. It is also required that the target
4562306a36Sopenharmony_ci# allows ssh to root from the host without asking for a password.
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ciSSH_USER = root
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ci# For accesing the machine, we will ssh to root@machine.
5062306a36Sopenharmony_ciSSH := ssh ${SSH_USER}@${MACHINE}
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ci# Update this. The default here is ktest will ssh to the target box
5362306a36Sopenharmony_ci# and run a script called 'run-test' located on that box.
5462306a36Sopenharmony_ciTEST = ${SSH} run-test
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ci# Point build dir to the git repo you use
5762306a36Sopenharmony_ciBUILD_DIR = ${THIS_DIR}/linux.git
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ci# Each machine will have its own output build directory.
6062306a36Sopenharmony_ciOUTPUT_DIR = ${THIS_DIR}/build/${MACHINE}
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ci# Yes this config is focused on x86 (but ktest works for other archs too)
6362306a36Sopenharmony_ciBUILD_TARGET = arch/x86/boot/bzImage
6462306a36Sopenharmony_ciTARGET_IMAGE = /boot/vmlinuz-test
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ci# have directory for the scripts to reboot and power cycle the boxes
6762306a36Sopenharmony_ciSCRIPTS_DIR := ${THIS_DIR}/scripts
6862306a36Sopenharmony_ci
6962306a36Sopenharmony_ci# You can have each box/machine have a script to power cycle it.
7062306a36Sopenharmony_ci# Name your script <box>-cycle.
7162306a36Sopenharmony_ciPOWER_CYCLE = ${SCRIPTS_DIR}/${BOX}-cycle
7262306a36Sopenharmony_ci
7362306a36Sopenharmony_ci# This script is used to power off the box.
7462306a36Sopenharmony_ciPOWER_OFF = ${SCRIPTS_DIR}/${BOX}-poweroff
7562306a36Sopenharmony_ci
7662306a36Sopenharmony_ci# Keep your test kernels separate from your other kernels.
7762306a36Sopenharmony_ciLOCALVERSION = -test
7862306a36Sopenharmony_ci
7962306a36Sopenharmony_ci# The /boot/grub/menu.lst is searched for the line:
8062306a36Sopenharmony_ci#  title Test Kernel
8162306a36Sopenharmony_ci# and ktest will use that kernel to reboot into.
8262306a36Sopenharmony_ci# For grub2 or other boot loaders, you need to set BOOT_TYPE
8362306a36Sopenharmony_ci# to 'script' and define other ways to load the kernel.
8462306a36Sopenharmony_ci# See snowball.conf example.
8562306a36Sopenharmony_ci#
8662306a36Sopenharmony_ciGRUB_MENU = Test Kernel
8762306a36Sopenharmony_ci
8862306a36Sopenharmony_ci# The kernel build will use this option.
8962306a36Sopenharmony_ciBUILD_OPTIONS = -j8
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ci# Keeping the log file with the output dir is convenient.
9262306a36Sopenharmony_ciLOG_FILE = ${OUTPUT_DIR}/${MACHINE}.log
9362306a36Sopenharmony_ci
9462306a36Sopenharmony_ci# Each box should have their own minum configuration
9562306a36Sopenharmony_ci# See min-config.conf
9662306a36Sopenharmony_ciMIN_CONFIG = ${CONFIG_DIR}/config-min
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ci# For things like randconfigs, there may be configs you find that
9962306a36Sopenharmony_ci# are already broken, or there may be some configs that you always
10062306a36Sopenharmony_ci# want set. Uncomment ADD_CONFIG and point it to the make config files
10162306a36Sopenharmony_ci# that set the configs you want to keep on (or off) in your build.
10262306a36Sopenharmony_ci# ADD_CONFIG is usually something to add configs to all machines,
10362306a36Sopenharmony_ci# where as, MIN_CONFIG is specific per machine.
10462306a36Sopenharmony_ci#ADD_CONFIG = ${THIS_DIR}/config-broken ${THIS_DIR}/config-general
10562306a36Sopenharmony_ci
10662306a36Sopenharmony_ci# To speed up reboots for bisects and patchcheck, instead of
10762306a36Sopenharmony_ci# waiting 60 seconds for the console to be idle, if this line is
10862306a36Sopenharmony_ci# seen in the console output, ktest will know the good kernel has
10962306a36Sopenharmony_ci# finished rebooting and it will be able to continue the tests.
11062306a36Sopenharmony_ciREBOOT_SUCCESS_LINE = ${MACHINE} login:
11162306a36Sopenharmony_ci
11262306a36Sopenharmony_ci# The following is different ways to end the test.
11362306a36Sopenharmony_ci# by setting the variable REBOOT to: none, error, fail or
11462306a36Sopenharmony_ci# something else, ktest will power cycle or reboot the target box
11562306a36Sopenharmony_ci# at the end of the tests.
11662306a36Sopenharmony_ci#
11762306a36Sopenharmony_ci# REBOOT := none
11862306a36Sopenharmony_ci#   Don't do anything at the end of the test.
11962306a36Sopenharmony_ci#
12062306a36Sopenharmony_ci# REBOOT := error
12162306a36Sopenharmony_ci#   Reboot the box if ktest detects an error
12262306a36Sopenharmony_ci#
12362306a36Sopenharmony_ci# REBOOT := fail
12462306a36Sopenharmony_ci#   Do not stop on failure, and after all tests are complete
12562306a36Sopenharmony_ci#   power off the box (for both success and error)
12662306a36Sopenharmony_ci#   This is good to run over a weekend and you don't want to waste
12762306a36Sopenharmony_ci#   electricity.
12862306a36Sopenharmony_ci#
12962306a36Sopenharmony_ci
13062306a36Sopenharmony_ciDEFAULTS IF ${REBOOT} == none
13162306a36Sopenharmony_ciREBOOT_ON_SUCCESS = 0
13262306a36Sopenharmony_ciREBOOT_ON_ERROR = 0
13362306a36Sopenharmony_ciPOWEROFF_ON_ERROR = 0
13462306a36Sopenharmony_ciPOWEROFF_ON_SUCCESS = 0
13562306a36Sopenharmony_ci
13662306a36Sopenharmony_ciDEFAULTS ELSE IF ${REBOOT} == error
13762306a36Sopenharmony_ciREBOOT_ON_SUCCESS = 0
13862306a36Sopenharmony_ciREBOOT_ON_ERROR = 1
13962306a36Sopenharmony_ciPOWEROFF_ON_ERROR = 0
14062306a36Sopenharmony_ciPOWEROFF_ON_SUCCESS = 0
14162306a36Sopenharmony_ci
14262306a36Sopenharmony_ciDEFAULTS ELSE IF ${REBOOT} == fail
14362306a36Sopenharmony_ciREBOOT_ON_SUCCESS = 0
14462306a36Sopenharmony_ciPOWEROFF_ON_ERROR = 1
14562306a36Sopenharmony_ciPOWEROFF_ON_SUCCESS = 1
14662306a36Sopenharmony_ciPOWEROFF_AFTER_HALT = 120
14762306a36Sopenharmony_ciDIE_ON_FAILURE = 0
14862306a36Sopenharmony_ci
14962306a36Sopenharmony_ci# Store the failure information into this directory
15062306a36Sopenharmony_ci# such as the .config, dmesg, and build log.
15162306a36Sopenharmony_ciSTORE_FAILURES = ${THIS_DIR}/failures
15262306a36Sopenharmony_ci
15362306a36Sopenharmony_ciDEFAULTS ELSE
15462306a36Sopenharmony_ciREBOOT_ON_SUCCESS = 1
15562306a36Sopenharmony_ciREBOOT_ON_ERROR = 1
15662306a36Sopenharmony_ciPOWEROFF_ON_ERROR = 0
15762306a36Sopenharmony_ciPOWEROFF_ON_SUCCESS = 0
158