summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSiarhei Siamashka <siarhei.siamashka@gmail.com>2012-06-06 23:54:20 +0300
committerSiarhei Siamashka <siarhei.siamashka@gmail.com>2012-06-12 04:21:57 +0300
commit492dac7593075e622cfeddc73298df29d50b76bc (patch)
treeb170aff4729f5c51274b18785613f55ad9814f1e /test
parent40a0d10eeaedb879bbffe41f0537e8468c563df7 (diff)
test: fix bisecting issue in fuzzer-find-diff.pl
Before bisecting to find the exact test which has failed, we first need to make sure that the first test is fine (the first test is "good" and the whole range is "bad"). Otherwise test 2 gets incorrectly flagged as problematic in the case if we already got a failure on test 1 right from the start.
Diffstat (limited to 'test')
-rwxr-xr-xtest/fuzzer-find-diff.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/fuzzer-find-diff.pl b/test/fuzzer-find-diff.pl
index 53d9b8de..e1d67fbf 100755
--- a/test/fuzzer-find-diff.pl
+++ b/test/fuzzer-find-diff.pl
@@ -29,10 +29,17 @@ sub test_range {
my $min = shift;
my $max = shift;
+ # check that [$min, $max] range is "bad", otherwise return
if (`$ARGV[0] $min $max 2>/dev/null` eq `$ARGV[1] $min $max 2>/dev/null`) {
return;
}
+ # check that $min itself is "good", otherwise return
+ if (`$ARGV[0] $min 2>/dev/null` ne `$ARGV[1] $min 2>/dev/null`) {
+ return $min;
+ }
+
+ # start bisecting
while ($max != $min + 1) {
my $avg = int(($min + $max) / 2);
my $res1 = `$ARGV[0] $min $avg 2>/dev/null`;