提交 612b9e9b 编写于 作者: S Steven Rostedt 提交者: Steven Rostedt

ktest: Handle kernels before make oldnoconfig

When bisecting, one may come across a kernel that does not have
make oldnoconfig. In this case, we need to run the command "yes"
into a make oldconfig. This will select defaults instead of 'n'
into each command, but it works as a work around.

Note, "yes n" will not work because a config may have a value that
"n" is not acceptable for.
Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
上级 10abf118
...@@ -930,6 +930,18 @@ sub check_buildlog { ...@@ -930,6 +930,18 @@ sub check_buildlog {
return 1; return 1;
} }
sub make_oldconfig {
my ($defconfig) = @_;
if (!run_command "$defconfig $make oldnoconfig") {
# Perhaps oldnoconfig doesn't exist in this version of the kernel
# try a yes '' | oldconfig
doprint "oldnoconfig failed, trying yes '' | make oldconfig\n";
run_command "yes '' | $defconfig $make oldconfig" or
dodie "failed make config oldconfig";
}
}
sub build { sub build {
my ($type) = @_; my ($type) = @_;
my $defconfig = ""; my $defconfig = "";
...@@ -975,8 +987,12 @@ sub build { ...@@ -975,8 +987,12 @@ sub build {
$defconfig = "KCONFIG_ALLCONFIG=$minconfig"; $defconfig = "KCONFIG_ALLCONFIG=$minconfig";
} }
run_command "$defconfig $make $type" or if ($type eq "oldnoconfig") {
dodie "failed make config"; make_oldconfig $defconfig;
} else {
run_command "$defconfig $make $type" or
dodie "failed make config";
}
$redirect = "$buildlog"; $redirect = "$buildlog";
if (!run_command "$make $build_options") { if (!run_command "$make $build_options") {
...@@ -1395,9 +1411,7 @@ sub create_config { ...@@ -1395,9 +1411,7 @@ sub create_config {
close(OUT); close(OUT);
# exit; # exit;
run_command "$make oldnoconfig" or make_oldconfig "";
dodie "failed make config oldconfig";
} }
sub compare_configs { sub compare_configs {
...@@ -1599,8 +1613,7 @@ sub config_bisect { ...@@ -1599,8 +1613,7 @@ sub config_bisect {
close(IN); close(IN);
# Now run oldconfig with the minconfig (and addconfigs) # Now run oldconfig with the minconfig (and addconfigs)
run_command "$defconfig $make oldnoconfig" or make_oldconfig $defconfig;
dodie "failed make config oldconfig";
# check to see what we lost (or gained) # check to see what we lost (or gained)
open (IN, $output_config) open (IN, $output_config)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册