1*4882a593Smuzhiyun# 2*4882a593Smuzhiyun# This file has some examples for creating a MIN_CONFIG. 3*4882a593Smuzhiyun# (A .config file that is the minimum for a machine to boot, or 4*4882a593Smuzhiyun# to boot and make a network connection.) 5*4882a593Smuzhiyun# 6*4882a593Smuzhiyun# A MIN_CONFIG is very useful as it is the minimum configuration 7*4882a593Smuzhiyun# needed to boot a given machine. You can debug someone else's 8*4882a593Smuzhiyun# .config by only setting the configs in your MIN_CONFIG. The closer 9*4882a593Smuzhiyun# your MIN_CONFIG is to the true minimum set of configs needed to 10*4882a593Smuzhiyun# boot your machine, the closer the config you test with will be 11*4882a593Smuzhiyun# to the users config that had the failure. 12*4882a593Smuzhiyun# 13*4882a593Smuzhiyun# The make_min_config test allows you to create a MIN_CONFIG that 14*4882a593Smuzhiyun# is truly the minimum set of configs needed to boot a box. 15*4882a593Smuzhiyun# 16*4882a593Smuzhiyun# In this example, the final config will reside in 17*4882a593Smuzhiyun# ${CONFIG_DIR}/config-new-min and ${CONFIG_DIR}/config-new-min-net. 18*4882a593Smuzhiyun# Just move one to the location you have set for MIN_CONFIG. 19*4882a593Smuzhiyun# 20*4882a593Smuzhiyun# The first test creates a MIN_CONFIG that will be the minimum 21*4882a593Smuzhiyun# configuration to boot ${MACHINE} and be able to ssh to it. 22*4882a593Smuzhiyun# 23*4882a593Smuzhiyun# The second test creates a MIN_CONFIG that will only boot 24*4882a593Smuzhiyun# the target and most likely will not let you ssh to it. (Notice 25*4882a593Smuzhiyun# how the second test uses the first test's result to continue with. 26*4882a593Smuzhiyun# This is because the second test config is a subset of the first). 27*4882a593Smuzhiyun# 28*4882a593Smuzhiyun# The ${CONFIG_DIR}/config-skip (and -net) will hold the configs 29*4882a593Smuzhiyun# that ktest.pl found would not boot the target without them set. 30*4882a593Smuzhiyun# The config-new-min holds configs that ktest.pl could not test 31*4882a593Smuzhiyun# directly because another config that was needed to boot the box 32*4882a593Smuzhiyun# selected them. Sometimes it is possible that this file will hold 33*4882a593Smuzhiyun# the true minimum configuration. You can test to see if this is 34*4882a593Smuzhiyun# the case by running the boot test with BOOT_TYPE = allnoconfig and 35*4882a593Smuzhiyun# setting setting the MIN_CONFIG to ${CONFIG_DIR}/config-skip. If the 36*4882a593Smuzhiyun# machine still boots, then you can use the config-skip as your MIN_CONFIG. 37*4882a593Smuzhiyun# 38*4882a593Smuzhiyun# These tests can run for several hours (and perhaps days). 39*4882a593Smuzhiyun# It's OK to kill the test with a Ctrl^C. By restarting without 40*4882a593Smuzhiyun# modifying this config, ktest.pl will notice that the config-new-min(-net) 41*4882a593Smuzhiyun# exists, and will use that instead as the starting point. 42*4882a593Smuzhiyun# The USE_OUTPUT_MIN_CONFIG is set to 1 to keep ktest.pl from asking 43*4882a593Smuzhiyun# you if you want to use the OUTPUT_MIN_CONFIG as the starting point. 44*4882a593Smuzhiyun# By using the OUTPUT_MIN_CONFIG as the starting point will allow ktest.pl to 45*4882a593Smuzhiyun# start almost where it left off. 46*4882a593Smuzhiyun# 47*4882a593SmuzhiyunTEST_START IF ${TEST} == min-config 48*4882a593SmuzhiyunTEST_TYPE = make_min_config 49*4882a593SmuzhiyunOUTPUT_MIN_CONFIG = ${CONFIG_DIR}/config-new-min-net 50*4882a593SmuzhiyunIGNORE_CONFIG = ${CONFIG_DIR}/config-skip-net 51*4882a593SmuzhiyunMIN_CONFIG_TYPE = test 52*4882a593SmuzhiyunTEST = ${SSH} echo hi 53*4882a593SmuzhiyunUSE_OUTPUT_MIN_CONFIG = 1 54*4882a593Smuzhiyun 55*4882a593SmuzhiyunTEST_START IF ${TEST} == min-config && ${MULTI} 56*4882a593SmuzhiyunTEST_TYPE = make_min_config 57*4882a593SmuzhiyunOUTPUT_MIN_CONFIG = ${CONFIG_DIR}/config-new-min 58*4882a593SmuzhiyunIGNORE_CONFIG = ${CONFIG_DIR}/config-skip 59*4882a593SmuzhiyunMIN_CONFIG = ${CONFIG_DIR}/config-new-min-net 60*4882a593SmuzhiyunUSE_OUTPUT_MIN_CONFIG = 1 61