aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/ktest/examples/include
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/ktest/examples/include')
-rw-r--r--tools/testing/ktest/examples/include/bisect.conf90
-rw-r--r--tools/testing/ktest/examples/include/defaults.conf157
-rw-r--r--tools/testing/ktest/examples/include/min-config.conf60
-rw-r--r--tools/testing/ktest/examples/include/patchcheck.conf74
-rw-r--r--tools/testing/ktest/examples/include/tests.conf74
5 files changed, 455 insertions, 0 deletions
diff --git a/tools/testing/ktest/examples/include/bisect.conf b/tools/testing/ktest/examples/include/bisect.conf
new file mode 100644
index 000000000000..009bea65bfb6
--- /dev/null
+++ b/tools/testing/ktest/examples/include/bisect.conf
@@ -0,0 +1,90 @@
1#
2# This example shows the bisect tests (git bisect and config bisect)
3#
4
5
6# The config that includes this file may define a RUN_TEST
7# variable that will tell this config what test to run.
8# (what to set the TEST option to).
9#
10DEFAULTS IF NOT DEFINED RUN_TEST
11# Requires that hackbench is in the PATH
12RUN_TEST := ${SSH} hackbench 50
13
14
15# Set TEST to 'bisect' to do a normal git bisect. You need
16# to modify the options below to make it bisect the exact
17# commits you are interested in.
18#
19TEST_START IF ${TEST} == bisect
20TEST_TYPE = bisect
21# You must set the commit that was considered good (git bisect good)
22BISECT_GOOD = v3.3
23# You must set the commit that was considered bad (git bisect bad)
24BISECT_BAD = HEAD
25# It's best to specify the branch to checkout before starting the bisect.
26CHECKOUT = origin/master
27# This can be build, boot, or test. Here we are doing a bisect
28# that requires to run a test to know if the bisect was good or bad.
29# The test should exit with 0 on good, non-zero for bad. But see
30# the BISECT_RET_* options in samples.conf to override this.
31BISECT_TYPE = test
32TEST = ${RUN_TEST}
33# It is usually a good idea to confirm that the GOOD and the BAD
34# commits are truly good and bad respectively. Having BISECT_CHECK
35# set to 1 will check both that the good commit works and the bad
36# commit fails. If you only want to check one or the other,
37# set BISECT_CHECK to 'good' or to 'bad'.
38BISECT_CHECK = 1
39#BISECT_CHECK = good
40#BISECT_CHECK = bad
41
42# Usually it's a good idea to specify the exact config you
43# want to use throughout the entire bisect. Here we placed
44# it in the directory we called ktest.pl from and named it
45# 'config-bisect'.
46MIN_CONFIG = ${THIS_DIR}/config-bisect
47# By default, if we are doing a BISECT_TYPE = test run but the
48# build or boot fails, ktest.pl will do a 'git bisect skip'.
49# Uncomment the below option to make ktest stop testing on such
50# an error.
51#BISECT_SKIP = 0
52# Now if you had BISECT_SKIP = 0 and the test fails, you can
53# examine what happened and then do 'git bisect log > /tmp/replay'
54# Set BISECT_REPLAY to /tmp/replay and ktest.pl will run the
55# 'git bisect replay /tmp/replay' before continuing the bisect test.
56#BISECT_REPLAY = /tmp/replay
57# If you used BISECT_REPLAY after the bisect test failed, you may
58# not want to continue the bisect on that commit that failed.
59# By setting BISECT_START to a new commit. ktest.pl will checkout
60# that commit after it has performed the 'git bisect replay' but
61# before it continues running the bisect test.
62#BISECT_START = 2545eb6198e7e1ec50daa0cfc64a4cdfecf24ec9
63
64# Now if you don't trust ktest.pl to make the decisions for you, then
65# set BISECT_MANUAL to 1. This will cause ktest.pl not to decide
66# if the commit was good or bad. Instead, it will ask you to tell
67# it if the current commit was good. In the mean time, you could
68# take the result, load it on any machine you want. Run several tests,
69# or whatever you feel like. Then, when you are happy, you can tell
70# ktest if you think it was good or not and ktest.pl will continue
71# the git bisect. You can even change what commit it is currently at.
72#BISECT_MANUAL = 1
73
74
75# One of the unique tests that ktest does is the config bisect.
76# Currently (which hopefully will be fixed soon), the bad config
77# must be a superset of the good config. This is because it only
78# searches for a config that causes the target to fail. If the
79# good config is not a subset of the bad config, or if the target
80# fails because of a lack of a config, then it will not find
81# the config for you.
82TEST_START IF ${TEST} == config-bisect
83TEST_TYPE = config_bisect
84# set to build, boot, test
85CONFIG_BISECT_TYPE = boot
86# Set the config that is considered bad.
87CONFIG_BISECT = ${THIS_DIR}/config-bad
88# This config is optional. By default it uses the
89# MIN_CONFIG as the good config.
90CONFIG_BISECT_GOOD = ${THIS_DIR}/config-good
diff --git a/tools/testing/ktest/examples/include/defaults.conf b/tools/testing/ktest/examples/include/defaults.conf
new file mode 100644
index 000000000000..323a552ce642
--- /dev/null
+++ b/tools/testing/ktest/examples/include/defaults.conf
@@ -0,0 +1,157 @@
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 orginize 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.