From b7f7ede9aadd4b77397bf012f957ec0002a22446 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Tue, 4 Aug 2015 16:29:24 -0700 Subject: [PATCH] aiaiai-test-patchset: sync with bisection test before moving on 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 Signed-off-by: Jacob Keller --- aiaiai-test-patchset | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aiaiai-test-patchset b/aiaiai-test-patchset index 85fd057..b16d7a6 100755 --- a/aiaiai-test-patchset +++ b/aiaiai-test-patchset @@ -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 -- 2.49.0