Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iox #454 enhance cmd line parser tests #564

Merged

Conversation

marthtz
Copy link
Contributor

@marthtz marthtz commented Feb 17, 2021

Pre-Review Checklist for the PR Author

  1. Branch follows the naming format (iox-#123-this-is-a-branch)
  2. Commits messages are according to this guideline
    • Commit messages have the issue ID (iox-#123 commit text)
    • Commit messages are signed (git commit -s)
    • Commit author matches Eclipse Contributor Agreement (and ECA is signed)
  3. Update the PR title
    • Follow the same conventions as for commit messages
    • Link to the relevant issue
  4. Relevant issues are linked
  5. Add sensible notes for the reviewer
  6. All checks have passed (except task-list-completed)
  7. Assign PR to reviewer

Notes for Reviewer

Adding some more tests to test_roudi_cmd_line_parser_config_file_option. Code contributed by @JimmyBch .

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Code according to our coding style and naming conventions
  • Unit tests have been written for new behavior
  • Public API changes are documented via doxygen
  • Copyright owner are updated in the changed files
  • PR title describes the changes

Post-review Checklist for the PR Author

  1. All open points are addressed and tracked via issues

Post-review Checklist for the Eclipse Committer

  1. All checkboxes in the PR checklist are checked or crossed out
  2. Merge

References

Signed-off-by: Jimmy Belloche <external.jimmy.belloche@de.bosch.com>
Signed-off-by: Jimmy Belloche <external.jimmy.belloche@de.bosch.com>
Signed-off-by: Jimmy Belloche <external.jimmy.belloche@de.bosch.com>
Signed-off-by: Jimmy Belloche <external.jimmy.belloche@de.bosch.com>
Signed-off-by: Jimmy Belloche <external.jimmy.belloche@de.bosch.com>
Signed-off-by: Jimmy Belloche <external.jimmy.belloche@de.bosch.com>
Signed-off-by: Jimmy Belloche <external.jimmy.belloche@de.bosch.com>
@marthtz
Copy link
Contributor Author

marthtz commented Feb 17, 2021

Question: Testing -c/--config-file with an invalid file/filepath doesn't trigger any response. It continues without error. Is that intended?

@marthtz marthtz added the test A module/integration/stress/etc test for a component label Feb 17, 2021
@marthtz marthtz marked this pull request as ready for review February 17, 2021 13:24
@dkroenke
Copy link
Member

Question: Testing -c/--config-file with an invalid file/filepath doesn't trigger any response. It continues without error. Is that intended?

When cpptoml is used then you get an error like this:

terminate called after throwing an instance of 'cpptoml::parse_exception'
  what():  /etc/iceoryx/roudi_config.toml could not be opened for parsing
Aborted

An additional check for directly is of course possible (by trying to open the file with the FileReader class and checking with isOpen()) but feels a bit redundant because the config file parser already do that job. On the other side, cpptoml throws here an exception which we should avoid and it is good practice to handle faulty values as early as possible.

Signed-off-by: Jimmy Belloche <external.jimmy.belloche@de.bosch.com>
Signed-off-by: Jimmy Belloche <external.jimmy.belloche@de.bosch.com>
Signed-off-by: Jimmy Belloche <external.jimmy.belloche@de.bosch.com>
@elfenpiff
Copy link
Contributor

@JimmyBch could you please adjust your commit messages in the future so that they state what has been done. "fix review findings" is technically correct but it is hard to trace for future developer what that meant. A better alternative could be for instance "replace EXPECT_TRUE with ASSERT_TRUE to avoid undefined behavior in test"

@JimmyBch
Copy link
Contributor

@JimmyBch could you please adjust your commit messages in the future so that they state what has been done. "fix review findings" is technically correct but it is hard to trace for future developer what that meant. A better alternative could be for instance "replace EXPECT_TRUE with ASSERT_TRUE to avoid undefined behavior in test"

Yes, I will, Sorry bad habits.

JimmyBch and others added 3 commits March 5, 2021 10:44
Signed-off-by: Jimmy Belloche <external.jimmy.belloche@de.bosch.com>
Signed-off-by: Hintz Martin (XC-AD/ESW1-J1) <martin.hintz@de.bosch.com>
Signed-off-by: Hintz Martin (XC-AD/ESW1-J1) <martin.hintz@de.bosch.com>
orecham
orecham previously approved these changes Mar 5, 2021
@marthtz marthtz requested a review from elfenpiff March 5, 2021 11:08
…dation

Signed-off-by: Simon Hoinkis <simon.hoinkis@apex.ai>
@mossmaurice mossmaurice force-pushed the iox-#454-enhance-cmd-line-parser-tests branch from d9cfc21 to d2ed648 Compare March 8, 2021 09:21
@JimmyBch
Copy link
Contributor

JimmyBch commented Mar 8, 2021

@mossmaurice You forgot to sign your commit :)

…CESS_DEFAULT_KILL_DELAY

Signed-off-by: Jimmy Belloche <external.jimmy.belloche@de.bosch.com>
@marthtz marthtz requested a review from orecham March 8, 2021 11:10
Copy link
Contributor

@mossmaurice mossmaurice left a comment

Choose a reason for hiding this comment

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

LGTM

@marthtz marthtz dismissed elfenpiff’s stale review March 9, 2021 08:45

Review findings addressed

@marthtz marthtz merged commit 99de7da into eclipse-iceoryx:master Mar 9, 2021
@dkroenke dkroenke linked an issue Mar 9, 2021 that may be closed by this pull request
6 tasks
marthtz added a commit to boschglobal/iceoryx that referenced this pull request May 12, 2021
…cmd-line-parser-tests

Iox eclipse-iceoryx#454 enhance cmd line parser tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test A module/integration/stress/etc test for a component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancing Tests in Roudi
7 participants