[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: testsuite failure - 193 parallel execution
From: |
Paul Eggert |
Subject: |
Re: testsuite failure - 193 parallel execution |
Date: |
Tue, 20 Jul 2010 14:52:28 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100527 Thunderbird/3.0.5 |
On 07/20/10 14:47, Eric Blake wrote a bunch of good questions,
ending with:
> And how does signal handling fit in with interrupting a child test?
OK, you're right, a plain pipe is not going to work. How about
this much-smaller fix instead? It builds on your idea to make
sure that the 'read at_token' commands succeed.
--- general.m4 2010-07-20 14:28:32.835139154 -0700
+++ /tmp/general.m4 2010-07-20 14:48:26.295135987 -0700
@@ -1386,7 +1386,7 @@ dnl optimize away the _AT_CHECK subshell
dnl Ignore PIPE signals that stem from writing back the token.
trap "" PIPE
echo stop > "$at_stop_file"
- echo token >&AT_JOB_FIFO_FD
+ echo >&AT_JOB_FIFO_FD
dnl Do not reraise the default PIPE handler.
dnl It wreaks havoc with ksh, see above.
dnl trap - 13
@@ -1401,7 +1401,7 @@ dnl kill -13 $$
at_failed=:
fi
at_fn_group_postprocess
- echo token >&AT_JOB_FIFO_FD
+ echo >&AT_JOB_FIFO_FD
) &
$at_job_control_off
if $at_first; then
@@ -1410,7 +1410,9 @@ dnl kill -13 $$
fi
shift # Consume one token.
if test address@hidden:@] -gt 0; then :; else
- read at_token <&AT_JOB_FIFO_FD || break
+ # The 'until' loop avoids a race condition if we happen to open
+ # the fifo between the time a child outputs a token and it exits.
+ until read at_token; do :; done <&AT_JOB_FIFO_FD
set x $[*]
fi
test -f "$at_stop_file" && break
@@ -1422,7 +1424,8 @@ dnl kill -13 $$
shift
for at_job
do
- read at_token
+ # Another 'until' loop to avoid the same race condition.
+ until read at_token; do :; done
done <&AT_JOB_FIFO_FD
fi
exec AT_JOB_FIFO_FD<&-
- Re: testsuite failure - 193 parallel execution, (continued)
- Re: testsuite failure - 193 parallel execution, Paul Eggert, 2010/07/20
- Re: testsuite failure - 193 parallel execution, Eric Blake, 2010/07/20
- Re: testsuite failure - 193 parallel execution, Eric Blake, 2010/07/20
- Re: testsuite failure - 193 parallel execution, Eric Blake, 2010/07/20
- Re: testsuite failure - 193 parallel execution, Paul Eggert, 2010/07/20
- Re: testsuite failure - 193 parallel execution, Paul Eggert, 2010/07/20
- Re: testsuite failure - 193 parallel execution, Eric Blake, 2010/07/20
- Re: testsuite failure - 193 parallel execution,
Paul Eggert <=
- Re: testsuite failure - 193 parallel execution, Eric Blake, 2010/07/20
- Re: testsuite failure - 193 parallel execution, Paul Eggert, 2010/07/20
- Re: testsuite failure - 193 parallel execution, Eric Blake, 2010/07/20
- Re: testsuite failure - 193 parallel execution, Ralf Wildenhues, 2010/07/20
- Re: testsuite failure - 193 parallel execution, Eric Blake, 2010/07/20
- [PATCH] Avoid passing autotest job fds to test groups., Ralf Wildenhues, 2010/07/21
- Re: [PATCH] Avoid passing autotest job fds to test groups., Eric Blake, 2010/07/21
- Re: [PATCH] Avoid passing autotest job fds to test groups., Ralf Wildenhues, 2010/07/21
- Re: [PATCH] Avoid passing autotest job fds to test groups., Eric Blake, 2010/07/21
- Re: [PATCH] Avoid passing autotest job fds to test groups., Ralf Wildenhues, 2010/07/21