Skip to content

Invalid namespace argument succeeds in graph API calls #414

Closed

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.

Activity

  1. added
    bug
    on Apr 10, 2019
  2. clalancette commented on Jun 21, 2022

    @clalancette
    Contributor

    I'm pretty sure this was fixed by #498, so closing. Feel free to reopen if I'm wrong about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions