summaryrefslogtreecommitdiff
path: root/tools/testing/ktest
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-04-23 22:04:56 -0400
committerSteven Rostedt <rostedt@goodmis.org>2014-04-23 23:18:20 -0400
commitc4d1d11f3b669847b261eacab123fe8b98a91d13 (patch)
treecc6310b8704628203eed02d66a2eebc737894dab /tools/testing/ktest
parent6071c22e17552a88562182cd3ad21fcb8bd37130 (diff)
ktest: Put back in the CONFIG_BISECT_CHECK
The new rewrite left out the CONFIG_BISECT_CHECK, which allows the user to test that their "bad" config still is bad and their "good" config still is good. This is especially important as the configs are passed through a "make oldconfig" to update them with the lastest kernel. Things could change that causes a bad config to work, or a good config to break. The check is done after the configs have run through the oldconfig processing. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/ktest')
-rwxr-xr-xtools/testing/ktest/ktest.pl25
1 files changed, 23 insertions, 2 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 52f558efdb0a..59697ead9dfc 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -3125,6 +3125,7 @@ sub config_bisect {
my ($i) = @_;
my $type = $config_bisect_type;
+ my $ret;
$bad_config = $config_bisect;
@@ -3134,7 +3135,7 @@ sub config_bisect {
$good_config = $minconfig;
} else {
doprint "No config specified, checking if defconfig works";
- my $ret = run_bisect_test $type, "defconfig";
+ $ret = run_bisect_test $type, "defconfig";
if (!$ret) {
fail "Have no good config to compare with, please set CONFIG_BISECT_GOOD";
return 1;
@@ -3166,7 +3167,27 @@ sub config_bisect {
save_config \%good_configs, $good_config;
save_config \%bad_configs, $bad_config;
- my $ret;
+
+ if (defined($config_bisect_check) && $config_bisect_check ne "0") {
+ if ($config_bisect_check ne "good") {
+ doprint "Testing bad config\n";
+
+ $ret = run_bisect_test $type, "useconfig:$bad_config";
+ if ($ret) {
+ fail "Bad config succeeded when expected to fail!";
+ return 0;
+ }
+ }
+ if ($config_bisect_check ne "bad") {
+ doprint "Testing good config\n";
+
+ $ret = run_bisect_test $type, "useconfig:$good_config";
+ if (!$ret) {
+ fail "Good config failed when expected to succeed!";
+ return 0;
+ }
+ }
+ }
do {
$ret = run_config_bisect \%good_configs, \%bad_configs;