You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2014/02/13 22:52:22 UTC

[5/5] git commit: Fixed tests to not use mlock on linux unless privileged.

Fixed tests to not use mlock on linux unless privileged.

Review: https://reviews.apache.org/r/18024


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

Branch: refs/heads/master
Commit: 81693945b95f24d60bb34368a20d66f78a120558
Parents: f0781a3
Author: Ian Downes <ia...@gmail.com>
Authored: Thu Feb 13 11:51:52 2014 -0800
Committer: Vinod Kone <vi...@twitter.com>
Committed: Thu Feb 13 13:51:59 2014 -0800

----------------------------------------------------------------------
 src/tests/environment.cpp | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/81693945/src/tests/environment.cpp
----------------------------------------------------------------------
diff --git a/src/tests/environment.cpp b/src/tests/environment.cpp
index 585d73e..5c92fcd 100644
--- a/src/tests/environment.cpp
+++ b/src/tests/environment.cpp
@@ -102,6 +102,12 @@ static bool enable(const ::testing::TestInfo& test)
         return false;
       }
     }
+
+    // On Linux non-privileged users are limited to 64k of locked memory so we
+    // cannot run the MemIsolatorTest.Usage.
+    if (strings::contains(name, "MemIsolatorTest") && os::user() != "root") {
+      return false;
+    }
 #endif
   }