Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ktest: Add MIN_CONFIG_TYPE to allow making a minum .config that has network

Add a MIN_CONFIG_TYPE that can be set to 'test' or 'boot'. The default
is 'boot' which is what make_min_config has done previously: makes a
config file that is the minimum needed to boot the target.

But when MIN_CONFIG_TYPE is set to 'test', not only must the target
boot, but it must also successfully run the TEST. This allows the
creation of a config file that is the minimum to boot and also
perform ssh to the target, or anything else a developer wants.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

authored by

Steven Rostedt and committed by
Steven Rostedt
ccc513b6 683a3e64

+24
+14
tools/testing/ktest/ktest.pl
··· 39 39 "CLEAR_LOG" => 0, 40 40 "BISECT_MANUAL" => 0, 41 41 "BISECT_SKIP" => 1, 42 + "MIN_CONFIG_TYPE" => "boot", 42 43 "SUCCESS_LINE" => "login:", 43 44 "DETECT_TRIPLE_FAULT" => 1, 44 45 "NO_INSTALL" => 0, ··· 108 107 my $start_minconfig; 109 108 my $start_minconfig_defined; 110 109 my $output_minconfig; 110 + my $minconfig_type; 111 111 my $ignore_config; 112 112 my $ignore_errors; 113 113 my $addconfig; ··· 208 206 "MIN_CONFIG" => \$minconfig, 209 207 "OUTPUT_MIN_CONFIG" => \$output_minconfig, 210 208 "START_MIN_CONFIG" => \$start_minconfig, 209 + "MIN_CONFIG_TYPE" => \$minconfig_type, 211 210 "IGNORE_CONFIG" => \$ignore_config, 212 211 "TEST" => \$run_test, 213 212 "ADD_CONFIG" => \$addconfig, ··· 3131 3128 sub make_min_config { 3132 3129 my ($i) = @_; 3133 3130 3131 + my $type = $minconfig_type; 3132 + if ($type ne "boot" && $type ne "test") { 3133 + fail "Invalid MIN_CONFIG_TYPE '$minconfig_type'\n" . 3134 + " make_min_config works only with 'boot' and 'test'\n" and return; 3135 + } 3136 + 3134 3137 if (!defined($output_minconfig)) { 3135 3138 fail "OUTPUT_MIN_CONFIG not defined" and return; 3136 3139 } ··· 3296 3287 build "oldconfig" or $failed = 1; 3297 3288 if (!$failed) { 3298 3289 start_monitor_and_boot or $failed = 1; 3290 + 3291 + if ($type eq "test" && !$failed) { 3292 + do_run_test or $failed = 1; 3293 + } 3294 + 3299 3295 end_monitor; 3300 3296 } 3301 3297
+10
tools/testing/ktest/sample.conf
··· 1105 1105 # and will not be tested again in later runs. 1106 1106 # (optional) 1107 1107 # 1108 + # MIN_CONFIG_TYPE can be either 'boot' or 'test'. With 'boot' it will 1109 + # test if the created config can just boot the machine. If this is 1110 + # set to 'test', then the TEST option must be defined and the created 1111 + # config will not only boot the target, but also make sure that the 1112 + # config lets the test succeed. This is useful to make sure the final 1113 + # config that is generated allows network activity (ssh). 1114 + # (optional) 1115 + # 1108 1116 # Example: 1109 1117 # 1110 1118 # TEST_TYPE = make_min_config 1111 1119 # OUTPUT_MIN_CONFIG = /path/to/config-new-min 1112 1120 # START_MIN_CONFIG = /path/to/config-min 1113 1121 # IGNORE_CONFIG = /path/to/config-tested 1122 + # MIN_CONFIG_TYPE = test 1123 + # TEST = ssh ${USER}@${MACHINE} echo hi 1114 1124 #