diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-03-07 13:27:43 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-03-08 09:52:58 -0500 |
commit | 612b9e9bd33af80f525a38c05a1663f7126b3d3c (patch) | |
tree | cd5beffde98b075432f0b7a112ea26afe51790cf /tools/testing | |
parent | 10abf118f090b9a70ea05296a981fa27196dc7c6 (diff) | |
download | linux-3.10-612b9e9bd33af80f525a38c05a1663f7126b3d3c.tar.gz linux-3.10-612b9e9bd33af80f525a38c05a1663f7126b3d3c.tar.bz2 linux-3.10-612b9e9bd33af80f525a38c05a1663f7126b3d3c.zip |
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/testing')
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 6620fe4b364..c95209bac65 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -930,6 +930,18 @@ sub check_buildlog { 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 { my ($type) = @_; my $defconfig = ""; @@ -975,8 +987,12 @@ sub build { $defconfig = "KCONFIG_ALLCONFIG=$minconfig"; } - run_command "$defconfig $make $type" or - dodie "failed make config"; + if ($type eq "oldnoconfig") { + make_oldconfig $defconfig; + } else { + run_command "$defconfig $make $type" or + dodie "failed make config"; + } $redirect = "$buildlog"; if (!run_command "$make $build_options") { @@ -1395,9 +1411,7 @@ sub create_config { close(OUT); # exit; - run_command "$make oldnoconfig" or - dodie "failed make config oldconfig"; - + make_oldconfig ""; } sub compare_configs { @@ -1599,8 +1613,7 @@ sub config_bisect { close(IN); # Now run oldconfig with the minconfig (and addconfigs) - run_command "$defconfig $make oldnoconfig" or - dodie "failed make config oldconfig"; + make_oldconfig $defconfig; # check to see what we lost (or gained) open (IN, $output_config) |