You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Alex Clemmer <cl...@gmail.com> on 2016/04/11 10:28:28 UTC

Review Request 46008: Stout: Initialize Windows socket stack in Stout tests.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46008/
-----------------------------------------------------------

Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.


Repository: mesos


Description
-------

Stout: Initialize Windows socket stack in Stout tests.


Diffs
-----

  3rdparty/libprocess/3rdparty/stout/tests/main.cpp c449de87bede4d3bf1df368eaf1d22f857c2298f 

Diff: https://reviews.apache.org/r/46008/diff/


Testing
-------


Thanks,

Alex Clemmer


Re: Review Request 46008: Stout: Initialize Windows socket stack in Stout tests.

Posted by Alex Naparu <al...@outlook.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46008/#review128543
-----------------------------------------------------------


Ship it!




Ship It!

- Alex Naparu


On April 11, 2016, 8:28 a.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46008/
> -----------------------------------------------------------
> 
> (Updated April 11, 2016, 8:28 a.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Stout: Initialize Windows socket stack in Stout tests.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/tests/main.cpp c449de87bede4d3bf1df368eaf1d22f857c2298f 
> 
> Diff: https://reviews.apache.org/r/46008/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 46008: Stout: Initialize Windows socket stack in Stout tests.

Posted by Joris Van Remoortere <jo...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46008/#review128938
-----------------------------------------------------------


Fix it, then Ship it!





3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/socket.hpp (line 60)
<https://reviews.apache.org/r/46008/#comment192396>

    brace on new line



3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/socket.hpp (lines 79 - 80)
<https://reviews.apache.org/r/46008/#comment192388>

    style



3rdparty/libprocess/3rdparty/stout/tests/main.cpp (line 34)
<https://reviews.apache.org/r/46008/#comment192391>

    Can we use the `EXIT(EXIT_FAILURE) << error_msg;` pattern?



3rdparty/libprocess/3rdparty/stout/tests/main.cpp (line 39)
<https://reviews.apache.org/r/46008/#comment192392>

    Can we call this `teardown_error` so that in the future others won't introduce their own bools?



3rdparty/libprocess/3rdparty/stout/tests/main.cpp (lines 46 - 49)
<https://reviews.apache.org/r/46008/#comment192394>

    I think this comment makes more sense when we introduce the bool `teardown_error`. Otherwise one will ask the question "why don't we just `EXIT` if `wsa_cleanup` fails"?


- Joris Van Remoortere


On April 14, 2016, 5:21 a.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46008/
> -----------------------------------------------------------
> 
> (Updated April 14, 2016, 5:21 a.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Stout: Initialize Windows socket stack in Stout tests.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/socket.hpp b5aeab75c2365a3431c397743b95ce7fbd6d7a1a 
>   3rdparty/libprocess/3rdparty/stout/tests/main.cpp c449de87bede4d3bf1df368eaf1d22f857c2298f 
> 
> Diff: https://reviews.apache.org/r/46008/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 46008: Stout: Initialize Windows socket stack in Stout tests.

Posted by Alex Clemmer <cl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46008/
-----------------------------------------------------------

(Updated April 15, 2016, 5:58 a.m.)


Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.


Repository: mesos


Description
-------

Stout: Initialize Windows socket stack in Stout tests.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/socket.hpp b5aeab75c2365a3431c397743b95ce7fbd6d7a1a 
  3rdparty/libprocess/3rdparty/stout/tests/main.cpp c449de87bede4d3bf1df368eaf1d22f857c2298f 

Diff: https://reviews.apache.org/r/46008/diff/


Testing
-------


Thanks,

Alex Clemmer


Re: Review Request 46008: Stout: Initialize Windows socket stack in Stout tests.

Posted by Alex Clemmer <cl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46008/
-----------------------------------------------------------

(Updated April 14, 2016, 7:24 p.m.)


Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.


Repository: mesos


Description
-------

Stout: Initialize Windows socket stack in Stout tests.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/socket.hpp b5aeab75c2365a3431c397743b95ce7fbd6d7a1a 
  3rdparty/libprocess/3rdparty/stout/tests/main.cpp c449de87bede4d3bf1df368eaf1d22f857c2298f 

Diff: https://reviews.apache.org/r/46008/diff/


Testing
-------


Thanks,

Alex Clemmer


Re: Review Request 46008: Stout: Initialize Windows socket stack in Stout tests.

Posted by Alex Clemmer <cl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46008/
-----------------------------------------------------------

(Updated April 14, 2016, 5:21 a.m.)


Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.


Repository: mesos


Description
-------

Stout: Initialize Windows socket stack in Stout tests.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/socket.hpp b5aeab75c2365a3431c397743b95ce7fbd6d7a1a 
  3rdparty/libprocess/3rdparty/stout/tests/main.cpp c449de87bede4d3bf1df368eaf1d22f857c2298f 

Diff: https://reviews.apache.org/r/46008/diff/


Testing
-------


Thanks,

Alex Clemmer


Re: Review Request 46008: Stout: Initialize Windows socket stack in Stout tests.

Posted by Alex Clemmer <cl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46008/
-----------------------------------------------------------

(Updated April 14, 2016, 5:05 a.m.)


Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.


Repository: mesos


Description
-------

Stout: Initialize Windows socket stack in Stout tests.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/socket.hpp b5aeab75c2365a3431c397743b95ce7fbd6d7a1a 
  3rdparty/libprocess/3rdparty/stout/tests/main.cpp c449de87bede4d3bf1df368eaf1d22f857c2298f 

Diff: https://reviews.apache.org/r/46008/diff/


Testing
-------


Thanks,

Alex Clemmer


Re: Review Request 46008: Stout: Initialize Windows socket stack in Stout tests.

Posted by Alex Clemmer <cl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46008/
-----------------------------------------------------------

(Updated April 14, 2016, 2:39 a.m.)


Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.


Repository: mesos


Description
-------

Stout: Initialize Windows socket stack in Stout tests.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/socket.hpp b5aeab75c2365a3431c397743b95ce7fbd6d7a1a 
  3rdparty/libprocess/3rdparty/stout/tests/main.cpp c449de87bede4d3bf1df368eaf1d22f857c2298f 

Diff: https://reviews.apache.org/r/46008/diff/


Testing
-------


Thanks,

Alex Clemmer


Re: Review Request 46008: Stout: Initialize Windows socket stack in Stout tests.

Posted by Alex Naparu <al...@outlook.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46008/#review128540
-----------------------------------------------------------




3rdparty/libprocess/3rdparty/stout/tests/main.cpp (line 81)
<https://reviews.apache.org/r/46008/#comment191974>

    We must also call WSACleanup on successful WSAStartup, per MSDN.


- Alex Naparu


On April 11, 2016, 8:28 a.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46008/
> -----------------------------------------------------------
> 
> (Updated April 11, 2016, 8:28 a.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Stout: Initialize Windows socket stack in Stout tests.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/tests/main.cpp c449de87bede4d3bf1df368eaf1d22f857c2298f 
> 
> Diff: https://reviews.apache.org/r/46008/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 46008: Stout: Initialize Windows socket stack in Stout tests.

Posted by Alex Naparu <al...@outlook.com>.

> On April 12, 2016, 2:37 p.m., Joris Van Remoortere wrote:
> > There is no JIRA for this.
> > Initializing the winsock system seems like functionality that belongs in a helper function rather than inside a test?
> > How is libprocess going to initialize it? What about mesos?
> > I'm guessing we'll want to have something like:
> > ```
> > Try<Nothing> winsock_initialize = winsock_initialize();
> > ...
> > ```
> > 
> > and do this in `libprocess::initialize()`
> > 
> > Thoughts?

This should likely be wrapped in the constructor of a class, while WSACleanup should be called from the destructor.


- Alex


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46008/#review128410
-----------------------------------------------------------


On April 11, 2016, 8:28 a.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46008/
> -----------------------------------------------------------
> 
> (Updated April 11, 2016, 8:28 a.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Stout: Initialize Windows socket stack in Stout tests.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/tests/main.cpp c449de87bede4d3bf1df368eaf1d22f857c2298f 
> 
> Diff: https://reviews.apache.org/r/46008/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 46008: Stout: Initialize Windows socket stack in Stout tests.

Posted by Alex Naparu <al...@outlook.com>.

> On April 12, 2016, 2:37 p.m., Joris Van Remoortere wrote:
> > There is no JIRA for this.
> > Initializing the winsock system seems like functionality that belongs in a helper function rather than inside a test?
> > How is libprocess going to initialize it? What about mesos?
> > I'm guessing we'll want to have something like:
> > ```
> > Try<Nothing> winsock_initialize = winsock_initialize();
> > ...
> > ```
> > 
> > and do this in `libprocess::initialize()`
> > 
> > Thoughts?
> 
> Alex Naparu wrote:
>     This should likely be wrapped in the constructor of a class, while WSACleanup should be called from the destructor.

This: https://github.com/dpravat/mesos/commit/5b2e549737edcb6a8522026e01b8f4ed70da4d9f


- Alex


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46008/#review128410
-----------------------------------------------------------


On April 11, 2016, 8:28 a.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46008/
> -----------------------------------------------------------
> 
> (Updated April 11, 2016, 8:28 a.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Stout: Initialize Windows socket stack in Stout tests.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/tests/main.cpp c449de87bede4d3bf1df368eaf1d22f857c2298f 
> 
> Diff: https://reviews.apache.org/r/46008/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 46008: Stout: Initialize Windows socket stack in Stout tests.

Posted by Alex Clemmer <cl...@gmail.com>.

> On April 12, 2016, 2:37 p.m., Joris Van Remoortere wrote:
> > There is no JIRA for this.
> > Initializing the winsock system seems like functionality that belongs in a helper function rather than inside a test?
> > How is libprocess going to initialize it? What about mesos?
> > I'm guessing we'll want to have something like:
> > ```
> > Try<Nothing> winsock_initialize = winsock_initialize();
> > ...
> > ```
> > 
> > and do this in `libprocess::initialize()`
> > 
> > Thoughts?
> 
> Alex Naparu wrote:
>     This should likely be wrapped in the constructor of a class, while WSACleanup should be called from the destructor.
> 
> Alex Naparu wrote:
>     This: https://github.com/dpravat/mesos/commit/5b2e549737edcb6a8522026e01b8f4ed70da4d9f

Alex is right.

But, to make progress I've implemented what you've asked for. :)


- Alex


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46008/#review128410
-----------------------------------------------------------


On April 14, 2016, 2:39 a.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46008/
> -----------------------------------------------------------
> 
> (Updated April 14, 2016, 2:39 a.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Stout: Initialize Windows socket stack in Stout tests.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/socket.hpp b5aeab75c2365a3431c397743b95ce7fbd6d7a1a 
>   3rdparty/libprocess/3rdparty/stout/tests/main.cpp c449de87bede4d3bf1df368eaf1d22f857c2298f 
> 
> Diff: https://reviews.apache.org/r/46008/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 46008: Stout: Initialize Windows socket stack in Stout tests.

Posted by Joris Van Remoortere <jo...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46008/#review128410
-----------------------------------------------------------



There is no JIRA for this.
Initializing the winsock system seems like functionality that belongs in a helper function rather than inside a test?
How is libprocess going to initialize it? What about mesos?
I'm guessing we'll want to have something like:
```
Try<Nothing> winsock_initialize = winsock_initialize();
...
```

and do this in `libprocess::initialize()`

Thoughts?

- Joris Van Remoortere


On April 11, 2016, 8:28 a.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46008/
> -----------------------------------------------------------
> 
> (Updated April 11, 2016, 8:28 a.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Stout: Initialize Windows socket stack in Stout tests.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/tests/main.cpp c449de87bede4d3bf1df368eaf1d22f857c2298f 
> 
> Diff: https://reviews.apache.org/r/46008/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>


Re: Review Request 46008: Stout: Initialize Windows socket stack in Stout tests.

Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46008/#review128132
-----------------------------------------------------------



Patch looks great!

Reviews applied: [45898, 44090, 45888, 45940, 44081, 44082, 44978, 44084, 45009, 45015, 45022, 44142, 46008]

Passed command: export OS='ubuntu:14.04' CONFIGURATION='--verbose' COMPILER='gcc' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh

- Mesos ReviewBot


On April 11, 2016, 8:28 a.m., Alex Clemmer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46008/
> -----------------------------------------------------------
> 
> (Updated April 11, 2016, 8:28 a.m.)
> 
> 
> Review request for mesos, Alex Naparu, Daniel Pravat, Artem Harutyunyan, Joris Van Remoortere, Michael Park, M Lawindi, and Yi Sun.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Stout: Initialize Windows socket stack in Stout tests.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/tests/main.cpp c449de87bede4d3bf1df368eaf1d22f857c2298f 
> 
> Diff: https://reviews.apache.org/r/46008/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alex Clemmer
> 
>