sample.conf 17.1 KB
Newer Older
1
#
2
# Config file for ktest.pl
3 4 5 6
#
# Note, all paths must be absolute
#

7 8 9
# Options set in the beginning of the file are considered to be
# default options. These options can be overriden by test specific
# options, with the following exceptions:
10 11 12 13 14 15
#
#  LOG_FILE
#  CLEAR_LOG
#  POWEROFF_ON_SUCCESS
#  REBOOT_ON_SUCCESS
#
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
# Test specific options are set after the label:
#
# TEST_START
#
# The options after a TEST_START label are specific to that test.
# Each TEST_START label will set up a new test. If you want to
# perform a test more than once, you can add the ITERATE label
# to it followed by the number of times you want that test
# to iterate. If the ITERATE is left off, the test will only
# be performed once.
#
# TEST_START ITERATE 10
#
# You can skip a test by adding SKIP (before or after the ITERATE
# and number)
#
# TEST_START SKIP
#
# TEST_START SKIP ITERATE 10
#
# TEST_START ITERATE 10 SKIP
#
# The SKIP label causes the options and the test itself to be ignored.
# This is useful to set up several different tests in one config file, and
# only enabling the ones you want to use for a current test run.
#
# You can add default options anywhere in the file as well
# with the DEFAULTS tag. This allows you to have default options
# after the test options to keep the test options at the top
# of the file. You can even place the DEFAULTS tag between
# test cases (but not in the middle of a single test case)
#
# TEST_START
# MIN_CONFIG = /home/test/config-test1
#
# DEFAULTS
# MIN_CONFIG = /home/test/config-default
#
# TEST_START ITERATE 10
#
# The above will run the first test with MIN_CONFIG set to
# /home/test/config-test-1. Then 10 tests will be executed
# with MIN_CONFIG with /home/test/config-default.
#
# You can also disable defaults with the SKIP option
#
# DEFAULTS SKIP
# MIN_CONFIG = /home/test/config-use-sometimes
#
# DEFAULTS
# MIN_CONFIG = /home/test/config-most-times
#
# The above will ignore the first MIN_CONFIG. If you want to
# use the first MIN_CONFIG, remove the SKIP from the first
# DEFAULTS tag and add it to the second. Be careful, options
# may only be declared once per test or default. If you have
# the same option name under the same test or as default
# ktest will fail to execute, and no tests will run.
#


#### Mandatory Default Options ####
78

79 80
# These options must be in the default section, although most
# may be overridden by test options.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103

# The machine hostname that you will test
#MACHINE = target

# The box is expected to have ssh on normal bootup, provide the user
#  (most likely root, since you need privileged operations)
#SSH_USER = root

# The directory that contains the Linux source code
#BUILD_DIR = /home/test/linux.git

# The directory that the objects will be built
# (can not be same as BUILD_DIR)
#OUTPUT_DIR = /home/test/build/target

# The location of the compiled file to copy to the target
# (relative to OUTPUT_DIR)
#BUILD_TARGET = arch/x86/boot/bzImage

# The place to put your image on the test machine
#TARGET_IMAGE = /boot/vmlinuz-test

# A script or command to reboot the box
104
#
105 106
# Here is a digital loggers power switch example
#POWER_CYCLE = wget --no-proxy -O /dev/null -q  --auth-no-challenge 'http://admin:admin@power/outlet?5=CCL'
107
#
108 109
# Here is an example to reboot a virtual box on the current host
# with the name "Guest".
110
#POWER_CYCLE = virsh destroy Guest; sleep 5; virsh start Guest
111 112

# The script or command that reads the console
113
#
114 115
#  If you use ttywatch server, something like the following would work.
#CONSOLE = nc -d localhost 3001
116
#
117
# For a virtual machine with guest name "Guest".
118
#CONSOLE =  virsh console Guest
119 120 121 122 123 124 125 126

# Required version ending to differentiate the test
# from other linux builds on the system.
#LOCALVERSION = -test

# The grub title name for the test kernel to boot
# (Only mandatory if REBOOT_TYPE = grub)
#
127 128 129 130 131
# Note, ktest.pl will not update the grub menu.lst, you need to
# manually add an option for the test. ktest.pl will search
# the grub menu.lst for this option to find what kernel to
# reboot into.
#
132 133
# For example, if in the /boot/grub/menu.lst the test kernel title has:
# title Test Kernel
134
# kernel vmlinuz-test
135 136 137 138 139 140 141 142
#GRUB_MENU = Test Kernel

# A script to reboot the target into the test kernel
# (Only mandatory if REBOOT_TYPE = script)
#REBOOT_SCRIPT =

#### Optional Config Options (all have defaults) ####

143 144 145 146 147 148 149 150 151
# Start a test setup. If you leave this off, all options
# will be default and the test will run once.
# This is a label and not really an option (it takes no value).
# You can append ITERATE and a number after it to iterate the
# test a number of times, or SKIP to ignore this test.
#
#TEST_START
#TEST_START ITERATE 5
#TEST_START SKIP
152 153 154 155 156 157

# The default test type (default test)
# The test types may be:
#   build - only build the kernel, do nothing else
#   boot - build and boot the kernel
#   test - build, boot and if TEST is set, run the test script
158
#          (If TEST is not set, it defaults back to boot)
159 160 161 162
#   bisect - Perform a bisect on the kernel (see BISECT_TYPE below)
#   patchcheck - Do a test on a series of commits in git (see PATCHCHECK below)
#TEST_TYPE = test

163 164 165 166 167 168
# Test to run if there is a successful boot and TEST_TYPE is test.
# Must exit with 0 on success and non zero on error
# default (undefined)
#TEST = ssh user@machine /root/run_test

# The build type is any make config type or special command
169 170
#  (default randconfig)
#   nobuild - skip the clean and build step
171 172 173
#   useconfig:/path/to/config - use the given config and run
#              oldconfig on it.
# This option is ignored if TEST_TYPE is patchcheck or bisect
174 175 176 177 178 179
#BUILD_TYPE = randconfig

# The make command (default make)
# If you are building a 32bit x86 on a 64 bit host
#MAKE_CMD = CC=i386-gcc AS=i386-as make ARCH=i386

180 181
# If you need an initrd, you can add a script or code here to install
# it. The environment variable KERNEL_VERSION will be set to the
182 183 184 185
# kernel version that is used. Remember to add the initrd line
# to your grub menu.lst file.
#
# Here's a couple of examples to use:
186
#POST_INSTALL = ssh user@target /sbin/mkinitrd --allow-missing -f /boot/initramfs-test.img $KERNEL_VERSION
187 188 189
#
# or on some systems:
#POST_INSTALL = ssh user@target /sbin/dracut -f /boot/initramfs-test.img $KERNEL_VERSION
190

191 192 193 194 195 196 197 198
# Way to reboot the box to the test kernel.
# Only valid options so far are "grub" and "script"
# (default grub)
# If you specify grub, it will assume grub version 1
# and will search in /boot/grub/menu.lst for the title $GRUB_MENU
# and select that target to reboot to the kernel. If this is not
# your setup, then specify "script" and have a command or script
# specified in REBOOT_SCRIPT to boot to the target.
199 200 201
#
# The entry in /boot/grub/menu.lst must be entered in manually.
# The test will not modify that file.
202 203
#REBOOT_TYPE = grub

204
# Line to define a successful boot up in console output.
205
# This is what the line contains, not the entire line. If you need
206 207 208 209 210 211
# the entire line to match, then use regural expression syntax like:
#  (do not add any quotes around it)
#
#  SUCCESS_LINE = ^MyBox Login:$
#
# (default "login:")
212 213 214 215 216 217 218 219 220
#SUCCESS_LINE = login:

# As the test reads the console, after it hits the SUCCESS_LINE
# the time it waits for the monitor to settle down between reads
# can usually be lowered.
# (in seconds) (default 1)
#BOOTED_TIMEOUT = 1

# The timeout in seconds when we consider the box hung after
221 222 223 224 225
# the console stop producing output. Be sure to leave enough
# time here to get pass a reboot. Some machines may not produce
# any console output for a long time during a reboot. You do
# not want the test to fail just because the system was in
# the process of rebooting to the test kernel.
226 227 228 229
# (default 120)
#TIMEOUT = 120

# The location on the host where to write temp files
230 231
# (default /tmp/ktest)
#TMP_DIR = /tmp/ktest
232 233 234 235 236

# In between tests, a reboot of the box may occur, and this
# is the time to wait for the console after it stops producing
# output. Some machines may not produce a large lag on reboot
# so this should accommodate it.
237 238 239 240 241 242
# The difference between this and TIMEOUT, is that TIMEOUT happens
# when rebooting to the test kernel. This sleep time happens
# after a test has completed and we are about to start running
# another test. If a reboot to the reliable kernel happens,
# we wait SLEEP_TIME for the console to stop producing output
# before starting the next test.
243 244 245 246
# (default 60)
#SLEEP_TIME = 60

# The time in between bisects to sleep (in seconds)
247
# (default 60)
248 249 250 251 252 253 254 255 256 257
#BISECT_SLEEP_TIME = 60

# Build without doing a make mrproper, or removing .config
# (default 0)
#BUILD_NOCLEAN = 0

# Reboot the target box on error (default 0)
#REBOOT_ON_ERROR = 0

# Power off the target on error (ignored if REBOOT_ON_ERROR is set)
258
#  Note, this is a DEFAULT section only option.
259 260 261 262
# (default 0)
#POWEROFF_ON_ERROR = 0

# Power off the target after all tests have completed successfully
263
#  Note, this is a DEFAULT section only option.
264 265 266 267 268 269 270
# (default 0)
#POWEROFF_ON_SUCCESS = 0

# Reboot the target after all test completed successfully (default 1)
# (ignored if POWEROFF_ON_SUCCESS is set)
#REBOOT_ON_SUCCESS = 1

271
# In case there are isses with rebooting, you can specify this
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
# to always powercycle after this amount of time after calling
# reboot.
# Note, POWERCYCLE_AFTER_REBOOT = 0 does NOT disable it. It just
# makes it powercycle immediately after rebooting. Do not define
# it if you do not want it.
# (default undefined)
#POWERCYCLE_AFTER_REBOOT = 5

# In case there's isses with halting, you can specify this
# to always poweroff after this amount of time after calling
# halt.
# Note, POWEROFF_AFTER_HALT = 0 does NOT disable it. It just
# makes it poweroff immediately after halting. Do not define
# it if you do not want it.
# (default undefined)
#POWEROFF_AFTER_HALT = 20

289 290 291 292 293 294 295 296 297 298 299 300
# Stop testing if a build fails. If set, the script will end if
# a failure is detected, otherwise it will save off the .config,
# dmesg and bootlog in a directory called
# MACHINE-TEST_TYPE_BUILD_TYPE-fail-yyyymmddhhmmss
# if the STORE_FAILURES directory is set.
# (default 1)
# Note, even if this is set to zero, there are some errors that still
# stop the tests.
#DIE_ON_FAILURE = 1

# Directory to store failure directories on failure. If this is not
# set, DIE_ON_FAILURE=0 will not save off the .config, dmesg and
301 302
# bootlog. This option is ignored if DIE_ON_FAILURE is not set.
# (default undefined)
303 304
#STORE_FAILURES = /home/test/failures

305
# A script or command to power off the box (default undefined)
306
# Needed for POWEROFF_ON_ERROR and SUCCESS
307
#
308 309
# Example for digital loggers power switch:
#POWER_OFF = wget --no-proxy -O /dev/null -q  --auth-no-challenge 'http://admin:admin@power/outlet?5=OFF'
310
#
311
# Example for a virtual guest call "Guest".
312
#POWER_OFF = virsh destroy Guest
313

314 315
# Any build options for the make of the kernel (not for other makes, like configs)
# (default "")
316 317 318
#BUILD_OPTIONS = -j20

# Optional log file to write the status (recommended)
319 320
#  Note, this is a DEFAULT section only option.
# (default undefined)
321 322 323
#LOG_FILE = /home/test/logfiles/target.log

# Remove old logfile if it exists before starting all tests.
324
#  Note, this is a DEFAULT section only option.
325 326 327 328
# (default 0)
#CLEAR_LOG = 0

# The min config that is needed to build for the machine
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347
# A nice way to create this is with the following:
#
#   $ ssh target
#   $ lsmod > mymods
#   $ scp mymods host:/tmp
#   $ exit
#   $ cd linux.git
#   $ rm .config
#   $ make LSMOD=mymods localyesconfig
#   $ grep '^CONFIG' .config > /home/test/config-min
#
# If you want even less configs:
#
#   log in directly to target (do not ssh)
#
#   $ su
#   # lsmod | cut -d' ' -f1 | xargs rmmod
#
#   repeat the above several times
348
#
349 350 351 352 353 354 355 356 357 358
#   # lsmod > mymods
#   # reboot
#
# May need to reboot to get your network back to copy the mymods
# to the host, and then remove the previous .config and run the
# localyesconfig again. The CONFIG_MIN generated like this will
# not guarantee network activity to the box so the TEST_TYPE of
# test may fail.
#
# You might also want to set:
359 360 361
#   CONFIG_CMDLINE="<your options here>"
#  randconfig may set the above and override your real command
#  line options.
362
# (default undefined)
363 364 365 366 367 368 369 370 371 372 373 374
#MIN_CONFIG = /home/test/config-min

# Sometimes there's options that just break the boot and
# you do not care about. Here are a few:
#   # CONFIG_STAGING is not set
#  Staging drivers are horrible, and can break the build.
#   # CONFIG_SCSI_DEBUG is not set
#  SCSI_DEBUG may change your root partition
#   # CONFIG_KGDB_SERIAL_CONSOLE is not set
#  KGDB may cause oops waiting for a connection that's not there.
# This option points to the file containing config options that will be prepended
# to the MIN_CONFIG (or be the MIN_CONFIG if it is not set)
375 376 377 378
#
# Note, config options in MIN_CONFIG will override these options.
#
# (default undefined)
379 380 381
#ADD_CONFIG = /home/test/config-broken

#### Per test run options ####
382 383
# The following options are only allowed in TEST_START sections.
# They are ignored in the DEFAULTS sections.
384
#
385 386 387
# All of these are optional and undefined by default, although
#  some of these options are required for TEST_TYPE of patchcheck
#  and bisect.
388
#
389 390
#
# CHECKOUT = branch
391 392 393 394
#
#  If the BUILD_DIR is a git repository, then you can set this option
#  to checkout the given branch before running the TEST. If you
#  specify this for the first run, that branch will be used for
395 396
#  all preceding tests until a new CHECKOUT is set.
#
397
#
398 399
#
# For TEST_TYPE = patchcheck
400 401
#
#  This expects the BUILD_DIR to be a git repository, and
402 403 404
#  will checkout the PATCHCHECK_START commit.
#
#  The option BUILD_TYPE will be ignored.
405
#
406 407
#  The MIN_CONFIG will be used for all builds of the patchcheck. The build type
#  used for patchcheck is oldconfig.
408
#
409 410 411
#  PATCHCHECK_START is required and is the first patch to
#   test (the SHA1 of the commit). You may also specify anything
#   that git checkout allows (branch name, tage, HEAD~3).
412
#
413 414 415
#  PATCHCHECK_END is the last patch to check (default HEAD)
#
#  PATCHCHECK_TYPE is required and is the type of test to run:
416 417 418 419 420 421 422 423 424 425 426 427
#      build, boot, test.
#
#   Note, the build test will look for warnings, if a warning occurred
#     in a file that a commit touches, the build will fail.
#
#   If BUILD_NOCLEAN is set, then make mrproper will not be run on
#   any of the builds, just like all other TEST_TYPE tests. But
#   what makes patchcheck different from the other tests, is if
#   BUILD_NOCLEAN is not set, only the first and last patch run
#   make mrproper. This helps speed up the test.
#
# Example:
428 429 430 431 432 433 434
#   TEST_START
#   TEST_TYPE = patchcheck
#   CHECKOUT = mybranch
#   PATCHCHECK_TYPE = boot
#   PATCHCHECK_START = 747e94ae3d1b4c9bf5380e569f614eb9040b79e7
#   PATCHCHEKC_END = HEAD~2
#
435 436
#
#
437
# For TEST_TYPE = bisect
438
#
439 440 441
#  You can specify a git bisect if the BUILD_DIR is a git repository.
#  The MIN_CONFIG will be used for all builds of the bisect. The build type
#  used for bisecting is oldconfig.
442
#
443 444 445
#  The option BUILD_TYPE will be ignored.
#
#  BISECT_TYPE is the type of test to perform:
446 447 448 449
#	build	- bad fails to build
#	boot	- bad builds but fails to boot
#	test	- bad boots but fails a test
#
450 451
# BISECT_GOOD is the commit (SHA1) to label as good (accepts all git good commit types)
# BISECT_BAD is the commit to label as bad (accepts all git bad commit types)
452 453 454
#
# The above three options are required for a bisect operation.
#
455
# BISECT_REPLAY = /path/to/replay/file (optional, default undefined)
456 457 458
#
#   If an operation failed in the bisect that was not expected to
#   fail. Then the test ends. The state of the BUILD_DIR will be
459
#   left off at where the failure occurred. You can examine the
460 461 462 463 464
#   reason for the failure, and perhaps even find a git commit
#   that would work to continue with. You can run:
#
#   git bisect log > /path/to/replay/file
#
465
#   The adding:
466
#
467
#    BISECT_REPLAY= /path/to/replay/file
468
#
469 470 471 472
#   And running the test again. The test will perform the initial
#    git bisect start, git bisect good, and git bisect bad, and
#    then it will run git bisect replay on this file, before
#    continuing with the bisect.
473
#
474 475 476 477 478 479 480 481
# BISECT_START = commit (optional, default undefined)
#
#   As with BISECT_REPLAY, if the test failed on a commit that
#   just happen to have a bad commit in the middle of the bisect,
#   and you need to skip it. If BISECT_START is defined, it
#   will checkout that commit after doing the initial git bisect start,
#   git bisect good, git bisect bad, and running the git bisect replay
#   if the BISECT_REPLAY is set.
482
#
483
# BISECT_REVERSE = 1 (optional, default 0)
484 485 486
#
#   In those strange instances where it was broken forever
#   and you are trying to find where it started to work!
487 488 489 490
#   Set BISECT_GOOD to the commit that was last known to fail
#   Set BISECT_BAD to the commit that is known to start working.
#   With BISECT_REVERSE = 1, The test will consider failures as
#   good, and success as bad.
491
#
492
# BISECT_CHECK = 1 (optional, default 0)
493 494
#
#   Just to be sure the good is good and bad is bad, setting
495 496 497 498
#   BISECT_CHECK to 1 will start the bisect by first checking
#   out BISECT_BAD and makes sure it fails, then it will check
#   out BISECT_GOOD and makes sure it succeeds before starting
#   the bisect (it works for BISECT_REVERSE too).
499
#
500 501 502
#   You can limit the test to just check BISECT_GOOD or
#   BISECT_BAD with BISECT_CHECK = good or
#   BISECT_CHECK = bad, respectively.
503 504
#
# Example:
505 506 507 508 509 510
#   TEST_START
#   TEST_TYPE = bisect
#   BISECT_GOOD = v2.6.36
#   BISECT_BAD = b5153163ed580e00c67bdfecb02b2e3843817b3e
#   BISECT_TYPE = build
#   MIN_CONFIG = /home/test/config-bisect