You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Joseph Wu <jo...@mesosphere.io> on 2015/10/20 23:39:53 UTC

Review Request 39495: Fix SSL flag cleanup for tests.

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

Review request for mesos, Artem Harutyunyan and Joris Van Remoortere.


Repository: mesos


Description
-------

This moves the initialization of the SSL `Flags` into the `initialize` method.

Prior to this, SSL flags would not be completely cleaned up between tests.  Test cleanup unsets all environment variables related to SSL.  However, the flags object would persist some of these variables between tests.
For example:
1) Test 1 unsets all flags, then sets flag `SSL_CA_FILE`.
2) Test 2 unsets all flags, then sets flag `SSL_CA_DIR`.  `SSL_CA_FILE` will still be set.
3) Test 3 unsets all flags.  `SSL_CA_FILE` and `SSL_CA_DIR` are still set.


Diffs
-----

  3rdparty/libprocess/src/openssl.cpp 9ae5c1f0849aba3e2f858fb9fd31e6e65cf24b4f 

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


Testing
-------

```
../configure --enable-ssl --enable-libevent
make check
```

Note: Only the tests will call `reinitialize`.


Thanks,

Joseph Wu


Re: Review Request 39495: Fix SSL flag cleanup for tests.

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

Ship it!



3rdparty/libprocess/src/openssl.cpp (line 282)
<https://reviews.apache.org/r/39495/#comment162298>

    Maybe `recreate the default flags.`


- Joris Van Remoortere


On Oct. 21, 2015, 5:17 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39495/
> -----------------------------------------------------------
> 
> (Updated Oct. 21, 2015, 5:17 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan and Joris Van Remoortere.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This moves the initialization of the SSL `Flags` into the `initialize` method.
> 
> Prior to this, SSL flags would not be completely cleaned up between tests.  Test cleanup unsets all environment variables related to SSL.  However, the flags object would persist some of these variables between tests.
> For example:
> 1) Test 1 unsets all flags, then sets flag `SSL_CA_FILE`.
> 2) Test 2 unsets all flags, then sets flag `SSL_CA_DIR`.  `SSL_CA_FILE` will still be set.
> 3) Test 3 unsets all flags.  `SSL_CA_FILE` and `SSL_CA_DIR` are still set.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/openssl.cpp 9ae5c1f0849aba3e2f858fb9fd31e6e65cf24b4f 
> 
> Diff: https://reviews.apache.org/r/39495/diff/
> 
> 
> Testing
> -------
> 
> ```
> ../configure --enable-ssl --enable-libevent
> make check
> ```
> 
> Note: Only the tests will call `reinitialize`.
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


Re: Review Request 39495: Fix SSL flag cleanup for tests.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39495/
-----------------------------------------------------------

(Updated Oct. 21, 2015, 10:17 a.m.)


Review request for mesos, Artem Harutyunyan and Joris Van Remoortere.


Changes
-------

Change from reallocation to copy assignment.


Repository: mesos


Description
-------

This moves the initialization of the SSL `Flags` into the `initialize` method.

Prior to this, SSL flags would not be completely cleaned up between tests.  Test cleanup unsets all environment variables related to SSL.  However, the flags object would persist some of these variables between tests.
For example:
1) Test 1 unsets all flags, then sets flag `SSL_CA_FILE`.
2) Test 2 unsets all flags, then sets flag `SSL_CA_DIR`.  `SSL_CA_FILE` will still be set.
3) Test 3 unsets all flags.  `SSL_CA_FILE` and `SSL_CA_DIR` are still set.


Diffs (updated)
-----

  3rdparty/libprocess/src/openssl.cpp 9ae5c1f0849aba3e2f858fb9fd31e6e65cf24b4f 

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


Testing
-------

```
../configure --enable-ssl --enable-libevent
make check
```

Note: Only the tests will call `reinitialize`.


Thanks,

Joseph Wu