PATCH: Eliminate uses of "sleep" in V3 testsuite

Mark Mitchell mark@codesourcery.com
Tue Jan 4 00:23:00 GMT 2005


Benjamin Kosnik wrote:

> Sorry I missed the beginning of this thread. Perhaps you've already
> found this, but there has been some commentary about fixing this here:
> 
> http://gcc.gnu.org/ml/libstdc++/2004-02/msg00015.html

That's an unrelated issue.  That issue is that the V3 tests are opening 
FIFOs in O_RDWR mode, which is undefined behavior according to POSIX. 
(I didn't check the POSIX standard itself, but the GNU/Linux manual 
pages say that it is undefined behavior in POSIX, but allowed in GNU/Linux.)

I'm not sure exactly why the V3 testsuite is using FIFOs for these 
tests.  It looks to me like you could test most of the same things 
(e.g., that binding C++ streams to things other than standard files 
works) using pipes.  That would also allow you to avoid using fork; you 
could just use select instead, and drop all the synchronization stuff.

> Please think about formatting this code consistently, and hopefully like
> the rest of libstdc++ hackers do. Suggestion: see C++STYLE.

I checked in the attached patch, after making sure that the tests still 
pass.

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: v3.patch
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20050104/93a53664/attachment.ksh>


More information about the Libstdc++ mailing list