You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jp...@apache.org on 2017/09/07 05:35:15 UTC
[5/6] mesos git commit: Used SAFE_EXIT macro in
`CgroupsAnyHierarchyTest.ROOT_CGROUPS_Write`.
Used SAFE_EXIT macro in `CgroupsAnyHierarchyTest.ROOT_CGROUPS_Write`.
Used SAFE_EXIT macro in `CgroupsAnyHierarchyTest.ROOT_CGROUPS_Write`.
Review: https://reviews.apache.org/r/61801/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/905c7587
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/905c7587
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/905c7587
Branch: refs/heads/master
Commit: 905c758782f8587276ee207261277517a34482a2
Parents: 62631ca
Author: Andrei Budnik <ab...@mesosphere.com>
Authored: Wed Sep 6 22:02:29 2017 -0700
Committer: James Peach <jp...@apache.org>
Committed: Wed Sep 6 22:02:29 2017 -0700
----------------------------------------------------------------------
src/tests/containerizer/cgroups_tests.cpp | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/905c7587/src/tests/containerizer/cgroups_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/cgroups_tests.cpp b/src/tests/containerizer/cgroups_tests.cpp
index c5d83e6..80516a7 100644
--- a/src/tests/containerizer/cgroups_tests.cpp
+++ b/src/tests/containerizer/cgroups_tests.cpp
@@ -39,6 +39,7 @@
#include <process/owned.hpp>
#include <process/reap.hpp>
+#include <stout/exit.hpp>
#include <stout/gtest.hpp>
#include <stout/hashmap.hpp>
#include <stout/numify.hpp>
@@ -486,12 +487,8 @@ TEST_F(CgroupsAnyHierarchyTest, ROOT_CGROUPS_Write)
// In child process, wait for kill signal.
while (true) { sleep(1); }
- // Should not reach here.
- const char* message = "Error, child should be killed before reaching here";
- while (write(STDERR_FILENO, message, strlen(message)) == -1 &&
- errno == EINTR);
-
- _exit(EXIT_FAILURE);
+ SAFE_EXIT(
+ EXIT_FAILURE, "Error, child should be killed before reaching here");
}
// In parent process.