[
https://issues.apache.org/jira/browse/MESOS-641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13752115#comment-13752115
]
Benjamin Hindman commented on MESOS-641:
----------------------------------------
My guess is OsTest.pstree is failing on line 517 because the shell is
fork/exec'ing instead of just exec'ing. It appears as though these semantics
are implementation specific (at least on OS X Bash just exec's simple
commands)? The fix here will be to expect greater than 0 pids but less than 3.
We're likely not seeing this at line 506 because we capture the tree before the
shell forks. But to be pedantic it probably makes sense to do the same thing
there.
The failure at line 498 feels like it's from a process sticking around from a
previous test. It would be great to print out the tree on that failure to try
and track down the culprit:
EXPECT_EQ(0u, tree.get().children.size()) << stringify(tree.get());
Finally, OsTest.killtree is failing for exactly the reason BenM pointed out. I
think the approaches suggested by the TODO are probably acceptable, especially
since the Fork/Exec abstraction is really just for testing.
> Stout killtree / pstree tests fail on Ubuntu 10.04.
> ---------------------------------------------------
>
> Key: MESOS-641
> URL: https://issues.apache.org/jira/browse/MESOS-641
> Project: Mesos
> Issue Type: Bug
> Components: test
> Affects Versions: 0.14.0
> Environment: Debian Squeeze or Ubuntu 10.04
> git HEAD version (from github)
> Reporter: Damien Hardy
> Assignee: Benjamin Hindman
>
> When running stout-tests during make check :
> [...]
> [ RUN ] OsTest.pstree
> stout/tests/os_tests.cpp:517: Failure
> Value of: tree.get().children.size()
> Actual: 2
> Expected: 1u
> Which is: 1
> [ FAILED ] OsTest.pstree (62 ms)
> [...]
> Another instance:
> [ RUN ] OsTest.pstree
> ../../../../3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp:498: Failure
> Value of: tree.get().children.size()
> Actual: 1
> Expected: 0u
> Which is: 0
> ../../../../3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp:517: Failure
> Value of: tree.get().children.size()
> Actual: 2
> Expected: 1u
> Which is: 1
> [ FAILED ] OsTest.pstree (19 ms)
> Also failing:
> [ RUN ] OsTest.killtree
> ../../../../3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp:418: Failure
> tree: Process already terminated
> [ FAILED ] OsTest.killtree (6 ms)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira