Boost.Test: "Test setup error: child has exited" error with RC2

Hi, I tried to build the release branch on a Linux OpenSuse 10.2 with g++ (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux) and it worked well. I also called "make check" and the tests were successful. What I now miss is a config.log file which saved the arguments to ./configure (as used by autotools) since I already forgot how I started the build :-) I think I just tried ./configure --prefix=...; make; make install; make check I compiled my own program which uses Boost.Logging v1 and Boost.Test as well as boost::shared_ptr and got many compiler warnings in Boost.Test headers. Many of these (unused arguments) could easily be fixed but nothing happened since I reported some of these 5 months ago in http://svn.boost.org/trac/boost/ticket/1432 ... OK, but I also got a new error once I try to start my test: Test setup error: child has exited; pid: 1001; uid: 20576; exit value: 0 The problem seems to be related to a std::system() call, which I do not understand! Without it it works! Here is my test code: #include <cstdlib> #include <boost/test/included/unit_test_framework.hpp> using boost::unit_test::test_suite; void Vektor3Test1() { } test_suite* Vektor3_test_suite() { test_suite *test = BOOST_TEST_SUITE("Vektor3 test suite"); test->add(BOOST_TEST_CASE(&Vektor3Test1)); return test; } test_suite* init_unit_test_suite(int, char *[]) { std::system("true"); // leads to "Test setup error: child has exited; pid: 1001; uid: 30540; exit value: 0" test_suite *test = BOOST_TEST_SUITE("Master test suite"); test->add(Vektor3_test_suite()); return test; } Any idea? Jens

Jens Seidel wrote:
std::system("true"); // leads to "Test setup error: child has exited; pid: 1001; uid: 30540; exit value: 0"
Any idea?
I know basically nothing about Boost.Test, but I won't let that stop me from guessing that it has a signal handler for SIGCHLD, or conceivably a thread blocking in a call to wait(), that detects your subprocess terminating. Perhaps it's not expecting your test to start subprocesses? Phil.

On Tue, Mar 25, 2008 at 03:57:43PM +0000, Phil Endecott wrote:
Jens Seidel wrote:
std::system("true"); // leads to "Test setup error: child has exited; pid: 1001; uid: 30540; exit value: 0"
Any idea?
I know basically nothing about Boost.Test, but I won't let that stop me from guessing that it has a signal handler for SIGCHLD, or conceivably a thread blocking in a call to wait(), that detects your subprocess terminating. Perhaps it's not expecting your test to start subprocesses?
You're probably right. I didn't know that there exist such a signal (I know only the most basic ones). I reported it as bug #1723 since this behaviour is new and some non-portable cleaning of log files via system("rm file.log") worked in the past. Jens
participants (2)
-
Jens Seidel
-
Phil Endecott