Skip to content

check subprocess.returncode to print error message.#639

Merged
audrow merged 4 commits intoros2:masterfrom
fujitatomoya:bugfix-20210520-check-returncode
Jun 17, 2021
Merged

check subprocess.returncode to print error message.#639
audrow merged 4 commits intoros2:masterfrom
fujitatomoya:bugfix-20210520-check-returncode

Conversation

@fujitatomoya
Copy link
Copy Markdown
Collaborator

address #601

Signed-off-by: Tomoya Fujita Tomoya.Fujita@sony.com

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
@fujitatomoya
Copy link
Copy Markdown
Collaborator Author

@audrow could you take a look when you got time?

Copy link
Copy Markdown
Member

@audrow audrow left a comment

Choose a reason for hiding this comment

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

Looks like a good change to me. Is there a way to add a test for it?

@audrow audrow self-assigned this May 27, 2021
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
@fujitatomoya
Copy link
Copy Markdown
Collaborator Author

@clalancette i'd like to request a review.

@fujitatomoya
Copy link
Copy Markdown
Collaborator Author

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Copy link
Copy Markdown
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

Besides the comments inline, I'm thinking we should have some prefix to show that these messages came from ros2run, and not from the process itself. Maybe something like "[ros2run]: Message".

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
@fujitatomoya
Copy link
Copy Markdown
Collaborator Author

@clalancette all comments are addressed, i will run CI.

@fujitatomoya
Copy link
Copy Markdown
Collaborator Author

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@fujitatomoya
Copy link
Copy Markdown
Collaborator Author

@clalancette friendly ping.

@clalancette
Copy link
Copy Markdown
Contributor

Besides the comments inline, I'm thinking we should have some prefix to show that these messages came from ros2run, and not from the process itself. Maybe something like "[ros2run]: Message".

This comment is still open. I do think we should have some kind of prefix on the output so people can tell it comes from ros2run and not from their binary.

@fujitatomoya
Copy link
Copy Markdown
Collaborator Author

@clalancette my bad, i missed that. i will address it.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
@fujitatomoya
Copy link
Copy Markdown
Collaborator Author

unit test to confirm the message. (using simple example to generate segmentation fault)

https://github.com/fujitatomoya/ros2_test_prover/blob/master/prover_rclcpp/src/ros2cli_601.cpp

root@134f29e8f25f:~/ros2_ws/colcon_ws# ros2 run prover_rclcpp ros2cli_601
Doing something terrible!
[ros2run]: Segmentation fault

@fujitatomoya
Copy link
Copy Markdown
Collaborator Author

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@audrow audrow requested a review from clalancette June 11, 2021 20:53
@audrow
Copy link
Copy Markdown
Member

audrow commented Jun 17, 2021

Rerunning CI (just in case):

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@audrow audrow merged commit aaeda77 into ros2:master Jun 17, 2021
@audrow
Copy link
Copy Markdown
Member

audrow commented Jun 17, 2021

Thanks for the PR, @fujitatomoya!

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.

4 participants