You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2017/05/18 22:56:28 UTC
mesos git commit: Fixed the fd type in tests for consistency.
Repository: mesos
Updated Branches:
refs/heads/master 7acec00b6 -> 436d7ef68
Fixed the fd type in tests for consistency.
Review: https://reviews.apache.org/r/59314
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/436d7ef6
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/436d7ef6
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/436d7ef6
Branch: refs/heads/master
Commit: 436d7ef68cf1c361599b255108759e6238faeb1c
Parents: 7acec00
Author: Alexander Rukletsov <al...@apache.org>
Authored: Tue May 16 01:02:35 2017 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Fri May 19 00:55:10 2017 +0200
----------------------------------------------------------------------
.../containerizer/io_switchboard_tests.cpp | 20 ++++++++++----------
.../nested_mesos_containerizer_tests.cpp | 20 ++++++++++----------
2 files changed, 20 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/436d7ef6/src/tests/containerizer/io_switchboard_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/io_switchboard_tests.cpp b/src/tests/containerizer/io_switchboard_tests.cpp
index b19961e..f5c2157 100644
--- a/src/tests/containerizer/io_switchboard_tests.cpp
+++ b/src/tests/containerizer/io_switchboard_tests.cpp
@@ -167,15 +167,15 @@ TEST_F(IOSwitchboardServerTest, RedirectLog)
Try<int> nullFd = os::open(os::DEV_NULL, O_RDWR);
ASSERT_SOME(nullFd);
- Try<std::array<int, 2>> stdoutPipe_ = os::pipe();
+ Try<std::array<int_fd, 2>> stdoutPipe_ = os::pipe();
ASSERT_SOME(stdoutPipe_);
- const std::array<int, 2>& stdoutPipe = stdoutPipe_.get();
+ const std::array<int_fd, 2>& stdoutPipe = stdoutPipe_.get();
- Try<std::array<int, 2>> stderrPipe_ = os::pipe();
+ Try<std::array<int_fd, 2>> stderrPipe_ = os::pipe();
ASSERT_SOME(stderrPipe_);
- const std::array<int, 2>& stderrPipe = stderrPipe_.get();
+ const std::array<int_fd, 2>& stderrPipe = stderrPipe_.get();
string stdoutPath = path::join(sandbox.get(), "stdout");
Try<int> stdoutFd = os::open(
@@ -363,10 +363,10 @@ TEST_F(IOSwitchboardServerTest, SendHeartbeat)
// We use a pipe in this test to prevent the switchboard from
// reading EOF on its `stdoutFromFd` until we are ready for the
// switchboard to terminate.
- Try<std::array<int, 2>> stdoutPipe_ = os::pipe();
+ Try<std::array<int_fd, 2>> stdoutPipe_ = os::pipe();
ASSERT_SOME(stdoutPipe_);
- const std::array<int, 2>& stdoutPipe = stdoutPipe_.get();
+ const std::array<int_fd, 2>& stdoutPipe = stdoutPipe_.get();
Try<int> nullFd = os::open(os::DEV_NULL, O_RDWR);
ASSERT_SOME(nullFd);
@@ -470,10 +470,10 @@ TEST_F(IOSwitchboardServerTest, AttachInput)
// We use a pipe in this test to prevent the switchboard from
// reading EOF on its `stdoutFromFd` until we are ready for the
// switchboard to terminate.
- Try<std::array<int, 2>> stdoutPipe_ = os::pipe();
+ Try<std::array<int_fd, 2>> stdoutPipe_ = os::pipe();
ASSERT_SOME(stdoutPipe_);
- const std::array<int, 2>& stdoutPipe = stdoutPipe_.get();
+ const std::array<int_fd, 2>& stdoutPipe = stdoutPipe_.get();
Try<int> nullFd = os::open(os::DEV_NULL, O_RDWR);
ASSERT_SOME(nullFd);
@@ -601,10 +601,10 @@ TEST_F(IOSwitchboardServerTest, ReceiveHeartbeat)
// We use a pipe in this test to prevent the switchboard from
// reading EOF on its `stdoutFromFd` until we are ready for the
// switchboard to terminate.
- Try<std::array<int, 2>> stdoutPipe_ = os::pipe();
+ Try<std::array<int_fd, 2>> stdoutPipe_ = os::pipe();
ASSERT_SOME(stdoutPipe_);
- const std::array<int, 2>& stdoutPipe = stdoutPipe_.get();
+ const std::array<int_fd, 2>& stdoutPipe = stdoutPipe_.get();
Try<int> nullFd = os::open(os::DEV_NULL, O_RDWR);
ASSERT_SOME(nullFd);
http://git-wip-us.apache.org/repos/asf/mesos/blob/436d7ef6/src/tests/containerizer/nested_mesos_containerizer_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/nested_mesos_containerizer_tests.cpp b/src/tests/containerizer/nested_mesos_containerizer_tests.cpp
index f8c1511..d47e9ae 100644
--- a/src/tests/containerizer/nested_mesos_containerizer_tests.cpp
+++ b/src/tests/containerizer/nested_mesos_containerizer_tests.cpp
@@ -448,10 +448,10 @@ TEST_F(NestedMesosContainerizerTest,
containerId.set_value(UUID::random().toString());
// Use a pipe to pass parent's MESOS_SANDBOX value to a child container.
- Try<std::array<int, 2>> pipes_ = os::pipe();
+ Try<std::array<int_fd, 2>> pipes_ = os::pipe();
ASSERT_SOME(pipes_);
- const std::array<int, 2>& pipes = pipes_.get();
+ const std::array<int_fd, 2>& pipes = pipes_.get();
// NOTE: We use a non-shell command here to use 'bash -c' to execute
// the 'echo', which deals with the file descriptor, because of a bug
@@ -569,10 +569,10 @@ TEST_F(NestedMesosContainerizerTest,
containerId.set_value(UUID::random().toString());
// Use a pipe to synchronize with the top-level container.
- Try<std::array<int, 2>> pipes_ = os::pipe();
+ Try<std::array<int_fd, 2>> pipes_ = os::pipe();
ASSERT_SOME(pipes_);
- const std::array<int, 2>& pipes = pipes_.get();
+ const std::array<int_fd, 2>& pipes = pipes_.get();
const string filename = "nested_inherits_work_dir";
@@ -867,10 +867,10 @@ TEST_F(NestedMesosContainerizerTest,
ASSERT_EQ(1u, offers->size());
// Use a pipe to synchronize with the top-level container.
- Try<std::array<int, 2>> pipes_ = os::pipe();
+ Try<std::array<int_fd, 2>> pipes_ = os::pipe();
ASSERT_SOME(pipes_);
- const std::array<int, 2>& pipes = pipes_.get();
+ const std::array<int_fd, 2>& pipes = pipes_.get();
// Launch a command task within the `alpine` docker image and
// synchronize its launch with the launch of a debug container below.
@@ -1237,10 +1237,10 @@ TEST_F(NestedMesosContainerizerTest, ROOT_CGROUPS_ParentExit)
ContainerID containerId;
containerId.set_value(UUID::random().toString());
- Try<std::array<int, 2>> pipes_ = os::pipe();
+ Try<std::array<int_fd, 2>> pipes_ = os::pipe();
ASSERT_SOME(pipes_);
- const std::array<int, 2>& pipes = pipes_.get();
+ const std::array<int_fd, 2>& pipes = pipes_.get();
// NOTE: We use a non-shell command here to use 'bash -c' to execute
// the 'read', which deals with the file descriptor, because of a bug
@@ -1337,10 +1337,10 @@ TEST_F(NestedMesosContainerizerTest, ROOT_CGROUPS_ParentSigterm)
containerId.set_value(UUID::random().toString());
// Use a pipe to synchronize with the top-level container.
- Try<std::array<int, 2>> pipes_ = os::pipe();
+ Try<std::array<int_fd, 2>> pipes_ = os::pipe();
ASSERT_SOME(pipes_);
- const std::array<int, 2>& pipes = pipes_.get();
+ const std::array<int_fd, 2>& pipes = pipes_.get();
// NOTE: We use a non-shell command here to use 'bash -c' to execute
// the 'echo', which deals with the file descriptor, because of a bug