Skip to content

Test ros2 lifecycle output streams - #1266

Open
Miko997 wants to merge 1 commit into
ros2:rollingfrom
Miko997:test-lifecycle-set-streams
Open

Test ros2 lifecycle output streams#1266
Miko997 wants to merge 1 commit into
ros2:rollingfrom
Miko997:test-lifecycle-set-streams

Conversation

@Miko997

@Miko997 Miko997 commented Aug 12, 2026

Copy link
Copy Markdown

Description

Verify that ros2 lifecycle set writes command errors to stderr and successful transitions to stdout. Also require the unused stream to remain empty so regressions cannot pass through combined process output.

Addresses #484

Is this user-facing behavior change?

No.

Did you use Generative AI?

No.

Additional Information

Validation:

  • python3 -m compileall -q ros2lifecycle/test/test_cli.py
  • git diff --check origin/rolling...HEAD

The full ROS integration test was not run locally because this environment does not contain ROS 2 or colcon.

Signed-off-by: Miko Parkkinen <141511110+Miko997@users.noreply.github.com>
@mergify

mergify Bot commented Aug 12, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@Miko997

Miko997 commented Aug 12, 2026

Copy link
Copy Markdown
Author

Validated the current head 6b6e8e27e7b0919df85610f9fb3c1af507767ff5 in the official ros:rolling-ros-base container using rmw_fastrtps_cpp. Both packages built successfully, and the ros2lifecycle test suite passed: 5 tests, 0 errors, 0 failures, 0 skipped.

text=lifecycle_command.stderr,
strict=False
)
assert not lifecycle_command.stdout

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one minor concern here.

stderr on the success path could be brittle. rmw implementations (RCI ConnextDDS, CycloneDDS) occasionally emit warnings to stderr that are unrelated to the command's correctness — e.g., discovery or shared-memory warnings depending on the CI host.

let's run the CI to make sure this is not the case.

@fujitatomoya

Copy link
Copy Markdown
Collaborator

Pulls: #1266
Gist: https://gist.githubusercontent.com/fujitatomoya/9d50b953e54302ac33fd3f339f9c47ca/raw/2d49a16721b2b5b81f991dcd3742879f93d67155/ros2.repos
BUILD args: --packages-up-to ros2lifecycle
TEST args: --packages-select ros2lifecycle
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/20090

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants