You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Vinod Kone (JIRA)" <ji...@apache.org> on 2017/05/02 15:33:04 UTC

[jira] [Updated] (MESOS-7193) Use of `GTEST_IS_THREADSAFE` in asserts is problematic.

     [ https://issues.apache.org/jira/browse/MESOS-7193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vinod Kone updated MESOS-7193:
------------------------------
    Sprint: Mesosphere Sprint 54, Mesosphere Sprint 55, Mesosphere Sprint 56  (was: Mesosphere Sprint 54, Mesosphere Sprint 55)

> Use of `GTEST_IS_THREADSAFE` in asserts is problematic.
> -------------------------------------------------------
>
>                 Key: MESOS-7193
>                 URL: https://issues.apache.org/jira/browse/MESOS-7193
>             Project: Mesos
>          Issue Type: Bug
>          Components: libprocess, test
>            Reporter: Jan Schlicht
>            Assignee: Jan Schlicht
>              Labels: mesosphere
>
> Some test cases in libprocess use {{ASSERT_TRUE(GTEST_IS_THREADSAFE)}}. This is a misuse of that define, [the documentation in GTest says|https://github.com/google/googletest/blob/master/googletest/include/gtest/internal/gtest-port.h#L155-L163]:
> {noformat}
> Macros indicating which Google Test features are available (a macro
> is defined to 1 if the corresponding feature is supported;
> otherwise UNDEFINED -- it's never defined to 0.).  Google Test
> defines these macros automatically.  Code outside Google Test MUST
> NOT define them.
> {noformat}
> Currently, the use of {{GTEST_IS_THREADSAFE}} works fine in the assert, because it is defined to be {{1}}. But newer upstream versions of GTest use a more complicated define, that can yield to be undefined, causing compilation errors.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)