Jan Schlicht created MESOS-7193:
-----------------------------------

             Summary: 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


Some test cases in libprocesses 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)

Reply via email to