|
Boost Users : |
Subject: Re: [Boost-users] [Boost.Test] unexpected behavior after std::system(...)
From: Richard (legalize+jeeves_at_[hidden])
Date: 2014-12-08 23:13:34
[Please do not mail me a copy of your followup]
"contini.mailing_at_[hidden]" <contini.mailing_at_[hidden]> spake the secret code
<CAPbYoDt06zE2k8jWMtP9Creez4D847NpFi-XNAR=kF-0khMmHg_at_[hidden]> thusly:
>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>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net