diff options
author | jln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-10 18:04:53 +0000 |
---|---|---|
committer | jln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-10 18:04:53 +0000 |
commit | b458182b030dcd6a7a4ee3b03c8adb29cb56f8ed (patch) | |
tree | 0a5f372d3d1a0a6c9651e5b9f09d160cb7778478 /sandbox | |
parent | 24f9524dec05d36c7640d74f0d1e7eb0cf94090c (diff) | |
download | chromium_src-b458182b030dcd6a7a4ee3b03c8adb29cb56f8ed.zip chromium_src-b458182b030dcd6a7a4ee3b03c8adb29cb56f8ed.tar.gz chromium_src-b458182b030dcd6a7a4ee3b03c8adb29cb56f8ed.tar.bz2 |
Linux sandbox tests: always stop threads
Always stop threads in an accountable way in order to not pollute
other tests.
TEST=sandbox_linux_unittests
NOTRY=true
Review URL: https://codereview.chromium.org/145123012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250148 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/linux/services/thread_helpers_unittests.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sandbox/linux/services/thread_helpers_unittests.cc b/sandbox/linux/services/thread_helpers_unittests.cc index ec7e445..991e60e 100644 --- a/sandbox/linux/services/thread_helpers_unittests.cc +++ b/sandbox/linux/services/thread_helpers_unittests.cc @@ -68,6 +68,8 @@ TEST(ThreadHelpers, MAYBE_IsSingleThreadedBasic) { base::Thread thread("sandbox_tests"); ASSERT_TRUE(thread.Start()); ASSERT_FALSE(ThreadHelpers::IsSingleThreaded(task.fd())); + // Explicitly stop the thread here to not pollute the next test. + ASSERT_TRUE(ThreadHelpers::StopThreadAndWatchProcFS(task.fd(), &thread)); } TEST(ThreadHelpers, MAYBE_IsSingleThreadedIterated) { @@ -79,6 +81,8 @@ TEST(ThreadHelpers, MAYBE_IsSingleThreadedIterated) { base::Thread thread("sandbox_tests"); ASSERT_TRUE(thread.Start()); ASSERT_FALSE(ThreadHelpers::IsSingleThreaded(task.fd())); + // Explicitly stop the thread here to not pollute the next test. + ASSERT_TRUE(ThreadHelpers::StopThreadAndWatchProcFS(task.fd(), &thread)); } } |