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 21:49:59 -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 09:37 PM, Ralf Wildenhues wrote:
> BTW, it might be prudent to document that Autotest needs fds 6 and 7.
> While AT_CHECK commands are run in a subshell, other commands in the
> testsuite aren't, and the fact that the job fds are open in the test
> group code can easily break both the job handling and the test group
> code.  Or we bite the bullet and use another subshell to actually be
> able to close the fds for the test group code.  :-/

Technically, the AT_CHECK commands only need worry about one fd;
AT_JOB_FIFO_OUT_FD (in fact, my patch already clobbers AT_JOB_FIFO_IN_FD
before the test is run), because that is the only fd that must still
exist after the AT_CHECK has completed.

Notice that we have this line:

         . "$at_test_source" [#] AT_JOB_FIFO_OUT_FD>&-

At one point, we already thought about closing the fd only during the
duration of the AT_CHECK, leaving it free for the AT_CHECK to use at
will (and more importantly, so that AT_CHECK can't do 'echo >&7' to
corrupt the state of the parallel test driver); it would just take
un-commenting that line.

Additionally, it is not just AT_CHECK, but the entire
AT_SETUP/AT_CLEANUP set that is run in a subshell.  Roughly, each entire
sourced test group looks like:

#AT_START_1
setup
echo >> $at_group_log
(
   autotest and user's direct code
   ( AT_CHECK code )
   autotest and user's direct code
) 5>&1 2>&1 | eval $at_tee_pipe
read at_status <$at_status_file
#AT_STOP_1

so we already have a subshell where we could close AT_JOB_FIFO_OUT_FD
without issues.

-- 
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]