Opened 13 years ago

Closed 13 years ago

Last modified 7 years ago

#3481 closed Bugs (fixed)

Boost Testing doesn't work under Sun Solaris Containers

Reported by: ranko.veselinovic@… Owned by: Gennadiy Rozental
Milestone: Boost 1.59.0 Component: test
Version: Boost 1.40.0 Severity: Showstopper
Keywords: Cc:

Description

In the function under_debugger() (debug.ipp) the terminating condition for the while loop is pid != 0, which is for a normal solaris installation correct.

But under a container the init-pid is zsched, which doesn't have the pid==1 and the ppid==0. So you have to test for ppid == pid.

The following patch should fix the problem.

$ diff -Nru boost/test/impl/debug.ipp.orig boost/test/impl/debug.ipp --- boost/test/impl/debug.ipp.orig 2009-09-21 15:36:06.442325869 +0200 +++ boost/test/impl/debug.ipp 2009-09-21 15:36:39.606341269 +0200 @@ -653,7 +653,7 @@

if( dbg_list.find( pi.binary_name() ) != const_string::npos )

return true;

  • pid = pi.parent_pid();

+ pid = (pi.parent_pid() == pid ? 0 : pi.parent_pid());

}

return false;

Regards Ranko

Change History (2)

comment:1 by Gennadiy Rozental, 13 years ago

Resolution: fixed
Status: newclosed

(In [57850]) Handles the case where parent pid == process pid and != 0. Fixes #3495. Fixes #3481. Fixes #3592

comment:2 by Raffi Enficiaud, 7 years ago

Milestone: Boost 1.41.0Boost 1.59.0
Note: See TracTickets for help on using tickets.