aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2012-07-19 15:26:00 -0400
committerSteven Rostedt <rostedt@goodmis.org>2012-07-19 15:26:00 -0400
commitb0918612545e698e55889c15d25e5118ea09c1fd (patch)
treec0c169413ea90ecd7e446a4b322eb389af49dda6 /tools
parente5c2ec11a07b9e1e7eb714aad13583e2bbae49bd (diff)
ktest: Add CONFIG_BISECT_CHECK option
The config-bisect can take a bad config and bisect it down to find out what config actually breaks the config. But as all tests will apply a minconfig (defined by a user) to apply before booting, it is possible that the minconfig could actually make the bad config work (minconfigs can disable configs). The end result is that the config bisect test will not find a config that breaks. This can be rather frustrating to the user. The CONFIG_BISECT_CHECK option, when set to 1, will make sure that the bad config (with the minconfig applied) still fails before trying to bisect. And yes, I did get burned by this. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/ktest/ktest.pl14
-rw-r--r--tools/testing/ktest/sample.conf6
2 files changed, 20 insertions, 0 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index e91702eee580..8ce58d715aef 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -173,6 +173,7 @@ my $bisect_check;
173 173
174my $config_bisect; 174my $config_bisect;
175my $config_bisect_type; 175my $config_bisect_type;
176my $config_bisect_check;
176 177
177my $patchcheck_type; 178my $patchcheck_type;
178my $patchcheck_start; 179my $patchcheck_start;
@@ -283,6 +284,7 @@ my %option_map = (
283 284
284 "CONFIG_BISECT" => \$config_bisect, 285 "CONFIG_BISECT" => \$config_bisect,
285 "CONFIG_BISECT_TYPE" => \$config_bisect_type, 286 "CONFIG_BISECT_TYPE" => \$config_bisect_type,
287 "CONFIG_BISECT_CHECK" => \$config_bisect_check,
286 288
287 "PATCHCHECK_TYPE" => \$patchcheck_type, 289 "PATCHCHECK_TYPE" => \$patchcheck_type,
288 "PATCHCHECK_START" => \$patchcheck_start, 290 "PATCHCHECK_START" => \$patchcheck_start,
@@ -2743,6 +2745,18 @@ sub config_bisect {
2743 } 2745 }
2744 } 2746 }
2745 my $ret; 2747 my $ret;
2748
2749 if (defined($config_bisect_check) && $config_bisect_check) {
2750 doprint " Checking to make sure bad config with min config fails\n";
2751 create_config keys %config_list;
2752 $ret = run_config_bisect_test $config_bisect_type;
2753 if ($ret) {
2754 doprint " FAILED! Bad config with min config boots fine\n";
2755 return -1;
2756 }
2757 doprint " Bad config with min config fails as expected\n";
2758 }
2759
2746 do { 2760 do {
2747 $ret = run_config_bisect; 2761 $ret = run_config_bisect;
2748 } while (!$ret); 2762 } while (!$ret);
diff --git a/tools/testing/ktest/sample.conf b/tools/testing/ktest/sample.conf
index 19754e0c8c64..e4a12da75ba6 100644
--- a/tools/testing/ktest/sample.conf
+++ b/tools/testing/ktest/sample.conf
@@ -1077,6 +1077,12 @@
1077# can specify it with CONFIG_BISECT_GOOD. Otherwise 1077# can specify it with CONFIG_BISECT_GOOD. Otherwise
1078# the MIN_CONFIG is the base. 1078# the MIN_CONFIG is the base.
1079# 1079#
1080# CONFIG_BISECT_CHECK (optional)
1081# Set this to 1 if you want to confirm that the config ktest
1082# generates (the bad config with the min config) is still bad.
1083# It may be that the min config fixes what broke the bad config
1084# and the test will not return a result.
1085#
1080# Example: 1086# Example:
1081# TEST_START 1087# TEST_START
1082# TEST_TYPE = config_bisect 1088# TEST_TYPE = config_bisect