You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Jan Schlicht (JIRA)" <ji...@apache.org> on 2017/04/07 13:31:41 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 ]
Jan Schlicht updated MESOS-7193:
--------------------------------
Sprint: Mesosphere Sprint 54
> 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, tests
> Reporter: Jan Schlicht
> Assignee: Jan Schlicht
>
> 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)