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

C typesupport tests #21

Merged
merged 7 commits into from
Feb 12, 2016
Merged

C typesupport tests #21

merged 7 commits into from
Feb 12, 2016

Conversation

wjwwood
Copy link
Member

@wjwwood wjwwood commented Feb 9, 2016

This pull request adds more tests to test the end to end functionality of C type support.

There are some temporary hacks to limit the tests to the type support implementations that support C properly (OpenSplice and Connext static).

There are two related pull requests:

Also the examples repository has a branch that matches this one, but I do not propose we merge that right now. It was mostly a test to run locally and I believe the tests in rcl now cover the same functionality of the code.

@wjwwood wjwwood added the in progress Actively being worked on (Kanban column) label Feb 9, 2016
@wjwwood
Copy link
Member Author

wjwwood commented Feb 10, 2016

@jacquelinekay I had to roll back your two commits locally since I'm not building with your Connext c type support branch yet.

@jacquelinekay
Copy link
Contributor

I merged Connext C typesupport, so I've added back building for all rmw implementations.

@jacquelinekay
Copy link
Contributor

get_rcl_information added in 1354647

I also messed around with how you build test_publisher as an example for myself, feel free to change that (it will probably conflict with your changes).

@@ -20,7 +20,7 @@ extern "C"
{
#endif

#include "rosidl_generator_c/message_type_support.h"
#include "rosidl_generator_c/message_type_support_struct.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

@wjwwood I added this in one of my commits--does this look correct to you?

Copy link
Member Author

Choose a reason for hiding this comment

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

I had a discussion about this with @esteve because I think it doesn't make sense to include publisher.h without committing to a middleware implementation. message_type_support.h is provided by individual rosidl type support packages, e.g.:

Where as message_type_support_struct.h is provided by the rmw implementation agnostic rosidl_generator_c.

So I'd say no, it's not quite right and instead changing this just worked around another issue which was that something you were building needed a specific type support but wasn't using its include directories.

Separately we discussed whether or not it made since to do this in publisher.h and/or subscription.h but not in things like node.h. It is absolutely necessary in node.h since that will use messages from rcl_interfaces and once you include it you will need to be tied to a specific rmw implementation, but technically publisher and subscription do not have this restriction, but they could in the future.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it. I'll revert it. I think I was trying to fix issues that were related to the linking problems we had earlier.

@wjwwood
Copy link
Member Author

wjwwood commented Feb 11, 2016

Ok, I think this is ready for review. It needs squashing still.

Currently tests are only created for OpenSplice and Connext static as there are issues with type support introspect and C.

There are two related pull requests:

Also the examples repository has a branch that matches this one, but I do not propose we merge that right now. It was mostly a test to run locally and I believe the tests in rcl now cover the same functionality of the code.

Here is CI:

Thanks @jacquelinekay for helping me get this sorted out today.

@wjwwood wjwwood added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Feb 11, 2016
@@ -28,7 +28,6 @@ set(${PROJECT_NAME}_sources
src/rcl/time.c
src/rcl/timer.c
)

Copy link
Member

Choose a reason for hiding this comment

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

Why remove the empty line? Seems to help to distinguish the following macro from inline code.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know, restored in 65aa36b

@dirk-thomas
Copy link
Member

I only got partially through it. I have to read the actual tests again.

@wjwwood
Copy link
Member Author

wjwwood commented Feb 11, 2016

The Linux job is green and the OS X job has 6 test failures, but they're all in rclcpp and look to be timeouts. I don't think the OS X test failures are related to these pr's.

On Windows the rclc_examples package fails, but I don't think we should merge those anyways. I renamed the branch on the examples repository to rcl_examples and started a new Windows CI job:

I don't think we need to rerun Linux or OS X since on the master branch the rclc_examples package has an AMENT_IGNORE file in it.

@wjwwood
Copy link
Member Author

wjwwood commented Feb 11, 2016

@jacquelinekay could you have a look at the comments regarding the get_rcl_information.cmake file when you get a chance?

if (!malloc_expected) {
MALLOC_PRINTF(
" malloc (%s) %p %" PRIu64 "\n",
malloc_expected ? " expected" : "not expected", memory, fw_size);
Copy link
Member

Choose a reason for hiding this comment

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

Can you move the expected into the string one line above and only insert the not or three spaces based on the condition?

Same below.

Copy link
Member Author

Choose a reason for hiding this comment

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

I want to leave that for now, as I didn't always have the if statement around it and it's useful to remove it temporarily to see mallocs that are happening outside of the critical section.

@dirk-thomas
Copy link
Member

Beside the comments this LGTM.

@jacquelinekay
Copy link
Contributor

I added rmw implementation-specific classnames as William suggested. Running a CI job to see that the reporting is correct on Jenkins.

http://ci.ros2.org/job/ci_linux/953/

@jacquelinekay
Copy link
Contributor

+1

@wjwwood
Copy link
Member Author

wjwwood commented Feb 12, 2016

I fixed the tests on Windows, waiting for CI:

@wjwwood
Copy link
Member Author

wjwwood commented Feb 12, 2016

There are some failing tests on Windows, but based on the comments in #12 I think they might exist on master. I think we should merge this and #12 and address the test failure separately.

Other than those failing tests, I believe this pr is good to go. I'm going to squash and run one more Linux CI after squashing and then merge. However, since #12 conflicts with this one, I'm going to review and merge that one first and then rebase this one.

@tfoote
Copy link
Contributor

tfoote commented Feb 12, 2016

@wjwwood I confirmed that the rcl tests exist on master in http://ci.ros2.org/job/ci_windows/1054/#showFailuresLink I didn't realize you wanted to look at #12 I just merged it. If you have any more comments on it let me know and I can fix it up. Thanks for taking on the rebase, I think it should be relatively quick.

@wjwwood
Copy link
Member Author

wjwwood commented Feb 12, 2016

Rebased, waiting on Linux CI to merge: http://ci.ros2.org/job/ci_linux/962

@wjwwood
Copy link
Member Author

wjwwood commented Feb 12, 2016

CI is good, merging.

wjwwood added a commit that referenced this pull request Feb 12, 2016
@wjwwood wjwwood merged commit 4ae588f into master Feb 12, 2016
@wjwwood wjwwood deleted the c_typesupport_tests branch February 12, 2016 09:07
@wjwwood wjwwood removed the in review Waiting for review (Kanban column) label Feb 12, 2016
ivanpauno pushed a commit that referenced this pull request Jan 2, 2020
add set error msg macro and improve error api
mauropasse pushed a commit to mauropasse/rcl that referenced this pull request Sep 17, 2021
…with-actions-support

Add APIs to support actions on EventsExecutor
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.

4 participants