diff options
| -rwxr-xr-x | tools/testing/ktest/ktest.pl | 14 | ||||
| -rw-r--r-- | tools/testing/ktest/sample.conf | 6 |
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 | ||
| 174 | my $config_bisect; | 174 | my $config_bisect; |
| 175 | my $config_bisect_type; | 175 | my $config_bisect_type; |
| 176 | my $config_bisect_check; | ||
| 176 | 177 | ||
| 177 | my $patchcheck_type; | 178 | my $patchcheck_type; |
| 178 | my $patchcheck_start; | 179 | my $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 |
