V3 Testsuite PATCH: Disable tests on newlib
Mark Mitchell
mark@codesourcery.com
Mon Jan 12 08:13:00 GMT 2004
On Thu, 2004-01-08 at 09:06, Benjamin Kosnik wrote:
> >Is that what you want?
>
> Yes, this is what I'd prefer.
OK. I checked in the attached patch.
Tested on i686-pc-linux-gnu, applied on the mainline.
--
Mark Mitchell <mark@codesourcery.com>
CodeSourcery, LLC
-------------- next part --------------
2004-01-12 Mark Mitchell <mark@codesourcery.com>
* testsuite/testsuite_hooks.h (__gnu_test::try_mkfifo): Declare it.
* testsuite/testsuite_hooks.cc (__gnu_test::try_mkfifo): Define
it.
* testsuite/27_io/basic_filebuf/close/char/4879.cc: Use try_mkfifo
and remove Cygwin XFAIL.
* testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise.
* testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise.
* testsuite/27_io/basic_filebuf/open/char/9507.cc: Likewise.
* testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc:
Likewise.
* testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise.
* testsuite/27_io/objects/char/7.cc: Likewise.
* testsuite/27_io/objects/char/9661-1.cc: Likewise.
* testsuite/27_io/objects/wchar_t/7.cc: Likewise.
* testsuite/27_io/objects/wchar_t/9661-1.cc: Likewise.
Index: testsuite/testsuite_hooks.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/testsuite_hooks.cc,v
retrieving revision 1.17
diff -c -5 -p -r1.17 testsuite_hooks.cc
*** testsuite/testsuite_hooks.cc 20 Oct 2003 22:11:37 -0000 1.17
--- testsuite/testsuite_hooks.cc 12 Jan 2004 07:52:37 -0000
*************** namespace __gnu_test
*** 206,215 ****
--- 206,226 ----
else
throw;
}
}
+ int
+ try_mkfifo (const char* filename, mode_t mode)
+ {
+ #ifdef _NEWLIB_VERSION
+ /* Newlib does not have mkfifo. */
+ exit(0);
+ #else
+ return mkfifo(filename, mode);
+ #endif
+ }
+
counter::size_type counter::count = 0;
unsigned int copy_constructor::count_ = 0;
unsigned int copy_constructor::throw_on_ = 0;
unsigned int assignment_operator::count_ = 0;
unsigned int assignment_operator::throw_on_ = 0;
Index: testsuite/testsuite_hooks.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/testsuite_hooks.h,v
retrieving revision 1.24
diff -c -5 -p -r1.24 testsuite_hooks.h
*** testsuite/testsuite_hooks.h 20 Oct 2003 22:11:37 -0000 1.24
--- testsuite/testsuite_hooks.h 12 Jan 2004 07:52:37 -0000
***************
*** 61,70 ****
--- 61,73 ----
#include <bits/c++config.h>
#include <bits/functexcept.h>
#include <cstddef>
#include <locale>
#include <ext/pod_char_traits.h>
+ #ifdef _GLIBCXX_HAVE_SYS_STAT_H
+ #include <sys/stat.h>
+ #endif
#ifdef _GLIBCXX_ASSERT
# include <cassert>
# define VERIFY(fn) assert(fn)
#else
*************** namespace __gnu_test
*** 139,148 ****
--- 142,153 ----
// Try to create a locale with the given name. If it fails, bail.
std::locale
try_named_locale(const char* name);
+ int
+ try_mkfifo (const char* filename, mode_t mode);
// Test data types.
struct pod_char
{
unsigned char c;
Index: testsuite/27_io/basic_filebuf/close/char/4879.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4879.cc,v
retrieving revision 1.3
diff -c -5 -p -r1.3 4879.cc
*** testsuite/27_io/basic_filebuf/close/char/4879.cc 23 Sep 2003 20:02:53 -0000 1.3
--- testsuite/27_io/basic_filebuf/close/char/4879.cc 12 Jan 2004 07:52:38 -0000
***************
*** 21,33 ****
// @diff@ %-*.tst %-*.txt
// various tests for filebuf::open() and filebuf::close() including
// the non-portable functionality in the libstdc++-v3 IO library
- // XXX cygwin does not support mkfifo
- // { dg-do run { xfail *-*-cygwin* } }
-
#include <fstream>
#include <iostream>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
--- 21,30 ----
***************
*** 38,53 ****
// libstdc++/2913, libstdc++/4879
// John Fardo <jfardo@laurelnetworks.com>, Brad Garcia <garsh@attbi.com>
void
test_04()
{
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo1";
signal(SIGPIPE, SIG_IGN);
unlink(name);
! if (0 != mkfifo(name, S_IRWXU))
{
std::cerr << "failed to create fifo" << std::endl;
exit(-1);
}
--- 35,52 ----
// libstdc++/2913, libstdc++/4879
// John Fardo <jfardo@laurelnetworks.com>, Brad Garcia <garsh@attbi.com>
void
test_04()
{
+ using namespace __gnu_test;
+
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo1";
signal(SIGPIPE, SIG_IGN);
unlink(name);
! if (0 != try_mkfifo(name, S_IRWXU))
{
std::cerr << "failed to create fifo" << std::endl;
exit(-1);
}
Index: testsuite/27_io/basic_filebuf/close/char/9964.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc,v
retrieving revision 1.4
diff -c -5 -p -r1.4 9964.cc
*** testsuite/27_io/basic_filebuf/close/char/9964.cc 23 Sep 2003 20:02:53 -0000 1.4
--- testsuite/27_io/basic_filebuf/close/char/9964.cc 12 Jan 2004 07:52:38 -0000
***************
*** 21,33 ****
// @diff@ %-*.tst %-*.txt
// various tests for filebuf::open() and filebuf::close() including
// the non-portable functionality in the libstdc++-v3 IO library
- // XXX cygwin does not support mkfifo
- // { dg-do run { xfail *-*-cygwin* } }
-
#include <fstream>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <sys/types.h>
--- 21,30 ----
***************
*** 36,53 ****
// libstdc++/9964
void test_07()
{
using namespace std;
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo3";
signal(SIGPIPE, SIG_IGN);
unlink(name);
! mkfifo(name, S_IRWXU);
int child = fork();
VERIFY( child != -1 );
if (child == 0)
--- 33,51 ----
// libstdc++/9964
void test_07()
{
using namespace std;
+ using namespace __gnu_test;
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo3";
signal(SIGPIPE, SIG_IGN);
unlink(name);
! try_mkfifo(name, S_IRWXU);
int child = fork();
VERIFY( child != -1 );
if (child == 0)
Index: testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc,v
retrieving revision 1.2
diff -c -5 -p -r1.2 13171-2.cc
*** testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc 29 Nov 2003 17:42:16 -0000 1.2
--- testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc 12 Jan 2004 07:52:38 -0000
***************
*** 29,45 ****
// libstdc++/13171
void test01()
{
bool test __attribute__((unused)) = true;
using namespace std;
locale loc_fr(__gnu_test::try_named_locale("fr_FR"));
locale loc_en(__gnu_test::try_named_locale("en_US"));
const char* name = "tmp_fifo_13171-2";
unlink(name);
! mkfifo(name, S_IRWXU);
int child = fork();
if (child == 0)
{
filebuf fb;
--- 29,46 ----
// libstdc++/13171
void test01()
{
bool test __attribute__((unused)) = true;
using namespace std;
+ using namespace __gnu_test;
locale loc_fr(__gnu_test::try_named_locale("fr_FR"));
locale loc_en(__gnu_test::try_named_locale("en_US"));
const char* name = "tmp_fifo_13171-2";
unlink(name);
! try_mkfifo(name, S_IRWXU);
int child = fork();
if (child == 0)
{
filebuf fb;
Index: testsuite/27_io/basic_filebuf/open/char/9507.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/9507.cc,v
retrieving revision 1.3
diff -c -5 -p -r1.3 9507.cc
*** testsuite/27_io/basic_filebuf/open/char/9507.cc 23 Sep 2003 20:02:55 -0000 1.3
--- testsuite/27_io/basic_filebuf/open/char/9507.cc 12 Jan 2004 07:52:38 -0000
***************
*** 21,33 ****
// @diff@ %-*.tst %-*.txt
// various tests for filebuf::open() and filebuf::close() including
// the non-portable functionality in the libstdc++-v3 IO library
- // XXX cygwin does not support mkfifo
- // { dg-do run { xfail *-*-cygwin* } }
-
#include <fstream>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <sys/types.h>
--- 21,30 ----
***************
*** 35,51 ****
#include <testsuite_hooks.h>
// libstdc++/9507
void test_06()
{
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo2";
signal(SIGPIPE, SIG_IGN);
unlink(name);
! mkfifo(name, S_IRWXU);
if (!fork())
{
std::filebuf fbuf;
fbuf.open(name, std::ios_base::in);
--- 32,49 ----
#include <testsuite_hooks.h>
// libstdc++/9507
void test_06()
{
+ using namespace __gnu_test;
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo2";
signal(SIGPIPE, SIG_IGN);
unlink(name);
! try_mkfifo(name, S_IRWXU);
if (!fork())
{
std::filebuf fbuf;
fbuf.open(name, std::ios_base::in);
Index: testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc,v
retrieving revision 1.3
diff -c -5 -p -r1.3 9533-1.cc
*** testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc 23 Sep 2003 20:03:00 -0000 1.3
--- testsuite/27_io/basic_filebuf/showmanyc/char/9533-1.cc 12 Jan 2004 07:52:38 -0000
***************
*** 16,28 ****
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// 27.8.1.4 Overridden virtual functions
- // XXX cygwin does not support mkfifo
- // { dg-do run { xfail *-*-cygwin* } }
-
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
--- 16,25 ----
***************
*** 31,49 ****
// libstdc++/9533
void test_01()
{
using namespace std;
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo1";
const int count = 10000;
signal(SIGPIPE, SIG_IGN);
unlink(name);
! if (0 != mkfifo(name, S_IRWXU))
{
VERIFY( false );
}
int fval = fork();
--- 28,47 ----
// libstdc++/9533
void test_01()
{
using namespace std;
+ using namespace __gnu_test;
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo1";
const int count = 10000;
signal(SIGPIPE, SIG_IGN);
unlink(name);
! if (0 != try_mkfifo(name, S_IRWXU))
{
VERIFY( false );
}
int fval = fork();
Index: testsuite/27_io/basic_filebuf/underflow/char/10097.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/10097.cc,v
retrieving revision 1.3
diff -c -5 -p -r1.3 10097.cc
*** testsuite/27_io/basic_filebuf/underflow/char/10097.cc 23 Sep 2003 20:03:02 -0000 1.3
--- testsuite/27_io/basic_filebuf/underflow/char/10097.cc 12 Jan 2004 07:52:38 -0000
***************
*** 18,30 ****
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// 27.8.1.4 Overridden virtual functions
- // XXX cygwin does not support mkfifo
- // { dg-do run { xfail *-*-cygwin* } }
-
#include <fstream>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <sys/types.h>
--- 18,27 ----
*************** public:
*** 46,63 ****
// libstdc++/10097
// filebuf::underflow drops characters.
void test16()
{
using namespace std;
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo1";
signal(SIGPIPE, SIG_IGN);
unlink(name);
! if (0 != mkfifo(name, S_IRWXU))
{
VERIFY( false );
}
int fval = fork();
--- 43,61 ----
// libstdc++/10097
// filebuf::underflow drops characters.
void test16()
{
using namespace std;
+ using namespace __gnu_test;
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo1";
signal(SIGPIPE, SIG_IGN);
unlink(name);
! if (0 != try_mkfifo(name, S_IRWXU))
{
VERIFY( false );
}
int fval = fork();
Index: testsuite/27_io/objects/char/7.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/27_io/objects/char/7.cc,v
retrieving revision 1.3
diff -c -5 -p -r1.3 7.cc
*** testsuite/27_io/objects/char/7.cc 23 Sep 2003 20:03:28 -0000 1.3
--- testsuite/27_io/objects/char/7.cc 12 Jan 2004 07:52:46 -0000
***************
*** 18,30 ****
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// 27.3 Standard iostream objects
- // XXX cygwin does not support mkfifo
- // { dg-do run { xfail *-*-cygwin* } }
-
#include <fstream>
#include <iostream>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
--- 18,27 ----
***************
*** 34,51 ****
// Check that cout.flush() is called when last ios_base::Init is destroyed.
void test07()
{
using namespace std;
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo4";
signal(SIGPIPE, SIG_IGN);
unlink(name);
! mkfifo(name, S_IRWXU);
int child = fork();
VERIFY( child != -1 );
if (child == 0)
--- 31,49 ----
// Check that cout.flush() is called when last ios_base::Init is destroyed.
void test07()
{
using namespace std;
+ using namespace __gnu_test;
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo4";
signal(SIGPIPE, SIG_IGN);
unlink(name);
! try_mkfifo(name, S_IRWXU);
int child = fork();
VERIFY( child != -1 );
if (child == 0)
Index: testsuite/27_io/objects/char/9661-1.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc,v
retrieving revision 1.3
diff -c -5 -p -r1.3 9661-1.cc
*** testsuite/27_io/objects/char/9661-1.cc 23 Sep 2003 20:03:28 -0000 1.3
--- testsuite/27_io/objects/char/9661-1.cc 12 Jan 2004 07:52:46 -0000
***************
*** 16,28 ****
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
- // XXX cygwin does not support mkfifo
- // { dg-do run { xfail *-*-cygwin* } }
-
#include <testsuite_hooks.h>
#include <cstdio>
#include <iostream>
#include <unistd.h>
#include <signal.h>
--- 16,25 ----
***************
*** 34,52 ****
// If cin.rdbuf() is a filebuf, this succeeds when stdin is a regular
// file, but fails otherwise, hence the named fifo.
void test01()
{
using namespace std;
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo5";
signal(SIGPIPE, SIG_IGN);
unlink(name);
! mkfifo(name, S_IRWXU);
int child = fork();
VERIFY( child != -1 );
if (child == 0)
--- 31,50 ----
// If cin.rdbuf() is a filebuf, this succeeds when stdin is a regular
// file, but fails otherwise, hence the named fifo.
void test01()
{
using namespace std;
+ using namespace __gnu_test;
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo5";
signal(SIGPIPE, SIG_IGN);
unlink(name);
! try_mkfifo(name, S_IRWXU);
int child = fork();
VERIFY( child != -1 );
if (child == 0)
Index: testsuite/27_io/objects/wchar_t/7.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/27_io/objects/wchar_t/7.cc,v
retrieving revision 1.2
diff -c -5 -p -r1.2 7.cc
*** testsuite/27_io/objects/wchar_t/7.cc 23 Sep 2003 20:03:28 -0000 1.2
--- testsuite/27_io/objects/wchar_t/7.cc 12 Jan 2004 07:52:46 -0000
***************
*** 31,48 ****
// Check that wcout.flush() is called when last ios_base::Init is destroyed.
void test07()
{
using namespace std;
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo4";
signal(SIGPIPE, SIG_IGN);
unlink(name);
! mkfifo(name, S_IRWXU);
int child = fork();
VERIFY( child != -1 );
if (child == 0)
--- 31,49 ----
// Check that wcout.flush() is called when last ios_base::Init is destroyed.
void test07()
{
using namespace std;
+ using namespace __gnu_test;
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo4";
signal(SIGPIPE, SIG_IGN);
unlink(name);
! try_mkfifo(name, S_IRWXU);
int child = fork();
VERIFY( child != -1 );
if (child == 0)
Index: testsuite/27_io/objects/wchar_t/9661-1.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc,v
retrieving revision 1.2
diff -c -5 -p -r1.2 9661-1.cc
*** testsuite/27_io/objects/wchar_t/9661-1.cc 23 Sep 2003 20:03:28 -0000 1.2
--- testsuite/27_io/objects/wchar_t/9661-1.cc 12 Jan 2004 07:52:46 -0000
***************
*** 31,49 ****
// If wcin.rdbuf() is a filebuf, this succeeds when stdin is a regular
// file, but fails otherwise, hence the named fifo.
void test01()
{
using namespace std;
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo5";
signal(SIGPIPE, SIG_IGN);
unlink(name);
! mkfifo(name, S_IRWXU);
int child = fork();
VERIFY( child != -1 );
if (child == 0)
--- 31,50 ----
// If wcin.rdbuf() is a filebuf, this succeeds when stdin is a regular
// file, but fails otherwise, hence the named fifo.
void test01()
{
using namespace std;
+ using namespace __gnu_test;
bool test __attribute__((unused)) = true;
const char* name = "tmp_fifo5";
signal(SIGPIPE, SIG_IGN);
unlink(name);
! try_mkfifo(name, S_IRWXU);
int child = fork();
VERIFY( child != -1 );
if (child == 0)
More information about the Libstdc++
mailing list