diff options
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/testing/ktest/ktest.pl | 25 |
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 { | |||
| 3125 | my ($i) = @_; | 3125 | my ($i) = @_; |
| 3126 | 3126 | ||
| 3127 | my $type = $config_bisect_type; | 3127 | my $type = $config_bisect_type; |
| 3128 | my $ret; | ||
| 3128 | 3129 | ||
| 3129 | $bad_config = $config_bisect; | 3130 | $bad_config = $config_bisect; |
| 3130 | 3131 | ||
| @@ -3134,7 +3135,7 @@ sub config_bisect { | |||
| 3134 | $good_config = $minconfig; | 3135 | $good_config = $minconfig; |
| 3135 | } else { | 3136 | } else { |
| 3136 | doprint "No config specified, checking if defconfig works"; | 3137 | doprint "No config specified, checking if defconfig works"; |
| 3137 | my $ret = run_bisect_test $type, "defconfig"; | 3138 | $ret = run_bisect_test $type, "defconfig"; |
| 3138 | if (!$ret) { | 3139 | if (!$ret) { |
| 3139 | fail "Have no good config to compare with, please set CONFIG_BISECT_GOOD"; | 3140 | fail "Have no good config to compare with, please set CONFIG_BISECT_GOOD"; |
| 3140 | return 1; | 3141 | return 1; |
| @@ -3166,7 +3167,27 @@ sub config_bisect { | |||
| 3166 | save_config \%good_configs, $good_config; | 3167 | save_config \%good_configs, $good_config; |
| 3167 | save_config \%bad_configs, $bad_config; | 3168 | save_config \%bad_configs, $bad_config; |
| 3168 | 3169 | ||
| 3169 | my $ret; | 3170 | |
| 3171 | if (defined($config_bisect_check) && $config_bisect_check ne "0") { | ||
| 3172 | if ($config_bisect_check ne "good") { | ||
| 3173 | doprint "Testing bad config\n"; | ||
| 3174 | |||
| 3175 | $ret = run_bisect_test $type, "useconfig:$bad_config"; | ||
| 3176 | if ($ret) { | ||
| 3177 | fail "Bad config succeeded when expected to fail!"; | ||
| 3178 | return 0; | ||
| 3179 | } | ||
| 3180 | } | ||
| 3181 | if ($config_bisect_check ne "bad") { | ||
| 3182 | doprint "Testing good config\n"; | ||
| 3183 | |||
| 3184 | $ret = run_bisect_test $type, "useconfig:$good_config"; | ||
| 3185 | if (!$ret) { | ||
| 3186 | fail "Good config failed when expected to succeed!"; | ||
| 3187 | return 0; | ||
| 3188 | } | ||
| 3189 | } | ||
| 3190 | } | ||
| 3170 | 3191 | ||
| 3171 | do { | 3192 | do { |
| 3172 | $ret = run_config_bisect \%good_configs, \%bad_configs; | 3193 | $ret = run_config_bisect \%good_configs, \%bad_configs; |
