You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2016/04/13 23:38:32 UTC

[1/2] mesos git commit: Mark private global functions `static` in libprocess tests.

Repository: mesos
Updated Branches:
  refs/heads/master 3e4770c04 -> e492b5427


Mark private global functions `static` in libprocess tests.

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


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

Branch: refs/heads/master
Commit: 8501e105c8ee12bf7f55447759d7a611fa892bbb
Parents: 3e4770c
Author: Neil Conway <ne...@gmail.com>
Authored: Wed Apr 13 14:33:34 2016 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Wed Apr 13 14:33:34 2016 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/src/tests/future_tests.cpp  | 15 ++++++++-------
 3rdparty/libprocess/src/tests/process_tests.cpp | 18 ++++++++++--------
 2 files changed, 18 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/8501e105/3rdparty/libprocess/src/tests/future_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/future_tests.cpp b/3rdparty/libprocess/src/tests/future_tests.cpp
index 8a21c6d..383d260 100644
--- a/3rdparty/libprocess/src/tests/future_tests.cpp
+++ b/3rdparty/libprocess/src/tests/future_tests.cpp
@@ -256,31 +256,31 @@ TEST(FutureTest, After2)
 }
 
 
-Future<bool> readyFuture()
+static Future<bool> readyFuture()
 {
   return true;
 }
 
 
-Future<bool> failedFuture()
+static Future<bool> failedFuture()
 {
   return Failure("The value is not positive (or zero)");
 }
 
 
-Future<bool> pendingFuture(const Future<bool>& future)
+static Future<bool> pendingFuture(const Future<bool>& future)
 {
   return future; // Keep it pending.
 }
 
 
-Future<string> second(const bool& b)
+static Future<string> second(const bool& b)
 {
   return b ? string("true") : string("false");
 }
 
 
-Future<string> third(const string& s)
+static Future<string> third(const string& s)
 {
   return s;
 }
@@ -319,13 +319,14 @@ TEST(FutureTest, Chain)
 }
 
 
-Future<bool> inner1(const Future<bool>& future)
+static Future<bool> inner1(const Future<bool>& future)
 {
   return future;
 }
 
 
-Future<int> inner2(std::atomic_bool* executed, const Future<int>& future)
+static Future<int> inner2(
+    std::atomic_bool* executed, const Future<int>& future)
 {
   executed->store(true);
   return future;

http://git-wip-us.apache.org/repos/asf/mesos/blob/8501e105/3rdparty/libprocess/src/tests/process_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/process_tests.cpp b/3rdparty/libprocess/src/tests/process_tests.cpp
index 274a76f..3fce6fc 100644
--- a/3rdparty/libprocess/src/tests/process_tests.cpp
+++ b/3rdparty/libprocess/src/tests/process_tests.cpp
@@ -1040,36 +1040,37 @@ TEST(ProcessTest, Http2)
 }
 
 
-int foo()
+static int foo()
 {
   return 1;
 }
 
-int foo1(int a)
+
+static int foo1(int a)
 {
   return a;
 }
 
 
-int foo2(int a, int b)
+static int foo2(int a, int b)
 {
   return a + b;
 }
 
 
-int foo3(int a, int b, int c)
+static int foo3(int a, int b, int c)
 {
   return a + b + c;
 }
 
 
-int foo4(int a, int b, int c, int d)
+static int foo4(int a, int b, int c, int d)
 {
   return a + b + c + d;
 }
 
 
-void bar(int a)
+static void bar(int a)
 {
   return;
 }
@@ -1159,9 +1160,10 @@ TEST(ProcessTest, Provide)
 }
 
 
-int baz(string s) { return 42; }
+static int baz(string s) { return 42; }
+
 
-Future<int> bam(string s) { return 42; }
+static Future<int> bam(string s) { return 42; }
 
 
 TEST(ProcessTest, Defers)


[2/2] mesos git commit: Documented internal `libprocess` helper function.

Posted by bm...@apache.org.
Documented internal `libprocess` helper function.

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


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

Branch: refs/heads/master
Commit: e492b54270dac926bb6c26e8ec3293eb5c8258d9
Parents: 8501e10
Author: Neil Conway <ne...@gmail.com>
Authored: Wed Apr 13 14:34:07 2016 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Wed Apr 13 14:37:41 2016 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/src/process.cpp | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e492b542/3rdparty/libprocess/src/process.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/process.cpp b/3rdparty/libprocess/src/process.cpp
index 3f2f836..afeddec 100644
--- a/3rdparty/libprocess/src/process.cpp
+++ b/3rdparty/libprocess/src/process.cpp
@@ -556,6 +556,12 @@ static void transport(Message* message, ProcessBase* sender = NULL)
 }
 
 
+// Returns true if `request` contains an inbound libprocess message.
+// A libprocess message can either be sent by another instance of
+// libprocess (i.e. both of the "User-Agent" and "Libprocess-From"
+// headers will be set), or a client that speaks the libprocess
+// protocol (i.e. only the "Libprocess-From" header will be set).
+// This function returns true for either case.
 static bool libprocess(Request* request)
 {
   return