bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: testsuite failure - 193 parallel execution


From: Eric Blake
Subject: Re: testsuite failure - 193 parallel execution
Date: Tue, 20 Jul 2010 15:00:12 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.0.5

On 07/20/2010 02:22 PM, Eric Blake wrote:
>> Eric, does this improve tests on your system?
> 
> Unfortunately, I'm still seeing failures:
> 
> $ for i in $(seq 100); do sh ./micro-suite -j4 > stdout || { echo fail
> on $i; break; }; grep 'All 16' stdout || { echo fail2 on $i; break; }; done
> ...
> ./micro-suite: line 1726: echo: write error: Broken pipe
> ./micro-suite: line 4: echo: write error: Broken pipe
> fail2 on 30
> $ grep All stdout
> All 12 tests were successful.
> 
> So I still got short-changed, although this time it took more
> iterations.  The only other thing that I can think of is that I know
> bash has had reported bugs in the past where built-ins that produce
> output (and particularly built-ins that don't end output in a newline)
> don't always flush correctly across redirections;

Indeed, using this patch got me through 100 iterations with no failures
from bash (compared to 19 fails out of 100 without this).  I hate the
fact that I don't know what the real bug is, and that the race appears
to be in bash rather than in our shell script, but as this change
improved performance, I'm prone to check it in, even though it adds an
additional fork to every test run in parallel.

diff --git i/lib/autotest/general.m4 w/lib/autotest/general.m4
index e27d601..a5fe05e 100644
--- i/lib/autotest/general.m4
+++ w/lib/autotest/general.m4
@@ -1386,7 +1386,8 @@ dnl optimize away the _AT_CHECK subshell, so
normalize here.
 dnl Ignore PIPE signals that stem from writing back the token.
+dnl Avoid races in bash 4.1 built-ins, by using env.
            trap "" PIPE
            echo stop > "$at_stop_file"
-           echo token >&AT_JOB_FIFO_FD
+           env echo >&AT_JOB_FIFO_FD
 dnl Do not reraise the default PIPE handler.
 dnl It wreaks havoc with ksh, see above.
 dnl        trap - 13
@@ -1395,13 +1396,13 @@ dnl         kill -13 $$
       at_fn_group_prepare
       if cd "$at_group_dir" &&
         at_fn_test $at_group &&
-        . "$at_test_source" # AT_JOB_FIFO_FD>&-
+        . "$at_test_source" [#] AT_JOB_FIFO_FD>&-
       then :; else
        AS_WARN([unable to parse test group: $at_group])
        at_failed=:
       fi
       at_fn_group_postprocess
-      echo token >&AT_JOB_FIFO_FD
+      env echo >&AT_JOB_FIFO_FD
     ) &
     $at_job_control_off
     if $at_first; then


-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]