[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: parallel autotest [2/3]: Implement 'testsuite --jobs'.
From: |
Eric Blake |
Subject: |
Re: parallel autotest [2/3]: Implement 'testsuite --jobs'. |
Date: |
Mon, 6 Oct 2008 14:43:45 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Eric Blake <ebb9 <at> byu.net> writes:
>
> > +if test $at_jobs -ne 1 &&
> > + rm -f "$at_job_fifo" &&
> > + ( mkfifo "$at_job_fifo" ) 2>/dev/null &&
> > + exec AT_JOB_FIFO_FD<> "$at_job_fifo"
>
> Is exec n<> portable? Yes, POSIX specifies it, but I haven't seen it used
> anywhere else in autoconf. I guess we commit it now, and if it is not
> portable, we wrap it inside an eval alongside the mkfifo check as a reason
> to skip the parallel testing.
Unfortunately, it is NOT portable. According to POSIX open [1], under
O_RDWR, "The result is undefined if this flag is applied to a FIFO." On
cygwin, FIFOs can only be read-only or write-only, there is no way to get a
read-write FIFO, and using <> in the shell defaults to a read-only FIFO.
[1] http://www.opengroup.org/onlinepubs/009695399/functions/open.html
As a result, the parallel tests invariably fail:
./autotest.at:837: $CONFIG_SHELL ./micro-suite -j4
--- /dev/null 2006-11-30 17:00:00.000000000 -0700
+++ /home/eblake/autoconf/tests/testsuite.dir/at-groups/133/stderr 2008-10-
02 09:42:30.020100900 -0600
@@ -0,0 +1,8 @@
+./micro-suite: line 1703: read: read error: 0: Communication error on send
+./micro-suite: line 1716: read: read error: 0: Communication error on send
+./micro-suite: line 1716: read: read error: 0: Communication error on send
+./micro-suite: line 1716: read: read error: 0: Communication error on send
+./micro-suite: line 1699: echo: write error: Communication error on send
+./micro-suite: line 1699: echo: write error: Communication error on send
+./micro-suite: line 1699: echo: write error: Communication error on send
+./micro-suite: line 1699: echo: write error: Communication error on send
stdout:
Can we work on refactoring this into two fd's both visiting the same FIFO, one
for writing tokens, and the other for reading tokens, rather than using <>?
--
Eric Blake