Skip to content

Invalid namespace argument succeeds in graph API calls #414

@jacobperron

Description

@jacobperron

Bug report

Required Info:

  • Operating System:
    • Ubuntu 18.04
  • Installation type:
    • source
  • Version or commit hash:
  • DDS implementation:
    • Fast-RTPS
  • Client library (if applicable):
    • rcl

Steps to reproduce issue

Uncomment graph API tests:

// TODO(jacobperron): This succeeds, but should fail due to invalid namespace
// ret = rcl_get_publisher_names_and_types_by_node(
// this->node_ptr, &allocator, false, this->test_graph_node_name, "_!invalidNs", &nat);
// EXPECT_EQ(RCL_RET_ERROR, ret) << rcl_get_error_string().str;
// rcl_reset_error();

// TODO(jacobperron): This succeeds, but should fail due to invalid namespace
// ret = rcl_get_publisher_names_and_types_by_node(
// this->node_ptr, &allocator, false, this->test_graph_node_name, unknown_node_ns, &nat);
// EXPECT_EQ(RCL_RET_ERROR, ret) << rcl_get_error_string().str;
// rcl_reset_error();

// TODO(jacobperron): This succeeds, but should fail due to invalid namespace
// ret = rcl_get_subscriber_names_and_types_by_node(
// this->node_ptr, &allocator, false, this->test_graph_node_name, "_!invalidNs", &nat);
// EXPECT_EQ(RCL_RET_ERROR, ret) << rcl_get_error_string().str;
// rcl_reset_error();

// TODO(jacobperron): This succeeds, but should fail due to invalid namespace
// ret = rcl_get_subscriber_names_and_types_by_node(
// this->node_ptr, &allocator, false, this->test_graph_node_name, unknown_node_ns, &nat);
// EXPECT_EQ(RCL_RET_ERROR, ret) << rcl_get_error_string().str;
// rcl_reset_error();

// TODO(jacobperron): This succeeds, but should fail due to invalid namespace
// ret = rcl_get_service_names_and_types_by_node(
// this->node_ptr, &allocator, false, this->test_graph_node_name, "_!invalidNs", &nat);
// EXPECT_EQ(RCL_RET_ERROR, ret) << rcl_get_error_string().str;
// rcl_reset_error();

// TODO(jacobperron): This succeeds, but should fail due to invalid namespace
// ret = rcl_get_service_names_and_types_by_node(
// this->node_ptr, &allocator, this->test_graph_node_name, unknown_node_ns, &nat);
// EXPECT_EQ(RCL_RET_ERROR, ret) << rcl_get_error_string().str;
// rcl_reset_error();

Build:

    colcon build --packages-up-to rcl

Run tests:

    colcon test --packages-select rcl

Or run the graph test specifically:

    build/rcl/test/test_graph__rmw_fastrtps_cpp

Expected behavior

All tests pass.

Actual behavior

The uncommented tests fails.

Additional information

Appears the graph API calls are succeeded when a failure is expected. This is likely a bug in the rmw implementation or a misunderstanding about what constitutes a valid namespace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions