You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Benjamin Bannier <be...@mesosphere.io> on 2018/05/18 10:35:06 UTC
Review Request 67210: Used `*_SOME` macro for checking `Try` values
in stout.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67210/
-----------------------------------------------------------
Review request for mesos, Chun-Hung Hsiao and Jan Schlicht.
Repository: mesos
Description
-------
Used `*_SOME` macro for checking `Try` values in stout.
Diffs
-----
3rdparty/stout/tests/os/sendfile_tests.cpp 05966ae067ae3972598da3370eb16fdce5736c21
Diff: https://reviews.apache.org/r/67210/diff/1/
Testing
-------
`make check`
Thanks,
Benjamin Bannier
Re: Review Request 67210: Used `*_SOME` macro for checking `Try`
values in stout.
Posted by Benjamin Bannier <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67210/
-----------------------------------------------------------
(Updated May 29, 2018, 10:13 a.m.)
Review request for mesos, Chun-Hung Hsiao and Jan Schlicht.
Changes
-------
Fixed additional occurrences; tweaking as suggested by Chun.
Repository: mesos
Description
-------
Used `*_SOME` macro for checking `Try` values in stout.
Diffs (updated)
-----
3rdparty/stout/tests/none_tests.cpp b6bbb882ca2d61db9d93870895bc076612f26f84
3rdparty/stout/tests/os/sendfile_tests.cpp 2a8568365c88ee7207c38f74599dcd3ba0f73410
Diff: https://reviews.apache.org/r/67210/diff/2/
Changes: https://reviews.apache.org/r/67210/diff/1-2/
Testing
-------
`make check`
Thanks,
Benjamin Bannier
Re: Review Request 67210: Used `*_SOME` macro for checking `Try`
values in stout.
Posted by Benjamin Bannier <be...@mesosphere.io>.
> On May 18, 2018, 8:53 p.m., Chun-Hung Hsiao wrote:
> > Haven't take a good at these but they might be candidates to use the new macros:
> > ```
> > $ grep '(EXPECT\|ASSERT)_(TRUE\|FALSE)(.*is(Some\|Error\|None)())' 3rdparty/stout/ -r
> > ...
> > 3rdparty/stout//tests/ip_tests.cpp: EXPECT_FALSE(network.isError());
> > 3rdparty/stout//tests/mac_tests.cpp: EXPECT_FALSE(mac.isError());
> > 3rdparty/stout//tests/none_tests.cpp: EXPECT_TRUE(o.isNone());
> > 3rdparty/stout//tests/none_tests.cpp: EXPECT_TRUE(o.isNone());
> > 3rdparty/stout//tests/none_tests.cpp: EXPECT_TRUE(o.isNone());
> > 3rdparty/stout//tests/none_tests.cpp: EXPECT_TRUE(r.isNone());
> > 3rdparty/stout//tests/none_tests.cpp: EXPECT_TRUE(r.isNone());
> > 3rdparty/stout//tests/none_tests.cpp: EXPECT_TRUE(r.isNone());
> > 3rdparty/stout//tests/os_tests.cpp: ASSERT_FALSE(process.isError());
> > 3rdparty/stout//tests/os_tests.cpp: ASSERT_FALSE(process.isError());
> > ```
> > We could fix them in a follow-up patch.
I have updated this patch to fix some of these as well. Note in general the fix here does not apply to some checks we perform on `Result` values of the form
(EXPECT\|ASSERT)_TRUE(.*isError)
- Benjamin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67210/#review203442
-----------------------------------------------------------
On May 29, 2018, 10:13 a.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67210/
> -----------------------------------------------------------
>
> (Updated May 29, 2018, 10:13 a.m.)
>
>
> Review request for mesos, Chun-Hung Hsiao and Jan Schlicht.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Used `*_SOME` macro for checking `Try` values in stout.
>
>
> Diffs
> -----
>
> 3rdparty/stout/tests/none_tests.cpp b6bbb882ca2d61db9d93870895bc076612f26f84
> 3rdparty/stout/tests/os/sendfile_tests.cpp 2a8568365c88ee7207c38f74599dcd3ba0f73410
>
>
> Diff: https://reviews.apache.org/r/67210/diff/2/
>
>
> Testing
> -------
>
> `make check`
>
>
> Thanks,
>
> Benjamin Bannier
>
>
Re: Review Request 67210: Used `*_SOME` macro for checking `Try`
values in stout.
Posted by Chun-Hung Hsiao <ch...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67210/#review203442
-----------------------------------------------------------
Fix it, then Ship it!
Haven't take a good at these but they might be candidates to use the new macros:
```
$ grep '(EXPECT\|ASSERT)_(TRUE\|FALSE)(.*is(Some\|Error\|None)())' 3rdparty/stout/ -r
...
3rdparty/stout//tests/ip_tests.cpp: EXPECT_FALSE(network.isError());
3rdparty/stout//tests/mac_tests.cpp: EXPECT_FALSE(mac.isError());
3rdparty/stout//tests/none_tests.cpp: EXPECT_TRUE(o.isNone());
3rdparty/stout//tests/none_tests.cpp: EXPECT_TRUE(o.isNone());
3rdparty/stout//tests/none_tests.cpp: EXPECT_TRUE(o.isNone());
3rdparty/stout//tests/none_tests.cpp: EXPECT_TRUE(r.isNone());
3rdparty/stout//tests/none_tests.cpp: EXPECT_TRUE(r.isNone());
3rdparty/stout//tests/none_tests.cpp: EXPECT_TRUE(r.isNone());
3rdparty/stout//tests/os_tests.cpp: ASSERT_FALSE(process.isError());
3rdparty/stout//tests/os_tests.cpp: ASSERT_FALSE(process.isError());
```
We could fix them in a follow-up patch.
3rdparty/stout/tests/os/sendfile_tests.cpp
Lines 65-66 (original), 65-66 (patched)
<https://reviews.apache.org/r/67210/#comment285670>
Can we use `ASSERT_SOME_EQ` here?
- Chun-Hung Hsiao
On May 18, 2018, 10:35 a.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67210/
> -----------------------------------------------------------
>
> (Updated May 18, 2018, 10:35 a.m.)
>
>
> Review request for mesos, Chun-Hung Hsiao and Jan Schlicht.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Used `*_SOME` macro for checking `Try` values in stout.
>
>
> Diffs
> -----
>
> 3rdparty/stout/tests/os/sendfile_tests.cpp 05966ae067ae3972598da3370eb16fdce5736c21
>
>
> Diff: https://reviews.apache.org/r/67210/diff/1/
>
>
> Testing
> -------
>
> `make check`
>
>
> Thanks,
>
> Benjamin Bannier
>
>