[patch, libstdc++, testsuite] Modify tests to use tmpnam()

Steve Ellcey sje@cup.hp.com
Thu Mar 4 19:39:00 GMT 2010


> Steve, using tmpnam in this case is not a good idea and I should have
> looked into it more before replying.  There are lots of libstdc++ tests
> that create temporary files with specific names, including several
> called tmp_fifo*, and apparently those are working for you.  The same
> names are often used for multiple tests, and in this case tmp_fifo4 is
> also used in the corresponding char test.  If you look into the failure
> some more and can't figure out what's going on, try changing the name
> to tmp_fifo4w to make it unique among the tests.  I remember having
> issues in the ancient past with deleting files on NFS-mounted systems
> and then needing to wait a bit before creating new ones of the same
> name.
> 
> Janis

I think I will drop this for now.  I can't figure out what the problem
actually is.  The failure mode I am seeing (when running the executable
in an NFS directory) is that the test hangs.  It appears to be hanging
on the "wfilebuf::int_type c = fbin.sbumpc();" line but I don't know 
why.  gdb shows I am waiting in the libc read routine.


#0  0x200000007b389490:0 in _read_sys+0x30 () from /usr/lib/hpux32/libc.so.1
#1  0x200000007b39c5c0:0 in read+0x160 () from /usr/lib/hpux32/libc.so.1
#2  0x200000007b74f3a0 in std::__basic_file<char>::xsgetn (__n=1023)
   from /proj/opensrc/nightly/gcc-ia64-hp-hpux11.23-trunk/lib/gcc/ia64-hp-hpux11.23/4.5.0/../../../libstdc++.so.6
#3  0x200000007b67b650 in std::basic_filebuf<wchar_t,std::char_traits<wchar_t> >::underflow ()
   from /proj/opensrc/nightly/gcc-ia64-hp-hpux11.23-trunk/lib/gcc/ia64-hp-hpux11.23/4.5.0/../../../libstdc++.so.6
#4  0x200000007b702c50 in std::basic_streambuf<wchar_t,std::char_traits<wchar_t> >::uflow () at streambuf:682
#5  0x200000007b7051f0 in std::basic_streambuf<wchar_t,std::char_traits<wchar_t> >::sbumpc ()
   from /proj/opensrc/nightly/gcc-ia64-hp-hpux11.23-trunk/lib/gcc/ia64-hp-hpux11.23/4.5.0/../../../libstdc++.so.6
#6  0x4002300:0 in test07 () at 7.cc:72
#7  0x4002590:0 in main () at 7.cc:84

Steve Ellcey
sje@cup.hp.com



More information about the Gcc-patches mailing list