Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    1) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    2) # Config file for ktest.pl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    3) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    4) # Place your customized version of this, in the working directory that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    5) # ktest.pl is run from. By default, ktest.pl will look for a file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    6) # called "ktest.conf", but you can name it anything you like and specify
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    7) # the name of your config file as the first argument of ktest.pl.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    8) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    9) # Note, all paths must be absolute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   10) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   12) # Options set in the beginning of the file are considered to be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   13) # default options. These options can be overridden by test specific
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   14) # options, with the following exceptions:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   15) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   16) #  LOG_FILE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   17) #  CLEAR_LOG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   18) #  POWEROFF_ON_SUCCESS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   19) #  REBOOT_ON_SUCCESS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   20) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   21) # Test specific options are set after the label:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   22) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   23) # TEST_START
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   24) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   25) # The options after a TEST_START label are specific to that test.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   26) # Each TEST_START label will set up a new test. If you want to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   27) # perform a test more than once, you can add the ITERATE label
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   28) # to it followed by the number of times you want that test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   29) # to iterate. If the ITERATE is left off, the test will only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   30) # be performed once.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   31) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   32) # TEST_START ITERATE 10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   33) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   34) # You can skip a test by adding SKIP (before or after the ITERATE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   35) # and number)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   36) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   37) # TEST_START SKIP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   38) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   39) # TEST_START SKIP ITERATE 10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   40) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   41) # TEST_START ITERATE 10 SKIP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   42) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   43) # The SKIP label causes the options and the test itself to be ignored.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   44) # This is useful to set up several different tests in one config file, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   45) # only enabling the ones you want to use for a current test run.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   46) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   47) # You can add default options anywhere in the file as well
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   48) # with the DEFAULTS tag. This allows you to have default options
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   49) # after the test options to keep the test options at the top
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   50) # of the file. You can even place the DEFAULTS tag between
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   51) # test cases (but not in the middle of a single test case)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   52) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   53) # TEST_START
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   54) # MIN_CONFIG = /home/test/config-test1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   55) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   56) # DEFAULTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   57) # MIN_CONFIG = /home/test/config-default
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   58) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   59) # TEST_START ITERATE 10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   60) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   61) # The above will run the first test with MIN_CONFIG set to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   62) # /home/test/config-test-1. Then 10 tests will be executed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   63) # with MIN_CONFIG with /home/test/config-default.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   64) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   65) # You can also disable defaults with the SKIP option
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   66) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   67) # DEFAULTS SKIP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   68) # MIN_CONFIG = /home/test/config-use-sometimes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   69) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   70) # DEFAULTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   71) # MIN_CONFIG = /home/test/config-most-times
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   72) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   73) # The above will ignore the first MIN_CONFIG. If you want to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   74) # use the first MIN_CONFIG, remove the SKIP from the first
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   75) # DEFAULTS tag and add it to the second. Be careful, options
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   76) # may only be declared once per test or default. If you have
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   77) # the same option name under the same test or as default
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   78) # ktest will fail to execute, and no tests will run.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   79) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   80) # DEFAULTS OVERRIDE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   81) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   82) # Options defined in the DEFAULTS section can not be duplicated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   83) # even if they are defined in two different DEFAULT sections.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   84) # This is done to catch mistakes where an option is added but
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   85) # the previous option was forgotten about and not commented.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   86) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   87) # The OVERRIDE keyword can be added to a section to allow this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   88) # section to override other DEFAULT sections values that have
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   89) # been defined previously. It will only override options that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   90) # have been defined before its use. Options defined later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   91) # in a non override section will still error. The same option
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   92) # can not be defined in the same section even if that section
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   93) # is marked OVERRIDE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   94) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   95) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   96) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   97) # Both TEST_START and DEFAULTS sections can also have the IF keyword
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   98) # The value after the IF must evaluate into a 0 or non 0 positive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   99) # integer, and can use the config variables (explained below).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  100) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  101) # DEFAULTS IF ${IS_X86_32}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  102) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  103) # The above will process the DEFAULTS section if the config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  104) # variable IS_X86_32 evaluates to a non zero positive integer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  105) # otherwise if it evaluates to zero, it will act the same
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  106) # as if the SKIP keyword was used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  107) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  108) # The ELSE keyword can be used directly after a section with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  109) # a IF statement.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  110) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  111) # TEST_START IF ${RUN_NET_TESTS}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  112) # BUILD_TYPE = useconfig:${CONFIG_DIR}/config-network
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  113) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  114) # ELSE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  115) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  116) # BUILD_TYPE = useconfig:${CONFIG_DIR}/config-normal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  117) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  118) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  119) # The ELSE keyword can also contain an IF statement to allow multiple
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  120) # if then else sections. But all the sections must be either
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  121) # DEFAULT or TEST_START, they can not be a mixture.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  122) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  123) # TEST_START IF ${RUN_NET_TESTS}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  124) # BUILD_TYPE = useconfig:${CONFIG_DIR}/config-network
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  125) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  126) # ELSE IF ${RUN_DISK_TESTS}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  127) # BUILD_TYPE = useconfig:${CONFIG_DIR}/config-tests
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  128) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  129) # ELSE IF ${RUN_CPU_TESTS}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  130) # BUILD_TYPE = useconfig:${CONFIG_DIR}/config-cpu
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  131) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  132) # ELSE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  133) # BUILD_TYPE = useconfig:${CONFIG_DIR}/config-network
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  134) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  135) # The if statement may also have comparisons that will and for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  136) # == and !=, strings may be used for both sides.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  137) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  138) # BOX_TYPE := x86_32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  139) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  140) # DEFAULTS IF ${BOX_TYPE} == x86_32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  141) # BUILD_TYPE = useconfig:${CONFIG_DIR}/config-32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  142) # ELSE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  143) # BUILD_TYPE = useconfig:${CONFIG_DIR}/config-64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  144) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  145) # The DEFINED keyword can be used by the IF statements too.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  146) # It returns true if the given config variable or option has been defined
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  147) # or false otherwise.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  148) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  149) # 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  150) # DEFAULTS IF DEFINED USE_CC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  151) # CC := ${USE_CC}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  152) # ELSE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  153) # CC := gcc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  154) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  155) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  156) # As well as NOT DEFINED.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  157) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  158) # DEFAULTS IF NOT DEFINED MAKE_CMD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  159) # MAKE_CMD := make ARCH=x86
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  160) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  161) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  162) # And/or ops (&&,||) may also be used to make complex conditionals.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  163) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  164) # TEST_START IF (DEFINED ALL_TESTS || ${MYTEST} == boottest) && ${MACHINE} == gandalf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  165) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  166) # Notice the use of parentheses. Without any parentheses the above would be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  167) # processed the same as:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  168) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  169) # TEST_START IF DEFINED ALL_TESTS || (${MYTEST} == boottest && ${MACHINE} == gandalf)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  170) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  171) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  172) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  173) # INCLUDE file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  174) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  175) # The INCLUDE keyword may be used in DEFAULT sections. This will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  176) # read another config file and process that file as well. The included
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  177) # file can include other files, add new test cases or default
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  178) # statements. Config variables will be passed to these files and changes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  179) # to config variables will be seen by top level config files. Including
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  180) # a file is processed just like the contents of the file was cut and pasted
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  181) # into the top level file, except, that include files that end with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  182) # TEST_START sections will have that section ended at the end of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  183) # the include file. That is, an included file is included followed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  184) # by another DEFAULT keyword.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  185) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  186) # Unlike other files referenced in this config, the file path does not need
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  187) # to be absolute. If the file does not start with '/', then the directory
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  188) # that the current config file was located in is used. If no config by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  189) # given name is found there, then the current directory is searched.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  190) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  191) # INCLUDE myfile
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  192) # DEFAULT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  193) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  194) # is the same as:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  195) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  196) # INCLUDE myfile
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  197) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  198) # Note, if the include file does not contain a full path, the file is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  199) # searched first by the location of the original include file, and then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  200) # by the location that ktest.pl was executed in.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  201) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  202) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  203) #### Config variables ####
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  204) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  205) # This config file can also contain "config variables".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  206) # These are assigned with ":=" instead of the ktest option
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  207) # assignment "=".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  208) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  209) # The difference between ktest options and config variables
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  210) # is that config variables can be used multiple times,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  211) # where each instance will override the previous instance.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  212) # And that they only live at time of processing this config.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  213) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  214) # The advantage to config variables are that they can be used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  215) # by any option or any other config variables to define thing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  216) # that you may use over and over again in the options.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  217) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  218) # For example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  219) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  220) # USER      := root
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  221) # TARGET    := mybox
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  222) # TEST_CASE := ssh ${USER}@${TARGET} /path/to/my/test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  223) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  224) # TEST_START
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  225) # MIN_CONFIG = config1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  226) # TEST = ${TEST_CASE}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  227) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  228) # TEST_START
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  229) # MIN_CONFIG = config2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  230) # TEST = ${TEST_CASE}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  231) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  232) # TEST_CASE := ssh ${USER}@${TARGET} /path/to/my/test2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  233) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  234) # TEST_START
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  235) # MIN_CONFIG = config1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  236) # TEST = ${TEST_CASE}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  237) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  238) # TEST_START
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  239) # MIN_CONFIG = config2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  240) # TEST = ${TEST_CASE}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  241) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  242) # TEST_DIR := /home/me/test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  243) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  244) # BUILD_DIR = ${TEST_DIR}/linux.git
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  245) # OUTPUT_DIR = ${TEST_DIR}/test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  246) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  247) # Note, the config variables are evaluated immediately, thus
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  248) # updating TARGET after TEST_CASE has been assigned does nothing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  249) # to TEST_CASE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  250) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  251) # As shown in the example, to evaluate a config variable, you
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  252) # use the ${X} convention. Simple $X will not work.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  253) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  254) # If the config variable does not exist, the ${X} will not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  255) # be evaluated. Thus:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  256) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  257) # MAKE_CMD = PATH=/mypath:${PATH} make
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  258) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  259) # If PATH is not a config variable, then the ${PATH} in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  260) # the MAKE_CMD option will be evaluated by the shell when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  261) # the MAKE_CMD option is passed into shell processing.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  262) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  263) #### Using options in other options ####
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  264) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  265) # Options that are defined in the config file may also be used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  266) # by other options. All options are evaluated at time of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  267) # use (except that config variables are evaluated at config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  268) # processing time).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  269) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  270) # If an ktest option is used within another option, instead of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  271) # typing it again in that option you can simply use the option
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  272) # just like you can config variables.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  273) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  274) # MACHINE = mybox
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  275) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  276) # TEST = ssh root@${MACHINE} /path/to/test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  277) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  278) # The option will be used per test case. Thus:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  279) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  280) # TEST_TYPE = test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  281) # TEST = ssh root@{MACHINE}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  282) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  283) # TEST_START
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  284) # MACHINE = box1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  285) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  286) # TEST_START
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  287) # MACHINE = box2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  288) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  289) # For both test cases, MACHINE will be evaluated at the time
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  290) # of the test case. The first test will run ssh root@box1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  291) # and the second will run ssh root@box2.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  292) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  293) #### Mandatory Default Options ####
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  294) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  295) # These options must be in the default section, although most
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  296) # may be overridden by test options.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  297) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  298) # The machine hostname that you will test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  299) #MACHINE = target
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  300) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  301) # The box is expected to have ssh on normal bootup, provide the user
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  302) #  (most likely root, since you need privileged operations)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  303) #SSH_USER = root
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  304) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  305) # The directory that contains the Linux source code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  306) #BUILD_DIR = /home/test/linux.git
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  307) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  308) # The directory that the objects will be built
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  309) # (can not be same as BUILD_DIR)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  310) #OUTPUT_DIR = /home/test/build/target
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  311) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  312) # The location of the compiled file to copy to the target
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  313) # (relative to OUTPUT_DIR)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  314) #BUILD_TARGET = arch/x86/boot/bzImage
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  315) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  316) # The place to put your image on the test machine
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  317) #TARGET_IMAGE = /boot/vmlinuz-test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  318) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  319) # A script or command to reboot the box
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  320) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  321) # Here is a digital loggers power switch example
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  322) #POWER_CYCLE = wget --no-proxy -O /dev/null -q  --auth-no-challenge 'http://admin:admin@power/outlet?5=CCL'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  323) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  324) # Here is an example to reboot a virtual box on the current host
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  325) # with the name "Guest".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  326) #POWER_CYCLE = virsh destroy Guest; sleep 5; virsh start Guest
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  327) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  328) # The script or command that reads the console
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  329) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  330) #  If you use ttywatch server, something like the following would work.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  331) #CONSOLE = nc -d localhost 3001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  332) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  333) # For a virtual machine with guest name "Guest".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  334) #CONSOLE =  virsh console Guest
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  335) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  336) # Signal to send to kill console.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  337) # ktest.pl will create a child process to monitor the console.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  338) # When the console is finished, ktest will kill the child process
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  339) # with this signal.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  340) # (default INT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  341) #CLOSE_CONSOLE_SIGNAL = HUP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  342) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  343) # Required version ending to differentiate the test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  344) # from other linux builds on the system.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  345) #LOCALVERSION = -test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  346) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  347) # For REBOOT_TYPE = grub2, you must specify where the grub.cfg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  348) # file is. This is the file that is searched to find the menu
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  349) # option to boot to with GRUB_REBOOT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  350) #GRUB_FILE = /boot/grub2/grub.cfg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  351) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  352) # The tool for REBOOT_TYPE = grub2 or grub2bls to set the next reboot kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  353) # to boot into (one shot mode).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  354) # (default grub2_reboot)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  355) #GRUB_REBOOT = grub2_reboot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  356) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  357) # The grub title name for the test kernel to boot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  358) # (Only mandatory if REBOOT_TYPE = grub or grub2 or grub2bls)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  359) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  360) # Note, ktest.pl will not update the grub menu.lst, you need to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  361) # manually add an option for the test. ktest.pl will search
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  362) # the grub menu.lst for this option to find what kernel to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  363) # reboot into.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  364) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  365) # For example, if in the /boot/grub/menu.lst the test kernel title has:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  366) # title Test Kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  367) # kernel vmlinuz-test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  368) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  369) # For grub2, a search of top level "menuentry"s are done. No
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  370) # submenu is searched. The menu is found by searching for the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  371) # contents of GRUB_MENU in the line that starts with "menuentry".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  372) # You may want to include the quotes around the option. For example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  373) # for: menuentry 'Test Kernel'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  374) # do a: GRUB_MENU = 'Test Kernel'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  375) # For customizing, add your entry in /etc/grub.d/40_custom.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  376) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  377) # For grub2bls, a search of "title"s are done. The menu is found
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  378) # by searching for the contents of GRUB_MENU in the line that starts
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  379) # with "title".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  380) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  381) #GRUB_MENU = Test Kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  382) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  383) # For REBOOT_TYPE = syslinux, the name of the syslinux executable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  384) # (on the target) to use to set up the next reboot to boot the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  385) # test kernel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  386) # (default extlinux)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  387) #SYSLINUX = syslinux
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  388) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  389) # For REBOOT_TYPE = syslinux, the path that is passed to to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  390) # syslinux command where syslinux is installed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  391) # (default /boot/extlinux)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  392) #SYSLINUX_PATH = /boot/syslinux
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  393) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  394) # For REBOOT_TYPE = syslinux, the syslinux label that references the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  395) # test kernel in the syslinux config file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  396) # (default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  397) #SYSLINUX_LABEL = "test-kernel"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  398) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  399) # A script to reboot the target into the test kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  400) # This and SWITCH_TO_TEST are about the same, except
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  401) # SWITCH_TO_TEST is run even for REBOOT_TYPE = grub.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  402) # This may be left undefined.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  403) # (default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  404) #REBOOT_SCRIPT =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  405) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  406) #### Optional Config Options (all have defaults) ####
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  407) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  408) # Email options for receiving notifications. Users must setup
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  409) # the specified mailer prior to using this feature.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  410) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  411) # (default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  412) #MAILTO =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  413) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  414) # Supported mailers: sendmail, mail, mailx
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  415) # (default sendmail)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  416) #MAILER = sendmail
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  417) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  418) # The executable to run
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  419) # (default: for sendmail "/usr/sbin/sendmail", otherwise equals ${MAILER})
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  420) #MAIL_EXEC = /usr/sbin/sendmail
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  421) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  422) # The command used to send mail, which uses the above options
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  423) # can be modified. By default if the mailer is "sendmail" then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  424) #  MAIL_COMMAND = echo \'Subject: $SUBJECT\n\n$MESSAGE\' | $MAIL_PATH/$MAILER -t $MAILTO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  425) # For mail or mailx:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  426) #  MAIL_COMMAND = "$MAIL_PATH/$MAILER -s \'$SUBJECT\' $MAILTO <<< \'$MESSAGE\'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  427) # ktest.pl will do the substitution for MAIL_PATH, MAILER, MAILTO at the time
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  428) #    it sends the mail if "$FOO" format is used. If "${FOO}" format is used,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  429) #    then the substitutions will occur at the time the config file is read.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  430) #    But note, MAIL_PATH and MAILER require being set by the config file if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  431) #     ${MAIL_PATH} or ${MAILER} are used, but not if $MAIL_PATH or $MAILER are.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  432) #MAIL_COMMAND = echo \'Subject: $SUBJECT\n\n$MESSAGE\' | $MAIL_PATH/$MAILER -t $MAILTO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  433) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  434) # Errors are defined as those would terminate the script
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  435) # (default 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  436) #EMAIL_ON_ERROR = 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  437) # (default 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  438) #EMAIL_WHEN_FINISHED = 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  439) # (default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  440) #EMAIL_WHEN_STARTED = 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  441) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  442) # Users can cancel the test by Ctrl^C
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  443) # (default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  444) #EMAIL_WHEN_CANCELED = 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  445) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  446) # If a test ends with an error and EMAIL_ON_ERROR is set as well
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  447) # as a LOG_FILE is defined, then the log of the failing test will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  448) # be included in the email that is sent.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  449) # It is possible that the log may be very large, in which case,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  450) # only the last amount of the log should be sent. To limit how
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  451) # much of the log is sent, set MAIL_MAX_SIZE. This will be the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  452) # size in bytes of the last portion of the log of the failed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  453) # test file. That is, if this is set to 100000, then only the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  454) # last 100 thousand bytes of the log file will be included in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  455) # the email.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  456) # (default undef)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  457) #MAIL_MAX_SIZE = 1000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  458) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  459) # Start a test setup. If you leave this off, all options
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  460) # will be default and the test will run once.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  461) # This is a label and not really an option (it takes no value).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  462) # You can append ITERATE and a number after it to iterate the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  463) # test a number of times, or SKIP to ignore this test.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  464) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  465) #TEST_START
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  466) #TEST_START ITERATE 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  467) #TEST_START SKIP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  468) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  469) # Have the following options as default again. Used after tests
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  470) # have already been defined by TEST_START. Optionally, you can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  471) # just define all default options before the first TEST_START
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  472) # and you do not need this option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  473) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  474) # This is a label and not really an option (it takes no value).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  475) # You can append SKIP to this label and the options within this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  476) # section will be ignored.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  477) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  478) # DEFAULTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  479) # DEFAULTS SKIP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  480) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  481) # If you want to execute some command before the first test runs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  482) # you can set this option. Note, it can be set as a default option
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  483) # or an option in the first test case. All other test cases will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  484) # ignore it. If both the default and first test have this option
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  485) # set, then the first test will take precedence.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  486) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  487) # default (undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  488) #PRE_KTEST = ${SSH} ~/set_up_test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  489) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  490) # If you want to execute some command after all the tests have
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  491) # completed, you can set this option. Note, it can be set as a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  492) # default or any test case can override it. If multiple test cases
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  493) # set this option, then the last test case that set it will take
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  494) # precedence
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  495) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  496) # default (undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  497) #POST_KTEST = ${SSH} ~/dismantle_test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  498) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  499) # If you want to remove the kernel entry in Boot Loader Specification (BLS)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  500) # environment, use kernel-install command.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  501) # Here's the example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  502) #POST_KTEST = ssh root@Test "/usr/bin/kernel-install remove $KERNEL_VERSION"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  503) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  504) # The default test type (default test)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  505) # The test types may be:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  506) #   build   - only build the kernel, do nothing else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  507) #   install - build and install, but do nothing else (does not reboot)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  508) #   boot    - build, install, and boot the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  509) #   test    - build, boot and if TEST is set, run the test script
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  510) #          (If TEST is not set, it defaults back to boot)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  511) #   bisect - Perform a bisect on the kernel (see BISECT_TYPE below)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  512) #   patchcheck - Do a test on a series of commits in git (see PATCHCHECK below)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  513) #TEST_TYPE = test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  514) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  515) # Test to run if there is a successful boot and TEST_TYPE is test.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  516) # Must exit with 0 on success and non zero on error
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  517) # default (undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  518) #TEST = ssh user@machine /root/run_test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  519) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  520) # The build type is any make config type or special command
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  521) #  (default oldconfig)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  522) #   nobuild - skip the clean and build step
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  523) #   useconfig:/path/to/config - use the given config and run
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  524) #              oldconfig on it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  525) # This option is ignored if TEST_TYPE is patchcheck or bisect
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  526) #BUILD_TYPE = randconfig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  527) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  528) # The make command (default make)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  529) # If you are building a 32bit x86 on a 64 bit host
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  530) #MAKE_CMD = CC=i386-gcc AS=i386-as make ARCH=i386
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  531) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  532) # Any build options for the make of the kernel (not for other makes, like configs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  533) # (default "")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  534) #BUILD_OPTIONS = -j20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  535) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  536) # If you need to do some special handling before installing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  537) # you can add a script with this option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  538) # The environment variable KERNEL_VERSION will be set to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  539) # kernel version that is used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  540) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  541) # default (undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  542) #PRE_INSTALL = ssh user@target rm -rf '/lib/modules/*-test*'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  543) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  544) # If you need an initrd, you can add a script or code here to install
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  545) # it. The environment variable KERNEL_VERSION will be set to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  546) # kernel version that is used. Remember to add the initrd line
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  547) # to your grub menu.lst file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  548) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  549) # Here's a couple of examples to use:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  550) #POST_INSTALL = ssh user@target /sbin/mkinitrd --allow-missing -f /boot/initramfs-test.img $KERNEL_VERSION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  551) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  552) # or on some systems:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  553) #POST_INSTALL = ssh user@target /sbin/dracut -f /boot/initramfs-test.img $KERNEL_VERSION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  554) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  555) # If you want to add the kernel entry in Boot Loader Specification (BLS)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  556) # environment, use kernel-install command.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  557) # Here's the example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  558) #POST_INSTALL = ssh root@Test "/usr/bin/kernel-install add $KERNEL_VERSION /boot/vmlinuz-$KERNEL_VERSION"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  559) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  560) # If for some reason you just want to boot the kernel and you do not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  561) # want the test to install anything new. For example, you may just want
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  562) # to boot test the same kernel over and over and do not want to go through
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  563) # the hassle of installing anything, you can set this option to 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  564) # (default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  565) #NO_INSTALL = 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  566) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  567) # If there is a command that you want to run before the individual test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  568) # case executes, then you can set this option
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  569) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  570) # default (undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  571) #PRE_TEST = ${SSH} reboot_to_special_kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  572) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  573) # To kill the entire test if PRE_TEST is defined but fails set this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  574) # to 1.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  575) # (default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  576) #PRE_TEST_DIE = 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  577) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  578) # If there is a command you want to run after the individual test case
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  579) # completes, then you can set this option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  580) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  581) # default (undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  582) #POST_TEST = cd ${BUILD_DIR}; git reset --hard
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  583) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  584) # If there is a script that you require to run before the build is done
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  585) # you can specify it with PRE_BUILD.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  586) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  587) # One example may be if you must add a temporary patch to the build to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  588) # fix a unrelated bug to perform a patchcheck test. This will apply the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  589) # patch before each build that is made. Use the POST_BUILD to do a git reset --hard
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  590) # to remove the patch.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  591) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  592) # (default undef)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  593) #PRE_BUILD = cd ${BUILD_DIR} && patch -p1 < /tmp/temp.patch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  594) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  595) # To specify if the test should fail if the PRE_BUILD fails,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  596) # PRE_BUILD_DIE needs to be set to 1. Otherwise the PRE_BUILD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  597) # result is ignored.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  598) # (default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  599) # PRE_BUILD_DIE = 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  600) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  601) # If there is a script that should run after the build is done
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  602) # you can specify it with POST_BUILD.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  603) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  604) # As the example in PRE_BUILD, POST_BUILD can be used to reset modifications
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  605) # made by the PRE_BUILD.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  606) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  607) # (default undef)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  608) #POST_BUILD = cd ${BUILD_DIR} && git reset --hard
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  609) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  610) # To specify if the test should fail if the POST_BUILD fails,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  611) # POST_BUILD_DIE needs to be set to 1. Otherwise the POST_BUILD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  612) # result is ignored.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  613) # (default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  614) #POST_BUILD_DIE = 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  615) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  616) # Way to reboot the box to the test kernel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  617) # Only valid options so far are "grub", "grub2", "syslinux" and "script"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  618) # (default grub)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  619) # If you specify grub, it will assume grub version 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  620) # and will search in /boot/grub/menu.lst for the title $GRUB_MENU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  621) # and select that target to reboot to the kernel. If this is not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  622) # your setup, then specify "script" and have a command or script
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  623) # specified in REBOOT_SCRIPT to boot to the target.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  624) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  625) # For REBOOT_TYPE = grub2, you must define both GRUB_MENU and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  626) # GRUB_FILE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  627) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  628) # For REBOOT_TYPE = grub2bls, you must define GRUB_MENU.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  629) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  630) # For REBOOT_TYPE = syslinux, you must define SYSLINUX_LABEL, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  631) # perhaps modify SYSLINUX (default extlinux) and SYSLINUX_PATH
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  632) # (default /boot/extlinux)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  633) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  634) # The entry in /boot/grub/menu.lst must be entered in manually.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  635) # The test will not modify that file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  636) #REBOOT_TYPE = grub
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  637) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  638) # If you are using a machine that doesn't boot with grub, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  639) # perhaps gets its kernel from a remote server (tftp), then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  640) # you can use this option to update the target image with the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  641) # test image.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  642) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  643) # You could also do the same with POST_INSTALL, but the difference
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  644) # between that option and this option is that POST_INSTALL runs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  645) # after the install, where this one runs just before a reboot.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  646) # (default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  647) #SWITCH_TO_TEST = cp ${OUTPUT_DIR}/${BUILD_TARGET} ${TARGET_IMAGE}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  648) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  649) # If you are using a machine that doesn't boot with grub, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  650) # perhaps gets its kernel from a remote server (tftp), then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  651) # you can use this option to update the target image with the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  652) # the known good image to reboot safely back into.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  653) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  654) # This option holds a command that will execute before needing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  655) # to reboot to a good known image.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  656) # (default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  657) #SWITCH_TO_GOOD = ssh ${SSH_USER}/${MACHINE} cp good_image ${TARGET_IMAGE}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  658) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  659) # The min config that is needed to build for the machine
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  660) # A nice way to create this is with the following:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  661) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  662) #   $ ssh target
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  663) #   $ lsmod > mymods
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  664) #   $ scp mymods host:/tmp
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  665) #   $ exit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  666) #   $ cd linux.git
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  667) #   $ rm .config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  668) #   $ make LSMOD=mymods localyesconfig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  669) #   $ grep '^CONFIG' .config > /home/test/config-min
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  670) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  671) # If you want even less configs:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  672) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  673) #   log in directly to target (do not ssh)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  674) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  675) #   $ su
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  676) #   # lsmod | cut -d' ' -f1 | xargs rmmod
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  677) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  678) #   repeat the above several times
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  679) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  680) #   # lsmod > mymods
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  681) #   # reboot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  682) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  683) # May need to reboot to get your network back to copy the mymods
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  684) # to the host, and then remove the previous .config and run the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  685) # localyesconfig again. The CONFIG_MIN generated like this will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  686) # not guarantee network activity to the box so the TEST_TYPE of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  687) # test may fail.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  688) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  689) # You might also want to set:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  690) #   CONFIG_CMDLINE="<your options here>"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  691) #  randconfig may set the above and override your real command
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  692) #  line options.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  693) # (default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  694) #MIN_CONFIG = /home/test/config-min
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  695) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  696) # Sometimes there's options that just break the boot and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  697) # you do not care about. Here are a few:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  698) #   # CONFIG_STAGING is not set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  699) #  Staging drivers are horrible, and can break the build.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  700) #   # CONFIG_SCSI_DEBUG is not set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  701) #  SCSI_DEBUG may change your root partition
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  702) #   # CONFIG_KGDB_SERIAL_CONSOLE is not set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  703) #  KGDB may cause oops waiting for a connection that's not there.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  704) # This option points to the file containing config options that will be prepended
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  705) # to the MIN_CONFIG (or be the MIN_CONFIG if it is not set)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  706) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  707) # Note, config options in MIN_CONFIG will override these options.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  708) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  709) # (default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  710) #ADD_CONFIG = /home/test/config-broken
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  711) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  712) # The location on the host where to write temp files
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  713) # (default /tmp/ktest/${MACHINE})
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  714) #TMP_DIR = /tmp/ktest/${MACHINE}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  715) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  716) # Optional log file to write the status (recommended)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  717) #  Note, this is a DEFAULT section only option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  718) # (default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  719) #LOG_FILE = /home/test/logfiles/target.log
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  720) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  721) # Remove old logfile if it exists before starting all tests.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  722) #  Note, this is a DEFAULT section only option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  723) # (default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  724) #CLEAR_LOG = 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  725) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  726) # Line to define a successful boot up in console output.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  727) # This is what the line contains, not the entire line. If you need
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  728) # the entire line to match, then use regular expression syntax like:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  729) #  (do not add any quotes around it)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  730) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  731) #  SUCCESS_LINE = ^MyBox Login:$
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  732) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  733) # (default "login:")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  734) #SUCCESS_LINE = login:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  735) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  736) # To speed up between reboots, defining a line that the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  737) # default kernel produces that represents that the default
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  738) # kernel has successfully booted and can be used to pass
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  739) # a new test kernel to it. Otherwise ktest.pl will wait till
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  740) # SLEEP_TIME to continue.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  741) # (default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  742) #REBOOT_SUCCESS_LINE = login:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  743) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  744) # In case the console constantly fills the screen, having
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  745) # a specified time to stop the test after success is recommended.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  746) # (in seconds)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  747) # (default 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  748) #STOP_AFTER_SUCCESS = 10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  749) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  750) # In case the console constantly fills the screen, having
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  751) # a specified time to stop the test after failure is recommended.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  752) # (in seconds)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  753) # (default 60)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  754) #STOP_AFTER_FAILURE = 60
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  755) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  756) # In case the console constantly fills the screen, having
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  757) # a specified time to stop the test if it never succeeds nor fails
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  758) # is recommended.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  759) # Note: this is ignored if a success or failure is detected.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  760) # (in seconds)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  761) # (default 600, -1 is to never stop)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  762) #STOP_TEST_AFTER = 600
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  763) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  764) # Stop testing if a build fails. If set, the script will end if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  765) # a failure is detected, otherwise it will save off the .config,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  766) # dmesg and bootlog in a directory called
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  767) # MACHINE-TEST_TYPE_BUILD_TYPE-fail-yyyymmddhhmmss
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  768) # if the STORE_FAILURES directory is set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  769) # (default 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  770) # Note, even if this is set to zero, there are some errors that still
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  771) # stop the tests.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  772) #DIE_ON_FAILURE = 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  773) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  774) # Directory to store failure directories on failure. If this is not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  775) # set, DIE_ON_FAILURE=0 will not save off the .config, dmesg and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  776) # bootlog. This option is ignored if DIE_ON_FAILURE is not set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  777) # (default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  778) #STORE_FAILURES = /home/test/failures
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  779) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  780) # Directory to store success directories on success. If this is not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  781) # set, the .config, dmesg and bootlog will not be saved if a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  782) # test succeeds.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  783) # (default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  784) #STORE_SUCCESSES = /home/test/successes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  785) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  786) # Build without doing a make mrproper, or removing .config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  787) # (default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  788) #BUILD_NOCLEAN = 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  789) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  790) # As the test reads the console, after it hits the SUCCESS_LINE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  791) # the time it waits for the monitor to settle down between reads
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  792) # can usually be lowered.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  793) # (in seconds) (default 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  794) #BOOTED_TIMEOUT = 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  795) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  796) # The timeout in seconds when we consider the box hung after
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  797) # the console stop producing output. Be sure to leave enough
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  798) # time here to get pass a reboot. Some machines may not produce
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  799) # any console output for a long time during a reboot. You do
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  800) # not want the test to fail just because the system was in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  801) # the process of rebooting to the test kernel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  802) # (default 120)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  803) #TIMEOUT = 120
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  804) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  805) # The timeout in seconds when to test if the box can be rebooted
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  806) # or not. Before issuing the reboot command, a ssh connection
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  807) # is attempted to see if the target machine is still active.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  808) # If the target does not connect within this timeout, a power cycle
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  809) # is issued instead of a reboot.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  810) # CONNECT_TIMEOUT = 25
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  811) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  812) # In between tests, a reboot of the box may occur, and this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  813) # is the time to wait for the console after it stops producing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  814) # output. Some machines may not produce a large lag on reboot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  815) # so this should accommodate it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  816) # The difference between this and TIMEOUT, is that TIMEOUT happens
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  817) # when rebooting to the test kernel. This sleep time happens
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  818) # after a test has completed and we are about to start running
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  819) # another test. If a reboot to the reliable kernel happens,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  820) # we wait SLEEP_TIME for the console to stop producing output
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  821) # before starting the next test.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  822) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  823) # You can speed up reboot times even more by setting REBOOT_SUCCESS_LINE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  824) # (default 60)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  825) #SLEEP_TIME = 60
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  826) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  827) # The time in between bisects to sleep (in seconds)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  828) # (default 60)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  829) #BISECT_SLEEP_TIME = 60
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  830) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  831) # The max wait time (in seconds) for waiting for the console to finish.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  832) # If for some reason, the console is outputting content without
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  833) # ever finishing, this will cause ktest to get stuck. This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  834) # option is the max time ktest will wait for the monitor (console)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  835) # to settle down before continuing.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  836) # (default 1800)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  837) #MAX_MONITOR_WAIT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  838) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  839) # The time in between patch checks to sleep (in seconds)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  840) # (default 60)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  841) #PATCHCHECK_SLEEP_TIME = 60
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  842) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  843) # Reboot the target box on error (default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  844) #REBOOT_ON_ERROR = 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  845) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  846) # Power off the target on error (ignored if REBOOT_ON_ERROR is set)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  847) #  Note, this is a DEFAULT section only option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  848) # (default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  849) #POWEROFF_ON_ERROR = 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  850) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  851) # Power off the target after all tests have completed successfully
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  852) #  Note, this is a DEFAULT section only option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  853) # (default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  854) #POWEROFF_ON_SUCCESS = 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  855) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  856) # Reboot the target after all test completed successfully (default 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  857) # (ignored if POWEROFF_ON_SUCCESS is set)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  858) #REBOOT_ON_SUCCESS = 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  859) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  860) # In case there are issues with rebooting, you can specify this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  861) # to always powercycle after this amount of time after calling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  862) # reboot.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  863) # Note, POWERCYCLE_AFTER_REBOOT = 0 does NOT disable it. It just
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  864) # makes it powercycle immediately after rebooting. Do not define
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  865) # it if you do not want it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  866) # (default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  867) #POWERCYCLE_AFTER_REBOOT = 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  868) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  869) # In case there's issues with halting, you can specify this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  870) # to always poweroff after this amount of time after calling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  871) # halt.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  872) # Note, POWEROFF_AFTER_HALT = 0 does NOT disable it. It just
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  873) # makes it poweroff immediately after halting. Do not define
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  874) # it if you do not want it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  875) # (default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  876) #POWEROFF_AFTER_HALT = 20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  877) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  878) # A script or command to power off the box (default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  879) # Needed for POWEROFF_ON_ERROR and SUCCESS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  880) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  881) # Example for digital loggers power switch:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  882) #POWER_OFF = wget --no-proxy -O /dev/null -q  --auth-no-challenge 'http://admin:admin@power/outlet?5=OFF'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  883) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  884) # Example for a virtual guest call "Guest".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  885) #POWER_OFF = virsh destroy Guest
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  886) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  887) # To have the build fail on "new" warnings, create a file that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  888) # contains a list of all known warnings (they must match exactly
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  889) # to the line with 'warning:', 'error:' or 'Error:'. If the option
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  890) # WARNINGS_FILE is set, then that file will be read, and if the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  891) # build detects a warning, it will examine this file and if the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  892) # warning does not exist in it, it will fail the build.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  893) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  894) # Note, if this option is defined to a file that does not exist
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  895) # then any warning will fail the build.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  896) #  (see make_warnings_file below)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  897) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  898) # (optional, default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  899) #WARNINGS_FILE = ${OUTPUT_DIR}/warnings_file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  900) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  901) # The way to execute a command on the target
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  902) # (default ssh $SSH_USER@$MACHINE $SSH_COMMAND";)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  903) # The variables SSH_USER, MACHINE and SSH_COMMAND are defined
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  904) #SSH_EXEC = ssh $SSH_USER@$MACHINE $SSH_COMMAND";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  905) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  906) # The way to copy a file to the target (install and modules)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  907) # (default scp $SRC_FILE $SSH_USER@$MACHINE:$DST_FILE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  908) # The variables SSH_USER, MACHINE are defined by the config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  909) # SRC_FILE and DST_FILE are ktest internal variables and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  910) # should only have '$' and not the '${}' notation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  911) # (default scp $SRC_FILE ${SSH_USER}@${MACHINE}:$DST_FILE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  912) #SCP_TO_TARGET = echo skip scp for $SRC_FILE $DST_FILE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  913) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  914) # If install needs to be different than modules, then this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  915) # option will override the SCP_TO_TARGET for installation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  916) # (default ${SCP_TO_TARGET} )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  917) #SCP_TO_TARGET_INSTALL = scp $SRC_FILE tftp@tftpserver:$DST_FILE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  918) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  919) # The nice way to reboot the target
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  920) # (default ssh $SSH_USER@$MACHINE reboot)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  921) # The variables SSH_USER and MACHINE are defined.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  922) #REBOOT = ssh $SSH_USER@$MACHINE reboot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  923) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  924) # The return code of REBOOT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  925) # (default 255)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  926) #REBOOT_RETURN_CODE = 255
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  927) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  928) # The way triple faults are detected is by testing the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  929) # banner. If the kernel banner for the kernel we are testing is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  930) # found, and then later a kernel banner for another kernel version
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  931) # is found, it is considered that we encountered a triple fault,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  932) # and there is no panic or callback, but simply a reboot.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  933) # To disable this (because it did a false positive) set the following
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  934) # to 0.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  935) # (default 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  936) #DETECT_TRIPLE_FAULT = 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  937) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  938) # All options in the config file should be either used by ktest
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  939) # or could be used within a value of another option. If an option
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  940) # in the config file is not used, ktest will warn about it and ask
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  941) # if you want to continue.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  942) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  943) # If you don't care if there are non-used options, enable this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  944) # option. Be careful though, a non-used option is usually a sign
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  945) # of an option name being typed incorrectly.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  946) # (default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  947) #IGNORE_UNUSED = 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  948) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  949) # When testing a kernel that happens to have WARNINGs, and call
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  950) # traces, ktest.pl will detect these and fail a boot or test run
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  951) # due to warnings. By setting this option, ktest will ignore
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  952) # call traces, and will not fail a test if the kernel produces
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  953) # an oops. Use this option with care.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  954) # (default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  955) #IGNORE_ERRORS = 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  956) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  957) #### Per test run options ####
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  958) # The following options are only allowed in TEST_START sections.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  959) # They are ignored in the DEFAULTS sections.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  960) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  961) # All of these are optional and undefined by default, although
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  962) #  some of these options are required for TEST_TYPE of patchcheck
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  963) #  and bisect.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  964) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  965) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  966) # CHECKOUT = branch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  967) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  968) #  If the BUILD_DIR is a git repository, then you can set this option
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  969) #  to checkout the given branch before running the TEST. If you
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  970) #  specify this for the first run, that branch will be used for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  971) #  all preceding tests until a new CHECKOUT is set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  972) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  973) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  974) # TEST_NAME = name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  975) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  976) #  If you want the test to have a name that is displayed in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  977) #  the test result banner at the end of the test, then use this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  978) #  option. This is useful to search for the RESULT keyword and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  979) #  not have to translate a test number to a test in the config.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  980) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  981) # For TEST_TYPE = patchcheck
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  982) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  983) #  This expects the BUILD_DIR to be a git repository, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  984) #  will checkout the PATCHCHECK_START commit.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  985) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  986) #  The option BUILD_TYPE will be ignored.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  987) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  988) #  The MIN_CONFIG will be used for all builds of the patchcheck. The build type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  989) #  used for patchcheck is oldconfig.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  990) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  991) #  PATCHCHECK_START is required and is the first patch to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  992) #   test (the SHA1 of the commit). You may also specify anything
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  993) #   that git checkout allows (branch name, tag, HEAD~3).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  994) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  995) #  PATCHCHECK_END is the last patch to check (default HEAD)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  996) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  997) #  PATCHCHECK_CHERRY if set to non zero, then git cherry will be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  998) #      performed against PATCHCHECK_START and PATCHCHECK_END. That is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  999) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1000) #      git cherry ${PATCHCHECK_START} ${PATCHCHECK_END}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1001) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1002) #      Then the changes found will be tested.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1003) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1004) #      Note, PATCHCHECK_CHERRY requires PATCHCHECK_END to be defined.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1005) #      (default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1006) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1007) #  PATCHCHECK_TYPE is required and is the type of test to run:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1008) #      build, boot, test.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1009) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1010) #   Note, the build test will look for warnings, if a warning occurred
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1011) #     in a file that a commit touches, the build will fail, unless
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1012) #     IGNORE_WARNINGS is set for the given commit's sha1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1013) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1014) #   IGNORE_WARNINGS can be used to disable the failure of patchcheck
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1015) #     on a particular commit (SHA1). You can add more than one commit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1016) #     by adding a list of SHA1s that are space delimited.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1017) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1018) #   If BUILD_NOCLEAN is set, then make mrproper will not be run on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1019) #   any of the builds, just like all other TEST_TYPE tests. But
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1020) #   what makes patchcheck different from the other tests, is if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1021) #   BUILD_NOCLEAN is not set, only the first and last patch run
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1022) #   make mrproper. This helps speed up the test.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1023) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1024) # Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1025) #   TEST_START
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1026) #   TEST_TYPE = patchcheck
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1027) #   CHECKOUT = mybranch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1028) #   PATCHCHECK_TYPE = boot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1029) #   PATCHCHECK_START = 747e94ae3d1b4c9bf5380e569f614eb9040b79e7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1030) #   PATCHCHECK_END = HEAD~2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1031) #   IGNORE_WARNINGS = 42f9c6b69b54946ffc0515f57d01dc7f5c0e4712 0c17ca2c7187f431d8ffc79e81addc730f33d128
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1032) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1033) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1034) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1035) # For TEST_TYPE = bisect
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1036) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1037) #  You can specify a git bisect if the BUILD_DIR is a git repository.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1038) #  The MIN_CONFIG will be used for all builds of the bisect. The build type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1039) #  used for bisecting is oldconfig.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1040) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1041) #  The option BUILD_TYPE will be ignored.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1042) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1043) #  BISECT_TYPE is the type of test to perform:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1044) #	build	- bad fails to build
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1045) #	boot	- bad builds but fails to boot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1046) #	test	- bad boots but fails a test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1047) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1048) # BISECT_GOOD is the commit (SHA1) to label as good (accepts all git good commit types)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1049) # BISECT_BAD is the commit to label as bad (accepts all git bad commit types)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1050) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1051) # The above three options are required for a bisect operation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1052) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1053) # BISECT_REPLAY = /path/to/replay/file (optional, default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1054) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1055) #   If an operation failed in the bisect that was not expected to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1056) #   fail. Then the test ends. The state of the BUILD_DIR will be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1057) #   left off at where the failure occurred. You can examine the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1058) #   reason for the failure, and perhaps even find a git commit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1059) #   that would work to continue with. You can run:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1060) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1061) #   git bisect log > /path/to/replay/file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1062) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1063) #   The adding:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1064) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1065) #    BISECT_REPLAY= /path/to/replay/file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1066) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1067) #   And running the test again. The test will perform the initial
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1068) #    git bisect start, git bisect good, and git bisect bad, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1069) #    then it will run git bisect replay on this file, before
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1070) #    continuing with the bisect.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1071) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1072) # BISECT_START = commit (optional, default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1073) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1074) #   As with BISECT_REPLAY, if the test failed on a commit that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1075) #   just happen to have a bad commit in the middle of the bisect,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1076) #   and you need to skip it. If BISECT_START is defined, it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1077) #   will checkout that commit after doing the initial git bisect start,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1078) #   git bisect good, git bisect bad, and running the git bisect replay
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1079) #   if the BISECT_REPLAY is set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1080) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1081) # BISECT_SKIP = 1 (optional, default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1082) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1083) #   If BISECT_TYPE is set to test but the build fails, ktest will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1084) #   simply fail the test and end their. You could use BISECT_REPLAY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1085) #   and BISECT_START to resume after you found a new starting point,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1086) #   or you could set BISECT_SKIP to 1. If BISECT_SKIP is set to 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1087) #   when something other than the BISECT_TYPE fails, ktest.pl will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1088) #   run "git bisect skip" and try again.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1089) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1090) # BISECT_FILES = <path> (optional, default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1091) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1092) #   To just run the git bisect on a specific path, set BISECT_FILES.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1093) #   For example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1094) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1095) #     BISECT_FILES = arch/x86 kernel/time
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1096) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1097) #   Will run the bisect with "git bisect start -- arch/x86 kernel/time"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1098) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1099) # BISECT_REVERSE = 1 (optional, default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1100) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1101) #   In those strange instances where it was broken forever
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1102) #   and you are trying to find where it started to work!
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1103) #   Set BISECT_GOOD to the commit that was last known to fail
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1104) #   Set BISECT_BAD to the commit that is known to start working.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1105) #   With BISECT_REVERSE = 1, The test will consider failures as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1106) #   good, and success as bad.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1107) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1108) # BISECT_MANUAL = 1 (optional, default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1109) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1110) #   In case there's a problem with automating the bisect for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1111) #   whatever reason. (Can't reboot, want to inspect each iteration)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1112) #   Doing a BISECT_MANUAL will have the test wait for you to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1113) #   tell it if the test passed or failed after each iteration.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1114) #   This is basically the same as running git bisect yourself
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1115) #   but ktest will rebuild and install the kernel for you.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1116) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1117) # BISECT_CHECK = 1 (optional, default 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1118) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1119) #   Just to be sure the good is good and bad is bad, setting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1120) #   BISECT_CHECK to 1 will start the bisect by first checking
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1121) #   out BISECT_BAD and makes sure it fails, then it will check
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1122) #   out BISECT_GOOD and makes sure it succeeds before starting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1123) #   the bisect (it works for BISECT_REVERSE too).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1124) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1125) #   You can limit the test to just check BISECT_GOOD or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1126) #   BISECT_BAD with BISECT_CHECK = good or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1127) #   BISECT_CHECK = bad, respectively.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1128) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1129) # BISECT_TRIES = 5 (optional, default 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1130) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1131) #   For those cases that it takes several tries to hit a bug,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1132) #   the BISECT_TRIES is useful. It is the number of times the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1133) #   test is ran before it says the kernel is good. The first failure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1134) #   will stop trying and mark the current SHA1 as bad.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1135) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1136) #   Note, as with all race bugs, there's no guarantee that if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1137) #   it succeeds, it is really a good bisect. But it helps in case
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1138) #   the bug is some what reliable.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1139) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1140) #   You can set BISECT_TRIES to zero, and all tests will be considered
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1141) #   good, unless you also set BISECT_MANUAL.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1142) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1143) # BISECT_RET_GOOD = 0 (optional, default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1144) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1145) #   In case the specificed test returns something other than just
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1146) #   0 for good, and non-zero for bad, you can override 0 being
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1147) #   good by defining BISECT_RET_GOOD.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1148) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1149) # BISECT_RET_BAD = 1 (optional, default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1150) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1151) #   In case the specificed test returns something other than just
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1152) #   0 for good, and non-zero for bad, you can override non-zero being
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1153) #   bad by defining BISECT_RET_BAD.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1154) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1155) # BISECT_RET_ABORT = 255 (optional, default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1156) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1157) #   If you need to abort the bisect if the test discovers something
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1158) #   that was wrong, you can define BISECT_RET_ABORT to be the error
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1159) #   code returned by the test in order to abort the bisect.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1160) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1161) # BISECT_RET_SKIP = 2 (optional, default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1162) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1163) #   If the test detects that the current commit is neither good
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1164) #   nor bad, but something else happened (another bug detected)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1165) #   you can specify BISECT_RET_SKIP to an error code that the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1166) #   test returns when it should skip the current commit.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1167) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1168) # BISECT_RET_DEFAULT = good (optional, default undefined)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1169) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1170) #   You can override the default of what to do when the above
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1171) #   options are not hit. This may be one of, "good", "bad",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1172) #   "abort" or "skip" (without the quotes).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1173) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1174) #   Note, if you do not define any of the previous BISECT_RET_*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1175) #   and define BISECT_RET_DEFAULT, all bisects results will do
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1176) #   what the BISECT_RET_DEFAULT has.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1177) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1178) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1179) # Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1180) #   TEST_START
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1181) #   TEST_TYPE = bisect
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1182) #   BISECT_GOOD = v2.6.36
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1183) #   BISECT_BAD = b5153163ed580e00c67bdfecb02b2e3843817b3e
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1184) #   BISECT_TYPE = build
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1185) #   MIN_CONFIG = /home/test/config-bisect
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1186) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1187) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1188) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1189) # For TEST_TYPE = config_bisect
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1190) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1191) #  In those cases that you have two different configs. One of them
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1192) #  work, the other does not, and you do not know what config causes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1193) #  the problem.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1194) #  The TEST_TYPE config_bisect will bisect the bad config looking for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1195) #  what config causes the failure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1196) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1197) #  The way it works is this:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1198) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1199) #   You can specify a good config with CONFIG_BISECT_GOOD, otherwise it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1200) #   will use the MIN_CONFIG, and if that's not specified, it will use
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1201) #   the config that comes with "make defconfig".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1202) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1203) #   It runs both the good and bad configs through a make oldconfig to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1204) #   make sure that they are set up for the kernel that is checked out.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1205) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1206) #   It then reads the configs that are set, as well as the ones that are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1207) #   not set for both the good and bad configs, and then compares them.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1208) #   It will set half of the good configs within the bad config (note,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1209) #   "set" means to make the bad config match the good config, a config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1210) #   in the good config that is off, will be turned off in the bad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1211) #   config. That is considered a "set").
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1212) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1213) #   It tests this new config and if it works, it becomes the new good
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1214) #   config, otherwise it becomes the new bad config. It continues this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1215) #   process until there's only one config left and it will report that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1216) #   config.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1217) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1218) #   The "bad config" can also be a config that is needed to boot but was
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1219) #   disabled because it depended on something that wasn't set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1220) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1221) #   During this process, it saves the current good and bad configs in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1222) #   ${TMP_DIR}/good_config and ${TMP_DIR}/bad_config respectively.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1223) #   If you stop the test, you can copy them to a new location to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1224) #   reuse them again.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1225) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1226) #   Although the MIN_CONFIG may be the config it starts with, the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1227) #   MIN_CONFIG is ignored.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1228) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1229) #  The option BUILD_TYPE will be ignored.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1230) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1231) #  CONFIG_BISECT_TYPE is the type of test to perform:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1232) #	build	- bad fails to build
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1233) #	boot	- bad builds but fails to boot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1234) #	test	- bad boots but fails a test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1235) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1236) #  CONFIG_BISECT is the config that failed to boot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1237) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1238) #  If BISECT_MANUAL is set, it will pause between iterations.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1239) #  This is useful to use just ktest.pl just for the config bisect.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1240) #  If you set it to build, it will run the bisect and you can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1241) #  control what happens in between iterations. It will ask you if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1242) #  the test succeeded or not and continue the config bisect.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1243) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1244) # CONFIG_BISECT_GOOD (optional)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1245) #  If you have a good config to start with, then you
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1246) #  can specify it with CONFIG_BISECT_GOOD. Otherwise
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1247) #  the MIN_CONFIG is the base, if MIN_CONFIG is not set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1248) #  It will build a config with "make defconfig"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1249) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1250) # CONFIG_BISECT_CHECK (optional)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1251) #  Set this to 1 if you want to confirm that the config ktest
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1252) #  generates (the bad config with the min config) is still bad.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1253) #  It may be that the min config fixes what broke the bad config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1254) #  and the test will not return a result.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1255) #  Set it to "good" to test only the good config and set it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1256) #  to "bad" to only test the bad config.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1257) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1258) # CONFIG_BISECT_EXEC (optional)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1259) #  The config bisect is a separate program that comes with ktest.pl.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1260) #  By default, it will look for:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1261) #    `pwd`/config-bisect.pl # the location ktest.pl was executed from.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1262) #  If it does not find it there, it will look for:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1263) #    `dirname <ktest.pl>`/config-bisect.pl # The directory that holds ktest.pl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1264) #  If it does not find it there, it will look for:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1265) #    ${BUILD_DIR}/tools/testing/ktest/config-bisect.pl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1266) #  Setting CONFIG_BISECT_EXEC will override where it looks.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1267) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1268) # Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1269) #   TEST_START
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1270) #   TEST_TYPE = config_bisect
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1271) #   CONFIG_BISECT_TYPE = build
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1272) #   CONFIG_BISECT = /home/test/config-bad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1273) #   MIN_CONFIG = /home/test/config-min
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1274) #   BISECT_MANUAL = 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1275) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1276) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1277) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1278) # For TEST_TYPE = make_min_config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1279) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1280) #  After doing a make localyesconfig, your kernel configuration may
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1281) #  not be the most useful minimum configuration. Having a true minimum
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1282) #  config that you can use against other configs is very useful if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1283) #  someone else has a config that breaks on your code. By only forcing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1284) #  those configurations that are truly required to boot your machine
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1285) #  will give you less of a chance that one of your set configurations
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1286) #  will make the bug go away. This will give you a better chance to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1287) #  be able to reproduce the reported bug matching the broken config.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1288) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1289) #  Note, this does take some time, and may require you to run the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1290) #  test over night, or perhaps over the weekend. But it also allows
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1291) #  you to interrupt it, and gives you the current minimum config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1292) #  that was found till that time.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1293) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1294) #  Note, this test automatically assumes a BUILD_TYPE of oldconfig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1295) #  and its test type acts like boot.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1296) #  TODO: add a test version that makes the config do more than just
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1297) #   boot, like having network access.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1298) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1299) #  To save time, the test does not just grab any option and test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1300) #  it. The Kconfig files are examined to determine the dependencies
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1301) #  of the configs. If a config is chosen that depends on another
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1302) #  config, that config will be checked first. By checking the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1303) #  parents first, we can eliminate whole groups of configs that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1304) #  may have been enabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1305) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1306) #  For example, if a USB device config is chosen and depends on CONFIG_USB,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1307) #  the CONFIG_USB will be tested before the device. If CONFIG_USB is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1308) #  found not to be needed, it, as well as all configs that depend on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1309) #  it, will be disabled and removed from the current min_config.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1310) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1311) #  OUTPUT_MIN_CONFIG is the path and filename of the file that will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1312) #   be created from the MIN_CONFIG. If you interrupt the test, set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1313) #   this file as your new min config, and use it to continue the test.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1314) #   This file does not need to exist on start of test.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1315) #   This file is not created until a config is found that can be removed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1316) #   If this file exists, you will be prompted if you want to use it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1317) #   as the min_config (overriding MIN_CONFIG) if START_MIN_CONFIG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1318) #   is not defined.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1319) #   (required field)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1320) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1321) #  START_MIN_CONFIG is the config to use to start the test with.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1322) #   you can set this as the same OUTPUT_MIN_CONFIG, but if you do
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1323) #   the OUTPUT_MIN_CONFIG file must exist.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1324) #   (default MIN_CONFIG)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1325) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1326) #  IGNORE_CONFIG is used to specify a config file that has configs that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1327) #   you already know must be set. Configs are written here that have
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1328) #   been tested and proved to be required. It is best to define this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1329) #   file if you intend on interrupting the test and running it where
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1330) #   it left off. New configs that it finds will be written to this file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1331) #   and will not be tested again in later runs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1332) #   (optional)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1333) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1334) #  MIN_CONFIG_TYPE can be either 'boot' or 'test'. With 'boot' it will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1335) #   test if the created config can just boot the machine. If this is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1336) #   set to 'test', then the TEST option must be defined and the created
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1337) #   config will not only boot the target, but also make sure that the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1338) #   config lets the test succeed. This is useful to make sure the final
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1339) #   config that is generated allows network activity (ssh).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1340) #   (optional)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1341) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1342) #  USE_OUTPUT_MIN_CONFIG set this to 1 if you do not want to be prompted
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1343) #   about using the OUTPUT_MIN_CONFIG as the MIN_CONFIG as the starting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1344) #   point. Set it to 0 if you want to always just use the given MIN_CONFIG.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1345) #   If it is not defined, it will prompt you to pick which config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1346) #   to start with (MIN_CONFIG or OUTPUT_MIN_CONFIG).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1347) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1348) # Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1349) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1350) #  TEST_TYPE = make_min_config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1351) #  OUTPUT_MIN_CONFIG = /path/to/config-new-min
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1352) #  START_MIN_CONFIG = /path/to/config-min
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1353) #  IGNORE_CONFIG = /path/to/config-tested
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1354) #  MIN_CONFIG_TYPE = test
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1355) #  TEST = ssh ${USER}@${MACHINE} echo hi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1356) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1357) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1358) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1359) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1360) # For TEST_TYPE = make_warnings_file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1361) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1362) # If you want the build to fail when a new warning is discovered
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1363) # you set the WARNINGS_FILE to point to a file of known warnings.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1364) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1365) # The test "make_warnings_file" will let you create a new warnings
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1366) # file before you run other tests, like patchcheck.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1367) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1368) # What this test does is to run just a build, you still need to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1369) # specify BUILD_TYPE to tell the test what type of config to use.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1370) # A BUILD_TYPE of nobuild will fail this test.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1371) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1372) # The test will do the build and scan for all warnings. Any warning
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1373) # it discovers will be saved in the WARNINGS_FILE (required) option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1374) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1375) # It is recommended (but not necessary) to make sure BUILD_NOCLEAN is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1376) # off, so that a full build is done (make mrproper is performed).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1377) # That way, all warnings will be captured.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1378) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1379) # Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1380) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1381) #  TEST_TYPE = make_warnings_file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1382) #  WARNINGS_FILE = ${OUTPUT_DIR}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1383) #  BUILD_TYPE = useconfig:oldconfig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1384) #  CHECKOUT = v3.8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1385) #  BUILD_NOCLEAN = 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1386) #