* init/shutdown API
* context fini API
* node init/fini API
* guard condition init/fini API
* security APIs
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
* Add deallocate calls to free strdup allocated memory
* Add variables to know if free is required
* Reformat not use extra booleans
* Address peer review comments
Signed-off-by: Jorge Perez <jjperez@ekumenlabs.com>
* 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 <jjperez@ekumenlabs.com>
* 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 <jjperez@ekumenlabs.com>
* 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 <jjperez@ekumenlabs.com>
* 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 <jjperez@ekumenlabs.com>
* Add fault injection macros and unit tests to rcl_action
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Addressing feedback
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* PR Fixup
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* PR Fixup
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Fix memory leak in rcl_subscription_init()/rcl_publisher_init() (#794)
* Fix memory leak in rcl_subscription_init()/rcl_publisher_init()
In rcl_subscription_init(), while rmw_subscription_get_actual_qos()
return failure, created rmw subscription handle isn't freed.
In rcl_publisher_init(), while rmw_publisher_get_actual_qos()
return failure, created rmw publisher handle isn't freed.
Signed-off-by: Barry Xu <barry.xu@sony.com>
* Remove codes on the cascading errors.
Signed-off-by: Barry Xu <barry.xu@sony.com>
* Change code style
Signed-off-by: Barry Xu <barry.xu@sony.com>
* Output error message to stderr
Signed-off-by: Barry Xu <barry.xu@sony.com>
* Remove format string
This version of the macro is not available in Foxy.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Print new line
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Co-authored-by: Barry Xu <barry.xu@sony.com>
* Add fault injection macros and unit tests to rcl_lifecycle
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Address feedback
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* PR Fixup
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Add basic unit tests for refactored functions
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* PR Fixup
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Fix memory errors
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* headers moved
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Addressing feedback
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Switch to decltype
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Remove a bunch of redundant nullptr assignments
* Fix some memory leaks
* Ensure source string is deallocated
* Remove redundant array size assignment
Signed-off-by: Scott K Logan <logans@cottsay.net>
* Added benchmark test to rcl_yaml_param_parser
Signed-off-by: ahcorde <ahcorde@gmail.com>
* reset heap counters
Signed-off-by: ahcorde <ahcorde@gmail.com>
* updated benchmark tests
Signed-off-by: ahcorde <ahcorde@gmail.com>
* Added feedback
Signed-off-by: ahcorde <ahcorde@gmail.com>
* Replace BENCHMARK_DEFINE_F and BENCHMARK_REGISTER_F with BENCHMARK_F
Signed-off-by: ahcorde <ahcorde@gmail.com>
* Used rcpputils for the path
Signed-off-by: ahcorde <ahcorde@gmail.com>
* Clean up the CMake dependencies
Signed-off-by: Scott K Logan <logans@cottsay.net>
* Updated test
Signed-off-by: ahcorde <ahcorde@gmail.com>
* udpated test name
Signed-off-by: ahcorde <ahcorde@gmail.com>
Co-authored-by: Scott K Logan <logans@cottsay.net>