aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2011-03-07 13:27:43 -0500
committerSteven Rostedt <rostedt@goodmis.org>2011-03-08 09:52:58 -0500
commit612b9e9bd33af80f525a38c05a1663f7126b3d3c (patch)
treecd5beffde98b075432f0b7a112ea26afe51790cf /tools
parent10abf118f090b9a70ea05296a981fa27196dc7c6 (diff)
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: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/ktest/ktest.pl27
1 files changed, 20 insertions, 7 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 6620fe4b364f..c95209bac65a 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -930,6 +930,18 @@ sub check_buildlog {
930 return 1; 930 return 1;
931} 931}
932 932
933sub make_oldconfig {
934 my ($defconfig) = @_;
935
936 if (!run_command "$defconfig $make oldnoconfig") {
937 # Perhaps oldnoconfig doesn't exist in this version of the kernel
938 # try a yes '' | oldconfig
939 doprint "oldnoconfig failed, trying yes '' | make oldconfig\n";
940 run_command "yes '' | $defconfig $make oldconfig" or
941 dodie "failed make config oldconfig";
942 }
943}
944
933sub build { 945sub build {
934 my ($type) = @_; 946 my ($type) = @_;
935 my $defconfig = ""; 947 my $defconfig = "";
@@ -975,8 +987,12 @@ sub build {
975 $defconfig = "KCONFIG_ALLCONFIG=$minconfig"; 987 $defconfig = "KCONFIG_ALLCONFIG=$minconfig";
976 } 988 }
977 989
978 run_command "$defconfig $make $type" or 990 if ($type eq "oldnoconfig") {
979 dodie "failed make config"; 991 make_oldconfig $defconfig;
992 } else {
993 run_command "$defconfig $make $type" or
994 dodie "failed make config";
995 }
980 996
981 $redirect = "$buildlog"; 997 $redirect = "$buildlog";
982 if (!run_command "$make $build_options") { 998 if (!run_command "$make $build_options") {
@@ -1395,9 +1411,7 @@ sub create_config {
1395 close(OUT); 1411 close(OUT);
1396 1412
1397# exit; 1413# exit;
1398 run_command "$make oldnoconfig" or 1414 make_oldconfig "";
1399 dodie "failed make config oldconfig";
1400
1401} 1415}
1402 1416
1403sub compare_configs { 1417sub compare_configs {
@@ -1599,8 +1613,7 @@ sub config_bisect {
1599 close(IN); 1613 close(IN);
1600 1614
1601 # Now run oldconfig with the minconfig (and addconfigs) 1615 # Now run oldconfig with the minconfig (and addconfigs)
1602 run_command "$defconfig $make oldnoconfig" or 1616 make_oldconfig $defconfig;
1603 dodie "failed make config oldconfig";
1604 1617
1605 # check to see what we lost (or gained) 1618 # check to see what we lost (or gained)
1606 open (IN, $output_config) 1619 open (IN, $output_config)