You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by an...@apache.org on 2018/07/24 20:17:07 UTC
[8/8] mesos git commit: Windows: Enabled `RemoteLink` tests.
Windows: Enabled `RemoteLink` tests.
This resolves MESOS-5941. Note that on Windows, `os::killtree()` is
only valid for processes specifically spawned in a group via a job
object, otherwise it will fail (and the failure is not being checked
here). Since the `linkee` process only ever spawns the single OS
process `test-linkee`, it is safe to switch to `os::kill()` which can
correctly kill it.
Review: https://reviews.apache.org/r/67978
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/81e49448
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/81e49448
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/81e49448
Branch: refs/heads/master
Commit: 81e49448a1c85e4364f609a552cb82d45ea60a97
Parents: cf51b23
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Wed Jul 18 16:22:57 2018 -0700
Committer: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Committed: Tue Jul 24 10:58:52 2018 -0700
----------------------------------------------------------------------
3rdparty/libprocess/src/tests/process_tests.cpp | 26 +++++++-------------
1 file changed, 9 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/81e49448/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 8e4135a..d124b5a 100644
--- a/3rdparty/libprocess/src/tests/process_tests.cpp
+++ b/3rdparty/libprocess/src/tests/process_tests.cpp
@@ -843,7 +843,7 @@ protected:
void TearDown() override
{
if (linkee.isSome()) {
- os::killtree(linkee->pid(), SIGKILL);
+ os::kill(linkee->pid(), SIGKILL);
reap_linkee();
linkee = None();
}
@@ -857,9 +857,7 @@ public:
// Verifies that linking to a remote process will correctly detect
// the associated `ExitedEvent`.
-// TODO(hausdorff): Test fails on Windows. Fix and enable. Linkee never sends a
-// message because "no such program exists". See MESOS-5941.
-TEST_F_TEMP_DISABLED_ON_WINDOWS(ProcessRemoteLinkTest, RemoteLink)
+TEST_F(ProcessRemoteLinkTest, RemoteLink)
{
// Link to the remote subprocess.
ExitedProcess process(pid);
@@ -871,7 +869,7 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(ProcessRemoteLinkTest, RemoteLink)
spawn(process);
- os::killtree(linkee->pid(), SIGKILL);
+ os::kill(linkee->pid(), SIGKILL);
reap_linkee();
linkee = None();
@@ -912,9 +910,7 @@ private:
// Verifies that calling `link` with "relink" semantics will have the
// same behavior as `link` with "normal" semantics, when there is no
// existing persistent connection.
-// TODO(hausdorff): Test fails on Windows. Fix and enable. Linkee never sends a
-// message because "no such program exists". See MESOS-5941.
-TEST_F_TEMP_DISABLED_ON_WINDOWS(ProcessRemoteLinkTest, RemoteRelink)
+TEST_F(ProcessRemoteLinkTest, RemoteRelink)
{
RemoteLinkTestProcess process(pid);
@@ -926,7 +922,7 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(ProcessRemoteLinkTest, RemoteRelink)
spawn(process);
process.relink();
- os::killtree(linkee->pid(), SIGKILL);
+ os::kill(linkee->pid(), SIGKILL);
reap_linkee();
linkee = None();
@@ -939,9 +935,7 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(ProcessRemoteLinkTest, RemoteRelink)
// Verifies that linking and relinking a process will retain monitoring
// on the linkee.
-// TODO(hausdorff): Test fails on Windows. Fix and enable. Linkee never sends a
-// message because "no such program exists". See MESOS-5941.
-TEST_F_TEMP_DISABLED_ON_WINDOWS(ProcessRemoteLinkTest, RemoteLinkRelink)
+TEST_F(ProcessRemoteLinkTest, RemoteLinkRelink)
{
RemoteLinkTestProcess process(pid);
@@ -954,7 +948,7 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(ProcessRemoteLinkTest, RemoteLinkRelink)
process.linkup();
process.relink();
- os::killtree(linkee->pid(), SIGKILL);
+ os::kill(linkee->pid(), SIGKILL);
reap_linkee();
linkee = None();
@@ -967,9 +961,7 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(ProcessRemoteLinkTest, RemoteLinkRelink)
// Verifies that relinking a remote process will not affect the
// monitoring of the process by other linkers.
-// TODO(hausdorff): Test fails on Windows. Fix and enable. Linkee never sends a
-// message because "no such program exists". See MESOS-5941.
-TEST_F_TEMP_DISABLED_ON_WINDOWS(ProcessRemoteLinkTest, RemoteDoubleLinkRelink)
+TEST_F(ProcessRemoteLinkTest, RemoteDoubleLinkRelink)
{
ExitedProcess linker(pid);
RemoteLinkTestProcess relinker(pid);
@@ -988,7 +980,7 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(ProcessRemoteLinkTest, RemoteDoubleLinkRelink)
relinker.linkup();
relinker.relink();
- os::killtree(linkee->pid(), SIGKILL);
+ os::kill(linkee->pid(), SIGKILL);
reap_linkee();
linkee = None();