Repository: mesos
Updated Branches:
  refs/heads/master 7515cc9de -> 21ed374db


Improve base hierarchy detection in cgroup tests.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d975e454
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d975e454
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d975e454

Branch: refs/heads/master
Commit: d975e45477b7fbddb298afeb96079f68d11a460e
Parents: 7515cc9
Author: Timothy Chen <[email protected]>
Authored: Wed Jul 15 12:56:25 2015 -0700
Committer: Timothy Chen <[email protected]>
Committed: Wed Jul 15 14:26:29 2015 -0700

----------------------------------------------------------------------
 src/tests/cgroups_tests.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d975e454/src/tests/cgroups_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cgroups_tests.cpp b/src/tests/cgroups_tests.cpp
index af4b37b..a371ee2 100644
--- a/src/tests/cgroups_tests.cpp
+++ b/src/tests/cgroups_tests.cpp
@@ -134,10 +134,9 @@ protected:
           baseHierarchy = TEST_CGROUPS_HIERARCHY;
         } else {
           // Strip the subsystem to get the base hierarchy.
-          baseHierarchy = strings::remove(
-              hierarchy.get(),
-              subsystem,
-              strings::SUFFIX);
+          Try<std::string> baseDirname = Path(hierarchy.get()).dirname();
+          ASSERT_SOME(baseDirname);
+          baseHierarchy = baseDirname.get();
         }
       }
 

Reply via email to