You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by id...@apache.org on 2015/03/11 16:25:49 UTC

mesos git commit: Only execute Mknod test if root.

Repository: mesos
Updated Branches:
  refs/heads/master 501756ed2 -> c72bd196d


Only execute Mknod test if root.


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

Branch: refs/heads/master
Commit: c72bd196d303e9b6a7d63e6960e73c3798b04db9
Parents: 501756e
Author: Ian Downes <id...@twitter.com>
Authored: Wed Mar 11 08:23:46 2015 -0700
Committer: Ian Downes <id...@twitter.com>
Committed: Wed Mar 11 08:23:46 2015 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/c72bd196/3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp b/3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp
index 08bcfa9..c396c1d 100644
--- a/3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp
+++ b/3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp
@@ -902,6 +902,13 @@ TEST_F(OsTest, Libraries)
 
 TEST_F(OsTest, Mknod)
 {
+  // mknod requires root permission.
+  Result<string> user = os::user();
+  CHECK_SOME(user);
+  if (user.get() != "root") {
+    return;
+  }
+
   const string& device = "null";
 
   const string& existing = path::join("/dev", device);