diff options
-rwxr-xr-x | round-robin-bisect.sh | 37 | ||||
-rw-r--r-- | round-robin.sh | 4 |
2 files changed, 36 insertions, 5 deletions
diff --git a/round-robin-bisect.sh b/round-robin-bisect.sh index 6822e606..071d4adf 100755 --- a/round-robin-bisect.sh +++ b/round-robin-bisect.sh @@ -212,7 +212,33 @@ if [ x"\$res" != x"0" ]; then if [ -f $rel_artifacts/build-\$rev/trigger-build-$current_project ]; then exit 1 else - exit 125 + # The build failed due to an uninteresting problem -- a prerequisite + # failed to build or benchmarking harness went down. We mark such + # revisions "skipped", but up to a point. If we skip more revisions + # in a row, than half the number of tests necessary to finish the bisect, + # then we mark such "skipped" revision as "bad". + + # Number of "git bisect skip" in a row + n_skips=\$(git -C $current_project bisect log | awk ' +BEGIN { n_skips=0 } +/git bisect skip/ { n_skips++; next } +/git bisect/ { n_skips=0 } +END { print n_skips } +') + revs_left=\$(git -C $current_project bisect view --pretty=%H | wc -l) + # Half the number of steps to finish the bisect + n_steps_2=\$(echo "n_steps=l(\$revs_left)/l(2); scale=0; n_steps/2" | bc -l) + if [ \$n_steps_2 -lt 2 ]; then + # Avoid skipping revisions at the end of the bisect. + n_steps_2=2 + fi + if [ \$n_skips -le \$n_steps_2 ]; then + exit 125 + else + # We had several skips in a row and still have many revisions to bisect. + # Mark this one "bad" to progress the bisect. + exit 1 + fi fi else exit 0 @@ -468,7 +494,8 @@ first_bad=$(get_first_bad) reset_rev="$first_bad" notify_devs=true notify_author="" -if [ x"$first_bad" != x"" ]; then +if [ x"$first_bad" != x"" ] \ + && [ -f $artifacts/build-$first_bad/trigger-build-$current_project ]; then # "git bisect run" succeeded. Check whether this is an actual regression # or bisection artifact. last_good="" @@ -533,7 +560,8 @@ EOF exit 0 fi else - # "Git bisect" didn't find the first_bad commit. + # "Git bisect" didn't find the first_bad commit or this commit points to + # an uninteresting regression. # Possible reasons include: # - We have marked the regressing commit as "skip", which can happen # to tcwg_bmk* projects when benchmarking infra has a problem. @@ -542,6 +570,9 @@ else # We want to reset baseline to HEAD in this case, so that we catch most # of the commits that introduced change in the result metric. # + # - We have marked a skipped commit as bad to advance bisect, even though + # the failure was uninteresting. + # # So, to make at least some progress on narrowing down the regression ... # - look for the last commit that tested "good". If it's not $baseline_rev, # then we have narrowed down the bisection range somewhat. Therefore, diff --git a/round-robin.sh b/round-robin.sh index a372aafb..2b0ab93f 100644 --- a/round-robin.sh +++ b/round-robin.sh @@ -239,8 +239,8 @@ build_abe () if [ x"$component" = x"check_gdb" ]; then # Limit GDB testsuites to 16-thread parallelism. Running them # with greater parallelism makes them too unstable. - local cpus=$(cat abe/host.conf \ - | grep "^cpus=" | sed -e "s/^cpus=\(.*\)/\1/") + local cpus + cpus=$(cat abe/host.conf | grep "^cpus=" | sed -e "s/^cpus=\(.*\)/\1/") if [ "$cpus" -gt 16 ]; then cp abe/host.conf abe/host.conf.orig sed -i -e "s/^cpus=.*/cpus=16/" abe/host.conf |