ros2 / rmw_zenoh

RMW for ROS 2 using Zenoh as the middleware
Apache License 2.0
185 stars 34 forks source link

Make rmw_zenoh_cpp pass all core tests #267

Closed ahcorde closed 1 week ago

ahcorde commented 1 month ago

This issue will track the tests failures in some ros core packages:

Package Failing test Flaky
rcl test_events__rmw_zenoh_cpp
rcl_action :heavy_check_mark:
rcl_lifecycle :heavy_check_mark:
rclcpp test_qos_event__rmw_zenoh_cpp
rclcpp_lifecycle :heavy_check_mark:
rclcpp_action :heavy_check_mark:
test_rclcpp test_services_cpp__rmw_zenoh_cpp

test_events__rmw_zenoh_cpp

111: [INFO] [1724407583.785118284] [rmw_zenoh_cpp]: Successfully connected to a Zenoh router with id e3fd1217688e472236c9fabe6ce2acb.
111: /home/ahcorde/ros2_rolling/src/ros2/rcl/rcl/test/rcl/test_events.cpp:137: Failure
111: Expected equality of these values:
111:   ret
111:     Which is: 3
111:   0
111: provided event_type 7 is not supported by rmw_zenoh_cpp, at /home/ahcorde/ros2_rolling/src/ros2/rmw_zenoh/rmw_zenoh_cpp/src/rmw_event.cpp:54
111: 
111: 
111: >>> [rcutils|error_handling.c:108] rcutils_set_error_state()
111: This error state is being overwritten:
111: 
111:   'provided event_type 7 is not supported by rmw_zenoh_cpp, at /home/ahcorde/ros2_rolling/src/ros2/rmw_zenoh/rmw_zenoh_cpp/src/rmw_event.cpp:54'
111: 
111: with this new error message:
111: 
111:   'event's implementation is invalid, at /home/ahcorde/ros2_rolling/src/ros2/rcl/rcl/src/rcl/event.c:223'
111: 
111: rcutils_reset_error() should be called after error handling to avoid this.

test_qos_event__rmw_zenoh_cpp

130: [INFO] [1724407517.768452371] [rmw_zenoh_cpp]: Successfully connected to a Zenoh router with id e3fd1217688e472236c9fabe6ce2acb.
130: [ RUN      ] TestQosEvent.test_publisher_constructor
130: unknown file: Failure           
130: C++ exception with description "Failed to initialize event: provided event_type 7 is not supported by rmw_zenoh_cpp, at /home/ahcorde/ros2_rolling/src/ros2/rmw_zenoh/rmw_zenoh_cpp/src/rmw_event.cpp:54" thrown in the test body.
130: 
130: [  FAILED  ] TestQosEvent.test_publisher_constructor (6 ms)
130: [ RUN      ] TestQosEvent.test_subscription_constructor
130: unknown file: Failure
130: C++ exception with description "Failed to initialize event: provided event_type 1 is not supported by rmw_zenoh_cpp, at /home/ahcorde/ros2_rolling/src/ros2/rmw_zenoh/rmw_zenoh_cpp/src/rmw_event.cpp:109" thrown in the test body.
130: 
130: [  FAILED  ] TestQosEvent.test_subscription_constructor (2 ms)
130: [ RUN      ] TestQosEvent.test_default_incompatible_qos_callbacks
130: /home/ahcorde/ros2_rolling/src/ros2/rclcpp/rclcpp/test/rclcpp/test_qos_event.cpp:207: Failure
130: Expected equality of these values:
130:   "New subscription discovered on topic '/ns/test_topic', requesting incompatible QoS. " "No messages will be sent to it. Last incompatible policy: DURABILITY_QOS_POLICY"
130:     Which is: "New subscription discovered on topic '/ns/test_topic', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: DURABILITY_QOS_POLICY"
130:   pub_log_msg
130:     Which is: ""

test_services_cpp__rmw_zenoh_cpp

# 1: [test_services_client_cpp-2] [ERROR] [1724407062.211503664] [rclcpp]: caught std::exception exception in GraphListener thread: rcl_wait unexpectedly timed out
101: [test_services_client_cpp-2] terminate called after throwing an instance of 'std::runtime_error'
101: [test_services_client_cpp-2]   what():  rcl_wait unexpectedly timed out
Yadunund commented 1 week ago

With https://github.com/ros2/rclcpp/pull/2626, I can get all rclcpp and rclcpp_lifecycle tests to run without any crashes!

However these tests from rclcpp still fail. Some should be fixed by https://github.com/ros2/rclcpp/pull/2626 while others require some fixes to rmw_zenoh_cpp.

The following tests FAILED:
     33 - test_intra_process_manager (Failed)
     41 - test_node_interfaces__get_node_interfaces (Failed)
     44 - test_node_interfaces__node_graph (Failed)
     62 - test_publisher (Failed)
     67 - test_qos (Failed)
     95 - test_executors (Failed)
    105 - test_events_executor (Timeout)
    108 - test_wait_set (Failed)
    132 - test_qos_event__rmw_zenoh_cpp (Failed)
Yadunund commented 1 week ago

Superseded by https://github.com/ros2/rmw_zenoh/issues/286