Boost logo

Boost Users :

From: Darren Garvey (lists.drrngrvy_at_[hidden])
Date: 2008-03-20 20:02:52


Hello all,

I'm trying to use system calls in a test that uses Boost.Test. I've been
trying to use Julio Merino Vidal's Boost.Process sandbox code (which I have
working most of the time), but I've also tried the ::system() call too. The
following super-simple test case causes the prepended error... The fact that
I can't get this working makes me wonder if I'm doing something forbidden?

Platform:
-----------------
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang
--prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.1.3
--program-suffix=-4.1--enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug
--enable-mpfr --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
-----------------

Error:
-----------------
Running 1 test case...
unknown location(0): fatal error in "wget_test_1": child has exited; pid:
1000; uid: 11541; exit value: 0

*** 1 failure detected in test suite "wget_tests"

EXIT STATUS: 201
-----------------

Program:
-----------------
#define BOOST_TEST_MODULE broken
#include <boost/test/unit_test.hpp>

BOOST_AUTO_TEST_CASE( broken_test )
{
  ::system("ls");
}
-----------------

Regards,
Darren



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