[Boost.Test] unexpected behavior after std::system(...)
Hi,
I'm using boost 1.57 with gcc 4.7.2 on a debian wheezy. I'm testing an
external program that has a non-zero return code and i'm experiencing an
unexpected behavior of Boost.Test library.
If the test below is linked statically (commenting the first line of
course) everything works fine and all the three tests are executed.
If the test below is linked dynamically i get the following output:
test0
test1
unknown location(0): fatal error in "test1": child has exited; pid:
32314; uid: 1000; exit value: 4
(here program hangs forever and the third test is never executed)
Defining the environment variable BOOST_TEST_CATCH_SYSTEM_ERRORS=No circumvents
the problem. But i don't want to define it on all of the team member's
computers and test machines. This can be considered a boost bug?
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE test_module
#define BOOST_TEST_IGNORE_NON_ZERO_CHILD_CODE
#include
[Please do not mail me a copy of your followup]
"contini.mailing@gmail.com"
I'm using boost 1.57 with gcc 4.7.2 on a debian wheezy. I'm testing an external program that has a non-zero return code and i'm experiencing an unexpected behavior of Boost.Test library.
If the test below is linked statically (commenting the first line of course) everything works fine and all the three tests are executed. If the test below is linked dynamically i get the following output:
test0 test1 unknown location(0): fatal error in "test1": child has exited; pid: 32314; uid: 1000; exit value: 4 (here program hangs forever and the third test is never executed)
Defining the environment variable BOOST_TEST_CATCH_SYSTEM_ERRORS=No circumvents the problem. But i don't want to define it on all of the team member's computers and test machines. This can be considered a boost bug?
I would file a bug on it. I don't see why it would work properly with static linking, but fail with dynamic linking. I haven't dug into the source, but if you control the way your executable is invoked (for instance, if it is invoked by the build system), you can obtain the same effect as the environment variable by using the command-line argument --catch_system_errors=no. -- "The Direct3D Graphics Pipeline" free book http://tinyurl.com/d3d-pipeline The Computer Graphics Museum http://computergraphicsmuseum.org The Terminals Wiki http://terminals.classiccmp.org Legalize Adulthood! (my blog) http://legalizeadulthood.wordpress.com
participants (2)
-
contini.mailing@gmail.com
-
legalize+jeeves@mail.xmission.com