[jira] [Commented] (MESOS-6717) Add Windows support to agent test harness

2016-12-09 Thread Joseph Wu (JIRA)

[ 
https://issues.apache.org/jira/browse/MESOS-6717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15737005#comment-15737005
 ] 

Joseph Wu commented on MESOS-6717:
--

{code}
commit ca0a8d552cd098593c3c3b0f76d5215846de7120
Author: Alex Clemmer 
Date:   Thu Dec 8 17:25:06 2016 -0800

Stout: Added logic for TMPDIR environment variable in `os::temp`.

`TMPDIR` is a POSIX-standard environment variable which can be used
to specify a temporary directory.  This variable is currently read
in the agent tests, but ignored in other parts of the codebase.
(`os::temp` is commonly used by `os::mkdtemp`.)

This commit is one of two commits that will normalize the location
of the temporary directory.

Review: https://reviews.apache.org/r/54489/
{code}
{code}
commit 883f5d2e31eb3f73e808e58c020f5b68ca7b2e1d
Author: Alex Clemmer 
Date:   Thu Dec 8 17:38:41 2016 -0800

Normalized how temporary directories are determined in tests.

This changes the Mesos tests to use the updated `os::temp` helper,
which (on POSIX) now checks the `TMPDIR` environment variable.

On Windows, this changes the temporary directory to an appropriate
location (`/tmp` does not exist on Windows by default).

Review: https://reviews.apache.org/r/54490/
{code}
{code}
commit 3511b5407710e9a0d0a668ce1663a8d89cc028ca
Author: Joseph Wu 
Date:   Fri Dec 9 17:50:38 2016 -0800

Removed the UUID from IO Switchboard tests.

The IO switchboard server creates a UNIX socket at a given path.
Due to OS constraints, this path must be less than 104 characters long.

In the tests, the path is set to a value based on the test directory.
If the test directory is too long, the UNIX socket creation will fail,
as observed in OSX, where the standard temporary directory does not
default to `/tmp` (as is the case on most Linux's).

The test directory was changed to provide platform-specific values
in this review:
https://reviews.apache.org/r/54490/

This commit shortens the UNIX socket address by removing the UUID.
This is safe because we are not running multiple IO switchboards
in the same test, in the same directory.
{code}

> Add Windows support to agent test harness
> -
>
> Key: MESOS-6717
> URL: https://issues.apache.org/jira/browse/MESOS-6717
> Project: Mesos
>  Issue Type: Bug
>  Components: agent
>Reporter: Alex Clemmer
>Assignee: Alex Clemmer
>Priority: Blocker
>  Labels: microsoft, windows-mvp
>
> Of particular interest is in `src/tests/CMakeLists.txt` is support enough of 
> the following that we can successfully run agent tests:
> TEST_HELPER_SRC
> MESOS_TESTS_UTILS_SRC



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MESOS-6717) Add Windows support to agent test harness

2016-12-07 Thread Joseph Wu (JIRA)

[ 
https://issues.apache.org/jira/browse/MESOS-6717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15730897#comment-15730897
 ] 

Joseph Wu commented on MESOS-6717:
--

{code}
commit 4c0e453296e3ac7c5eda48a98eb7ad570c303d0a
Author: Alex Clemmer 
Date:   Wed Dec 7 17:21:01 2016 -0800

Windows: Fixed default isolators in Agent.

This commit sets the default isolators on Windows to Windows-specific
values, rather than POSIX-specific values.  This is a convenience for
users on Windows (whom no longer need to specify
`--isolation=windows/cpu,filesystem/windows`) and will allow tests
to exercise the default set of Agent flags.

In particular, this commit will transition Windows builds of the agent
away from using the `posix/cpu`, `posix/mem`, and `filesystem/posix`
isolators by default, replacing them with `windows/cpu` and
`filesystem/windows` (sadly, there is not yet a memory isolator for
Windows).

Review: https://reviews.apache.org/r/54470/
{code}

> Add Windows support to agent test harness
> -
>
> Key: MESOS-6717
> URL: https://issues.apache.org/jira/browse/MESOS-6717
> Project: Mesos
>  Issue Type: Bug
>  Components: agent
>Reporter: Alex Clemmer
>Assignee: Alex Clemmer
>  Labels: microsoft, windows-mvp
>
> Of particular interest is in `src/tests/CMakeLists.txt` is support enough of 
> the following that we can successfully run agent tests:
> TEST_HELPER_SRC
> MESOS_TESTS_UTILS_SRC



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MESOS-6717) Add Windows support to agent test harness

2016-12-06 Thread Joseph Wu (JIRA)

[ 
https://issues.apache.org/jira/browse/MESOS-6717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15727194#comment-15727194
 ] 

Joseph Wu commented on MESOS-6717:
--

{code}
commit 007f91b49060384a9f5c14375b40688d1b89c0bf
Author: Alex Clemmer 
Date:   Tue Dec 6 13:37:27 2016 -0800

Stout: Fixed two bugs in `mkdtemp` that block Windows tests.

Currently there are two bugs in the Windows implementation of
`os::mkdtemp`, which together cause all agent tests to fail. We describe
these bugs below and explain the steps this commit will take to address
them.

The first concerns a mismatch between the POSIX specification of
`mkdtemp` and the Windows implementation of `os::mkdtemp`. Specifically,
the POSIX specification indicates that, if any component of the path
prefix in the directory pattern passed to `mkdtemp` does not exist, we
are to set `errno` to `ENOENT` and return a null pointer. In the Stout
POSIX wrapper, `os::mkdtemp`, we will return an `ErrnoError`. In
contrast, the Windows implementation will erroneously recursively create
all components of the path prefix. This commit will address this by
explicitly setting the `recursive` flag of the call to `os::mkdir` to
`false`.

The second concerns a failure to parse Unix-like paths when creating the
temporary directory. Specifically, both the POSIX and Windows
implementations of `os::mkdtemp` have a default argument: `/tmp/XX`.
When we replace the 'X' characters with random alphanumeric characters
and pass the result to `os::mkdir`, and when the `recursive` flag is
errorneously set to `true`, we will fail to parse the path on Windows,
because `os::mkdir` can only pass Windows-style paths, with the '\'
character. This causes all Agent tests to fail, e.g., when we try to
create sandbox directories.

Technically, this second issue is actually resolved by setting the
`recursive` flag to `false` in the call to `os::mkdir`, but here we
observe that `/tmp` is not the "right place" to put temporary files on
Windows anyway, and so we take the time to clean it up here, by
replacing the default string literal path `/tmp/XX` with the
platform-agnostic `path::join(os::temp(), "XX)`.

Review: https://reviews.apache.org/r/54415/
{code}
{code}
commit cd1ad28e3baafa22f108830907819be0d727a6b0
Author: Alex Clemmer 
Date:   Tue Dec 6 14:40:02 2016 -0800

Windows: Enabled build of Agent test harness.

This commit adds the Agent test harness to the Windows builds. This is
the first major step towards lighting up comprehensive Agent testing on
agent builds, an important step that has been prevented by a variety of
issues (e.g., things like getting the Master to work for at least
developer scenarios, and so on).

This includes no tests, only the test infrastructure.

Review: https://reviews.apache.org/r/54395/
{code}

> Add Windows support to agent test harness
> -
>
> Key: MESOS-6717
> URL: https://issues.apache.org/jira/browse/MESOS-6717
> Project: Mesos
>  Issue Type: Bug
>  Components: agent
>Reporter: Alex Clemmer
>Assignee: Alex Clemmer
>  Labels: microsoft, windows-mvp
>
> Of particular interest is in `src/tests/CMakeLists.txt` is support enough of 
> the following that we can successfully run agent tests:
> TEST_HELPER_SRC
> MESOS_TESTS_UTILS_SRC



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)