// { dg-require-fork "" }
// { dg-require-mkfifo "" }
-// Copyright (C) 2001-2015 Free Software Foundation, Inc.
+// Copyright (C) 2001-2020 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
#include <sys/types.h>
#include <sys/stat.h>
-// No asserts, avoid leaking the semaphores if a VERIFY fails.
-#undef _GLIBCXX_ASSERT
-
#include <testsuite_hooks.h>
// libstdc++/9964
{
using namespace std;
using namespace __gnu_test;
- bool test __attribute__((unused)) = true;
+ bool test = true;
semaphore s1, s2;
const char* name = "tmp_fifo3";
mkfifo(name, S_IRWXU);
int child = fork();
- VERIFY( child != -1 );
+ test &= bool( child != -1 );
if (child == 0)
{
filebuf fb;
filebuf* ret = fb.open(name, ios_base::in | ios_base::out);
- VERIFY( ret != 0 );
- VERIFY( fb.is_open() );
+ test &= bool( ret != 0 );
+ test &= bool( fb.is_open() );
s1.signal();
s2.wait();
fb.sputc('a');
ret = fb.close();
- VERIFY( ret != 0 );
- VERIFY( !fb.is_open() );
+ test &= bool( ret != 0 );
+ test &= bool( !fb.is_open() );
return test;
}