Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first work toward adding ros time support #12

Merged
merged 1 commit into from
Feb 12, 2016
Merged

first work toward adding ros time support #12

merged 1 commit into from
Feb 12, 2016

Conversation

tfoote
Copy link
Contributor

@tfoote tfoote commented Dec 31, 2015

Add basic time support datatypes and functions to rcl.

Connects to ros2/ros2#178

@tfoote tfoote added the in progress Actively being worked on (Kanban column) label Dec 31, 2015
@tfoote tfoote added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Dec 31, 2015
/// Retrieve the current time as a rcl_ros_time_point_t struct.
/* This function returns the time from a ros clock unless simulation_time
* is active. In which case it returns the latest simulated time.
* The closest equivalent would be to std::chrono::steady_clock::now();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few things, first should it say it returns time from a system clock and not a ros clock? Second, wouldn't the closest equivalent be a system_clock?

@wjwwood
Copy link
Member

wjwwood commented Jan 1, 2016

This looks pretty good to me, other than a few inline comments, I have some high level questions:

  • Is this affected by the rcl_init/rcl_shutdown cycle?
  • In the design doc you mention blocking behavior and callbacks on negative time jumps, I don't see any of that here, should it be?

Also, I was imagining some of the possible corner cases:

  • What happens when the ros time is set, but the simulated time is not on? Should it turn it on?
  • Is there a race condition with retrieving the ros time because you have to check the bool and then fetch the time when it is false?
    • In more detail: you call get time, you check the bool and it's true, in another thread you disable it and set the simulated time to 0, in the original thread you finally get the simulated time but it is wrong.
    • Could you work around this by using just the time uint64 and reserving max_uint64 as "sim time is off"?

Thanks for taking the time to document and test it!

@tfoote
Copy link
Contributor Author

tfoote commented Feb 11, 2016

I've completely refactored the implementation to follow the new approach @wjwwood and I worked out. The implementation is mostly complete and has basic unit tests. I expect to polish it up with some more documentation and improved test coverage. And possibly add a few helper functions.

Linux CI is passing: http://ci.ros2.org/job/ci_linux/949/
http://ci.ros2.org/job/ci_osx/794/
http://ci.ros2.org/job/ci_windows/1044/ (one linter error in 72fd14d)

@tfoote
Copy link
Contributor Author

tfoote commented Feb 11, 2016

@dirk-thomas
Copy link
Member

Where does the term time point come from? It sounds kind of made up. It is also not mentioned in the design article. Therefore something more common might be better (e.g. just time or timestamp).

struct rcl_ros_time_source_storage_t;
typedef struct rcl_time_point_t
{
rcl_time_point_imp_t ns;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does ns stand for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nanoseconds I'll rename the variables.

@tfoote
Copy link
Contributor Author

tfoote commented Feb 11, 2016

time point is for std::chrono nomenclature http://en.cppreference.com/w/cpp/chrono/time_point

* The two time points must be using the same abstraction. And the resultant
* duration will also be of the same abstraction.
*
* The value will be computed as finish - start = duration. If start is after
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect the equation the other way around: duration = finish - start.

rcl_ret_t rcl_difference_times(rcl_time_point_t * start, rcl_time_point_t * finish,
rcl_duration_t * delta)
{
if (!start->time_source->type == finish->time_source->type) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not !=?

@tfoote
Copy link
Contributor Author

tfoote commented Feb 11, 2016

Windows failed other tests in rcl but unreleated to my testing. @wjwwood mentioned that he's running things on the server too for testing which might have been the cause.

http://ci.ros2.org/job/ci_windows/1047/testReport/junit/projectrootC_.J.workspace.ci_windows.ws.src.ros2.system_tests/test_rclcpp/gtest_executor__rmw_opensplice_cpp/
http://ci.ros2.org/job/ci_windows/1047/testReport/junit/projectrootC_.J.workspace.ci_windows.ws.src.ros2.rcl/rcl/test_node/

Running main() from gtest_main.cc
[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from TestNodeFixture
[ RUN      ] TestNodeFixture.test_rcl_node_accessors
========================================================================================
Report      : ERROR
Date        : Thu Feb 11 15:11:40 Pacific Standard Time 2016
Description : Failed to connect to/create the domain with ID 42
Node        : eatable
Process     : test_node.exe <7172>
Thread      : 3296
Internals   : V6.4.140407OSS/3b83e82/3b83e82/gapi::gapi_domainParticipantFactory::gapi_domainParticipantFactory_create_participant/gapi_domainParticipantFactory.c/285/0/1455232300.520908903

return RCL_RET_OK;
}

rcl_ret_t
rcl_timer_get_time_since_last_call(const rcl_timer_t * timer, uint64_t * time_since_last_call)
rcl_timer_get_time_since_last_call(const rcl_timer_t * timer,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please wrap after opening parenthesis.

@tfoote
Copy link
Contributor Author

tfoote commented Feb 12, 2016

@dirk-thomas
Copy link
Member

LGTM. Lets see what Jenkins opinion is...

This is as defined in http://design.ros2.org/articles/clock_and_time.html

This has the core functionality implemented in rcl.
It will need to be extended into each client library.
There are also areas to fill in for more support for duration, rates, and timers.
@dirk-thomas
Copy link
Member

These jobs actually build with all rmw impl. and not only OpenSplice as the last set:

@tfoote
Copy link
Contributor Author

tfoote commented Feb 12, 2016

1050 does not fail with these errors, which would suggest that it's related to running just on opensplice.

@wjwwood is seeing the same rcl errors on his branch. We looked into the errors and it appears that those tests are supposed to be skipped on windows with opensplice

@dirk-thomas
Copy link
Member

I would vote to go ahead with this PR and merge it since it doesn't have any regressions.

@wjwwood wjwwood mentioned this pull request Feb 12, 2016
@tfoote
Copy link
Contributor Author

tfoote commented Feb 12, 2016

For further confirmation I ran a build on master and that it shows the same behavior with the failing rcl tests: http://ci.ros2.org/job/ci_windows/1054/#showFailuresLink They are only exposed when running with connext and fastrtps disabled on windows.

tfoote added a commit that referenced this pull request Feb 12, 2016
first work toward adding ros time support
@tfoote tfoote merged commit aaa773e into master Feb 12, 2016
@tfoote tfoote removed the in review Waiting for review (Kanban column) label Feb 12, 2016
@tfoote tfoote deleted the ros_time branch February 12, 2016 08:06
emersonknapp pushed a commit to aws-ros-dev/rcl that referenced this pull request Jun 3, 2019
use _strdup() on windows to avoid compiler warning
emersonknapp pushed a commit to aws-ros-dev/rcl that referenced this pull request Jun 3, 2019
Call rcutils_logging_shutdown() in TearDown
to avoid leaking logging internal objects.

As any change to this file makes test_logging_named
fail, this releaxes the EXACT_EQ call on
g_last_log_event.location->line_number[1]. Instead
of looking for a particular value, we test an invariant
of the field (line numbers are positive).

Finally, in test_logging_function, initialize g_counter
and g_function_called values to make sure the test will
not fail even if `--gtest_repeat=2` is passed.

Other tests are still failing when this flag is passed:
[  FAILED  ] TestLoggingMacros.test_logging_once
[  FAILED  ] TestLoggingMacros.test_logging_skipfirst
[  FAILED  ] TestLoggingMacros.test_logging_skipfirst_throttle

However, fixing those tests would require actually changing
the logging implementation which is out of the scope of this
change.

Before:

    $ ./test_logging_macros
    Running main() from gmock_main.cc
    [==========] Running 8 tests from 1 test case.
    [----------] Global test environment set-up.
    [----------] 8 tests from TestLoggingMacros
    [ RUN      ] TestLoggingMacros.test_logging_named
    [       OK ] TestLoggingMacros.test_logging_named (0 ms)
    [ RUN      ] TestLoggingMacros.test_logging_once
    [       OK ] TestLoggingMacros.test_logging_once (0 ms)
    [ RUN      ] TestLoggingMacros.test_logging_expression
    [       OK ] TestLoggingMacros.test_logging_expression (0 ms)
    [ RUN      ] TestLoggingMacros.test_logging_function
    [       OK ] TestLoggingMacros.test_logging_function (0 ms)
    [ RUN      ] TestLoggingMacros.test_logging_skipfirst
    [       OK ] TestLoggingMacros.test_logging_skipfirst (0 ms)
    [ RUN      ] TestLoggingMacros.test_logging_throttle
    [       OK ] TestLoggingMacros.test_logging_throttle (302 ms)
    [ RUN      ] TestLoggingMacros.test_logging_skipfirst_throttle
    [       OK ] TestLoggingMacros.test_logging_skipfirst_throttle (302 ms)
    [ RUN      ] TestLoggingMacros.test_logger_hierarchy
    [       OK ] TestLoggingMacros.test_logger_hierarchy (0 ms)
    [----------] 8 tests from TestLoggingMacros (605 ms total)

    [----------] Global test environment tear-down
    [==========] 8 tests from 1 test case ran. (605 ms total)
    [  PASSED  ] 8 tests.

    =================================================================
    ==19903==ERROR: LeakSanitizer: detected memory leaks

    Direct leak of 504 byte(s) in 7 object(s) allocated from:
        #0 0x7fd640c1fb50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
        #1 0x7fd64091cbb5 in __default_allocate (/home/.../ros2_ws/install-asan/rcutils/lib/librcutils.so+0x8bb5)
        #2 0x7fd64092f1b0 in rcutils_string_map_init (/home/.../ros2_ws/install-asan/rcutils/lib/librcutils.so+0x1b1b0)
        #3 0x7fd640926641 in rcutils_logging_initialize_with_allocator (/home/.../ros2_ws/install-asan/rcutils/lib/librcutils.so+0x12641)
        #4 0x7fd6409261ab in rcutils_logging_initialize (/home/.../ros2_ws/install-asan/rcutils/lib/librcutils.so+0x121ab)
        #5 0x564405fc6627 in TestLoggingMacros::SetUp() (/home/.../ros2_ws/build-asan/rcutils/test_logging_macros+0x29627)
        #6 0x564406045999 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (/home/.../ros2_ws/build-asan/rcutils/test_logging_macros+0xa8999)
        #7 0x564406037b7d in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (/home/.../ros2_ws/build-asan/rcutils/test_logging_macros+0x9ab7d)
        #8 0x564405fe4503 in testing::Test::Run() (/home/.../ros2_ws/build-asan/rcutils/test_logging_macros+0x47503)
        #9 0x564405fe59e4 in testing::TestInfo::Run() (/home/.../ros2_ws/build-asan/rcutils/test_logging_macros+0x489e4)
        ros2#10 0x564405fe6588 in testing::TestCase::Run() (/home/.../ros2_ws/build-asan/rcutils/test_logging_macros+0x49588)
        ros2#11 0x564406001699 in testing::internal::UnitTestImpl::RunAllTests() (/home/.../ros2_ws/build-asan/rcutils/test_logging_macros+0x64699)
        ros2#12 0x56440604844c in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (/home/.../ros2_ws/build-asan/rcutils/test_logging_macros+0xab44c)
        ros2#13 0x564406039e46 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (/home/.../ros2_ws/build-asan/rcutils/test_logging_macros+0x9ce46)
        ros2#14 0x564405ffe42d in testing::UnitTest::Run() (/home/.../ros2_ws/build-asan/rcutils/test_logging_macros+0x6142d)
        ros2#15 0x564405fd197d in RUN_ALL_TESTS() (/home/.../ros2_ws/build-asan/rcutils/test_logging_macros+0x3497d)
        ros2#16 0x564405fd18c3 in main (/home/.../ros2_ws/build-asan/rcutils/test_logging_macros+0x348c3)
        ros2#17 0x7fd63fd84b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

After:

    $ ./test_logging_macros
    Running main() from gmock_main.cc
    [==========] Running 9 tests from 1 test case.
    [----------] Global test environment set-up.
    [----------] 9 tests from TestLoggingMacros
    [ RUN      ] TestLoggingMacros.test_empty
    [       OK ] TestLoggingMacros.test_empty (0 ms)
    [ RUN      ] TestLoggingMacros.test_logging_named
    [       OK ] TestLoggingMacros.test_logging_named (0 ms)
    [ RUN      ] TestLoggingMacros.test_logging_once
    [       OK ] TestLoggingMacros.test_logging_once (0 ms)
    [ RUN      ] TestLoggingMacros.test_logging_expression
    [       OK ] TestLoggingMacros.test_logging_expression (0 ms)
    [ RUN      ] TestLoggingMacros.test_logging_function
    [       OK ] TestLoggingMacros.test_logging_function (0 ms)
    [ RUN      ] TestLoggingMacros.test_logging_skipfirst
    [       OK ] TestLoggingMacros.test_logging_skipfirst (0 ms)
    [ RUN      ] TestLoggingMacros.test_logging_throttle
    [       OK ] TestLoggingMacros.test_logging_throttle (303 ms)
    [ RUN      ] TestLoggingMacros.test_logging_skipfirst_throttle
    [       OK ] TestLoggingMacros.test_logging_skipfirst_throttle (302 ms)
    [ RUN      ] TestLoggingMacros.test_logger_hierarchy
    [       OK ] TestLoggingMacros.test_logger_hierarchy (0 ms)
    [----------] 9 tests from TestLoggingMacros (605 ms total)

    [----------] Global test environment tear-down
    [==========] 9 tests from 1 test case ran. (606 ms total)
    [  PASSED  ] 9 tests.

[1] https://testing.googleblog.com/2015/01/testing-on-toilet-change-detector-tests.html

Signed-off-by: Thomas Moulard <tmoulard@amazon.com>
emersonknapp pushed a commit to aws-ros-dev/rcl that referenced this pull request Jun 3, 2019
Add rcutils_logging_shutdown() every time needed
in test_logging.cpp. Remove spurious `g_rcutils_logging_initialized = false;`
preventing rcutils_logging_shutdown() from freeing memory.

Before:
  $ ./test_logging
  Running main() from ../../../install-asan/gtest_vendor/src/gtest_vendor/src/gtest_main.cc
  [==========] Running 5 tests from 1 test case.
  [----------] Global test environment set-up.
  [----------] 5 tests from TestLogging
  [ RUN      ] TestLogging.test_logging_initialization
  [       OK ] TestLogging.test_logging_initialization (0 ms)
  [ RUN      ] TestLogging.test_logging
  [       OK ] TestLogging.test_logging (0 ms)
  [ RUN      ] TestLogging.test_log_severity
  [       OK ] TestLogging.test_log_severity (0 ms)
  [ RUN      ] TestLogging.test_logger_severities
  [       OK ] TestLogging.test_logger_severities (0 ms)
  [ RUN      ] TestLogging.test_logger_severity_hierarchy
  [       OK ] TestLogging.test_logger_severity_hierarchy (0 ms)
  [----------] 5 tests from TestLogging (0 ms total)

  [----------] Global test environment tear-down
  [==========] 5 tests from 1 test case ran. (0 ms total)
  [  PASSED  ] 5 tests.

  =================================================================
  ==1676==ERROR: LeakSanitizer: detected memory leaks

  Direct leak of 72 byte(s) in 1 object(s) allocated from:
      #0 0x7f7a7229db50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
      #1 0x7f7a71f9abb5 in __default_allocate (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/install-asan/rcutils/lib/librcutils.so+0x8bb5)
      #2 0x7f7a71fad1b0 in rcutils_string_map_init (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/install-asan/rcutils/lib/librcutils.so+0x1b1b0)
      #3 0x7f7a71fa4641 in rcutils_logging_initialize_with_allocator (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/install-asan/rcutils/lib/librcutils.so+0x12641)
      #4 0x7f7a71fa41ab in rcutils_logging_initialize (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/install-asan/rcutils/lib/librcutils.so+0x121ab)
      #5 0x561e9d22c972 in TestLogging_test_logging_Test::TestBody() (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x1a972)
      #6 0x561e9d2b545d in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0xa345d)
      #7 0x561e9d2a71c7 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x951c7)
      #8 0x561e9d2534c9 in testing::Test::Run() (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x414c9)
      #9 0x561e9d2548f4 in testing::TestInfo::Run() (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x428f4)
      ros2#10 0x561e9d255498 in testing::TestCase::Run() (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x43498)
      ros2#11 0x561e9d2705a9 in testing::internal::UnitTestImpl::RunAllTests() (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x5e5a9)
      ros2#12 0x561e9d2b7f10 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0xa5f10)
      ros2#13 0x561e9d2a9490 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x97490)
      ros2#14 0x561e9d26d33d in testing::UnitTest::Run() (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x5b33d)
      ros2#15 0x561e9d24088c in RUN_ALL_TESTS() (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x2e88c)
      ros2#16 0x561e9d2407d2 in main (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x2e7d2)
      ros2#17 0x7f7a71402b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

  Direct leak of 72 byte(s) in 1 object(s) allocated from:
      #0 0x7f7a7229db50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
      #1 0x7f7a71f9abb5 in __default_allocate (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/install-asan/rcutils/lib/librcutils.so+0x8bb5)
      #2 0x7f7a71fad1b0 in rcutils_string_map_init (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/install-asan/rcutils/lib/librcutils.so+0x1b1b0)
      #3 0x7f7a71fa4641 in rcutils_logging_initialize_with_allocator (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/install-asan/rcutils/lib/librcutils.so+0x12641)
      #4 0x7f7a71fa41ab in rcutils_logging_initialize (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/install-asan/rcutils/lib/librcutils.so+0x121ab)
      #5 0x561e9d22a9b6 in TestLogging_test_logging_initialization_Test::TestBody() (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x189b6)
      #6 0x561e9d2b545d in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0xa345d)
      #7 0x561e9d2a71c7 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x951c7)
      #8 0x561e9d2534c9 in testing::Test::Run() (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x414c9)
      #9 0x561e9d2548f4 in testing::TestInfo::Run() (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x428f4)
      ros2#10 0x561e9d255498 in testing::TestCase::Run() (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x43498)
      ros2#11 0x561e9d2705a9 in testing::internal::UnitTestImpl::RunAllTests() (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x5e5a9)
      ros2#12 0x561e9d2b7f10 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0xa5f10)
      ros2#13 0x561e9d2a9490 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x97490)
      ros2#14 0x561e9d26d33d in testing::UnitTest::Run() (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x5b33d)
      ros2#15 0x561e9d24088c in RUN_ALL_TESTS() (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x2e88c)
      ros2#16 0x561e9d2407d2 in main (/home/ANT.AMAZON.COM/tmoulard/ros2_ws/build-asan/rcutils/test_logging+0x2e7d2)
      ros2#17 0x7f7a71402b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

  SUMMARY: AddressSanitizer: 144 byte(s) leaked in 2 allocation(s).

After:
  $ ./test_logging
  Running main() from ../../../install-asan/gtest_vendor/src/gtest_vendor/src/gtest_main.cc
  [==========] Running 5 tests from 1 test case.
  [----------] Global test environment set-up.
  [----------] 5 tests from TestLogging
  [ RUN      ] TestLogging.test_logging_initialization
  [       OK ] TestLogging.test_logging_initialization (0 ms)
  [ RUN      ] TestLogging.test_logging
  [       OK ] TestLogging.test_logging (0 ms)
  [ RUN      ] TestLogging.test_log_severity
  [       OK ] TestLogging.test_log_severity (0 ms)
  [ RUN      ] TestLogging.test_logger_severities
  [       OK ] TestLogging.test_logger_severities (0 ms)
  [ RUN      ] TestLogging.test_logger_severity_hierarchy
  [       OK ] TestLogging.test_logger_severity_hierarchy (0 ms)
  [----------] 5 tests from TestLogging (1 ms total)

  [----------] Global test environment tear-down
  [==========] 5 tests from 1 test case ran. (1 ms total)
  [  PASSED  ] 5 tests.

Signed-off-by: Thomas Moulard <tmoulard@amazon.com>
ivanpauno pushed a commit that referenced this pull request Jan 2, 2020
use target_compile_definitions instead of set_target_properties
mauropasse pushed a commit to mauropasse/rcl that referenced this pull request Feb 15, 2021
rename rmw_listener_cb_t->rmw_listener_callback_t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants