-
Notifications
You must be signed in to change notification settings - Fork 181
[Backport Foxy] Increase code coverage and some fixes #847
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Add test context bad_fini * Add bad name service tests * Add default case validation result * Add bad_arg tests rcl_lexer_lookahead2_accept * Add bad_arg test rcl_trigger_guard_condition * Add bad arguments events test * Add message_lost event test * Disable failing test * Address peer review comments * Remove failing test * Separate non related API tests * Add comments to explain error causes * Use test fixture without params * Replace nullptr with NULL Signed-off-by: Jorge Perez <[email protected]>
* Add tests not empty names_and_types * Add tests graph.c module * Add tests remap basic usage * Add more tests remap module * Add tests ini/fini publisher_node * Refactor style and naming * Add nullptr bad arg * Add tests bad args * Add test bad_alloc * Add missing source file * Remove not working test * Remove extra rcl_reset_error * Change ASSERT to EXPECT when fini scope * Add const for const arguments * Add missing fini parsed arguments * Add error string to output * Add invalid usage comments to test * Fix lint line length issues * Fix uncrustify lint * Modify test to save alloc struct * Remove internal source file * Remove case requiring internal def Signed-off-by: Jorge Perez <[email protected]>
* Add test for remap internal functions * Add function headers * Make local function public * Move rcl_remap_copy to public header Signed-off-by: Jorge Perez <[email protected]>
* Add bad param tests ini/fini rosout publisher * Make ini/fini_publisher_for_node public Signed-off-by: Jorge Perez <[email protected]>
* Add needed extra null check * Add test for added check * Add tests for nullptrs Signed-off-by: Jorge Perez <[email protected]>
This just prevents a memory leak. Signed-off-by: Chris Lalancette <[email protected]>
* Reformat rmw_impl_id_check to call a testable function * Reformat to expose the function in the public header * Reformat style return result * Expose macro names to be tested with the function checker * Add test for failing cases of the function * Set error variable and log in the main caller * Use format string for logging * Change name of checker function * Reset rcl error to avoid overwrite Signed-off-by: Jorge Perez <[email protected]>
* Add mimick test for rcl_publisher_get_subscription_count * Remove const qualifiers * Add missing mock suffix * Improve test description * Add mock test for rcl_publisher_assert_liveliness * Add class to init publisher tests * Add test for mocked rmw_publish * Add mock test for rcl_publish_serialized * Mock rcutils_string_map_init to make init fail * Add mock test making rmw_publisher_get_actual_qos fail * Add class to ease mimick usage * Reformat tests to use helper class * Add mocked rcutils_string_map_init to make init fail * Add tests mocking loaned functions * Add mock fail tests for publisher_init * Add publisher fini fail mock tests * Add nullptr tests * Update mocking utilities * Reformat with macro utility * Add comments for mocked tests * Check count_size value after test * Reformat to use constexpr where possible * Add variable making clear bad param test * Add link to original file to help tracking changes Signed-off-by: Jorge Perez <[email protected]>
Signed-off-by: Michel Hidalgo <[email protected]>
* Add bomb allocator * Fix memory checked for error * Add tests for bad alloc * Fix break statement * Add static keyword to methods added Signed-off-by: Jorge Perez <[email protected]>
* Change allocation method for copied parameter files * Add bad allocator test Signed-off-by: Jorge Perez <[email protected]>
* Add nullptr tests get_param_files * Add bad alloc tests * Add missing tests * Add bad alloc tests rcl_arguments_copy * Remove repeated test * Remove spaces * Restore erased test * Relocate test * Refactor bomb allocator test * Add missing rcl_reset_error() checks Signed-off-by: Jorge Perez <[email protected]>
* Add fault injection macros to rcl functions Signed-off-by: Stephen Brawner <[email protected]> * PR fixup Signed-off-by: Stephen Brawner <[email protected]>
* Add coverage tests wait module * Add fault injection test * Add zero_init allocator test to init * Remove bomb allocator test * Add better handling fault injection * Add comment to fault injection tests * Move test to another section Signed-off-by: Jorge Perez <[email protected]>
Signed-off-by: Michel Hidalgo <[email protected]>
Signed-off-by: Michel Hidalgo <[email protected]>
* Implement a generic way to change logging levels This allows a per-logger configuration of the logging level, along with the global level. Signed-off-by: Chen Lihui <[email protected]> Signed-off-by: Chris Lalancette <[email protected]> Co-authored-by: Tomoya.Fujita <[email protected]> Co-authored-by: Ivan Santiago Paunovic <[email protected]>
* Add fix wait.c init/fini allocation on error * Add test for the fix * Remove unit tests Signed-off-by: Jorge Perez <[email protected]>
Signed-off-by: Jorge Perez <[email protected]>
* Add function rcl_event_is_valid This functions checks if a passed event is a valid already init instance of a publisher/subscriber event. * Move impl header to its own file * Reset error status * Fix alpha order * Add check for bad allocator * Add tests to check if error set Signed-off-by: Jorge Perez <[email protected]>
* Add test subscriber lost_event * Fix lint warning * Remove test wait for lost event * Check for fastrtps as unsupported * Add check for event count returned * Reformat to delete extra code * Fix linter spacing Signed-off-by: Jorge Perez <[email protected]>
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
* Add tests proving the required functionality * Add check to the functions * Change name to test Signed-off-by: Jorge Perez <[email protected]>
brawner
reviewed
Oct 28, 2020
Contributor
brawner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is #664 supposed to be included here, it adds a lot of new API and it's unclear how it's related to coverage/fixes
Contributor
Author
|
closing this PR in favour of this other one #848 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Need these releases: