mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Schlicht (JIRA)" <>
Subject [jira] [Created] (MESOS-7193) Use of `GTEST_IS_THREADSAFE` in asserts is problematic.
Date Wed, 01 Mar 2017 16:24:45 GMT
Jan Schlicht created MESOS-7193:

             Summary: Use of `GTEST_IS_THREADSAFE` in asserts is problematic.
                 Key: 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|]:
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.
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

View raw message