Testsuite problem

Pétur Runólfsson peturr02@ru.is
Fri Apr 16 16:07:00 GMT 2004


Hi,

There is a small problem with this change:

2004-02-04  Benjamin Kosnik  <bkoz@redhat.com>
            Zack Weinberg  <zack@codesourcery.com>

        * config/io/basic_file_stdio.cc (__gnu_internal::fopen_mode):
        New function.
        (__basic_file<char>::sys_open, __basic_file<char>::open): Use it.
        (__basic_file<char>::_M_open_mode): Delete.
        * config/io/basic_file_stdio.cc: Delete declaration of _M_open_mode.

        * testsuite/27_io/basic_filebuf/close/char/9964.cc
        * testsuite/27_io/basic_filebuf/open/char/9507.cc:
        Correct flags to filebuf::open calls.
        ...

testsuite/27_io/basic_filebuf/close/char/9964.cc was supposed to check
how basic_filebuf::close() behaves when a low level write fails, but
with this change, the write is no longer failing:

   filebuf fb;
   sleep(1);
-  filebuf* ret = fb.open(name, ios_base::out | ios_base::trunc);
+  filebuf* ret = fb.open(name, ios_base::in | ios_base::out);
   VERIFY( ret != NULL );
   VERIFY( fb.is_open() );
 
@@ -67,7 +67,7 @@
   fb.sputc('a');
 
   ret = fb.close();
-  VERIFY( ret == NULL );
+  VERIFY( ret != NULL );
   VERIFY( !fb.is_open() );
 }

The solution is probably to just use ios_base::out, and XFAIL on those
targets where that doesn't work.

There is no problem with the rest of the changes, in those tests the
pipes are being used to make seek fail.

Regards,
Petur




More information about the Libstdc++ mailing list