]> www.infradead.org Git - users/dedekind/aiaiai.git/commitdiff
aiaiai-test-patchset: sync with bisection test before moving on
authorBrian Norris <computersforpeace@gmail.com>
Tue, 4 Aug 2015 23:29:24 +0000 (16:29 -0700)
committerJacob Keller <jacob.e.keller@intel.com>
Tue, 4 Aug 2015 23:32:10 +0000 (16:32 -0700)
For whatever reason (parallelism, I suppose?) we fork the bisectability
test to the background and continue -- we only sync with this test after
all configs are completed. This is bad for a number of reasons.

1. commit 2115f7ff0592 ("aiaiai-test-patchset: optimize disk space")
   introduced a race condition, where we might try to blow away the
   build objects before the bisection test is complete. This is really bad.

2. Theoretically, we could have more than one bisection test forked to
   the background, if there are more than 1 running config. But we
   clobber $pid_bisect every time we run test_configuration(), so we
   effectively only sync with the last one. This is *usually* OK,
   because the prior config can likely complete by the time subsequent
   config(s) complete, but that's still technically a race.

So, let's move the 'wait $pid_bisect' into the test_configuration()
function, to make sure the test is complete before we move to the next
config (and remove the build objects). While this removes a little bit
of parallelism, I suspect that parallelism was unintentional.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
aiaiai-test-patchset

index 85fd0575dd4b1831eab483f9a9466bda02c0127f..b16d7a650bc7ea940121c06fe053599fb1260218 100755 (executable)
@@ -248,6 +248,10 @@ test_configuration()
        aiaiai-diff-log $verbose $preserve "$tmpdir/diff-for-diff-log" "$log1.stderr.log" \
                        -w "$tmpdir" "$log2.stderr.log" > "$tmpdir/$config.stderr.diff"
 
+       # MUST sync with bisect test before removing build artifacts
+       [ -z "$pid_bisect" ]   || wait "$pid_bisect"   || die "aiaiai-test-bisectability failed"
+       verbose "Done with bisectability test"
+
        if [ -n "$preserve" ]; then
                message "Preserving objdirs: $obj1 $obj2"
        else
@@ -537,7 +541,6 @@ done
 
 [ -z "$checkpatch" ]   || wait "$pid_checkpatch" || die "checkpatch failed"
 [ -z "$keywords" ]     || wait "$pid_keywords" || die "aiaiai-match-keywords failed"
-[ -z "$pid_bisect" ]   || wait "$pid_bisect"   || die "aiaiai-test-bisectability failed"
 
 # Print the results