eclipse-iceoryx / iceoryx2

Eclipse iceoryx2™ - true zero-copy inter-process-communication in pure Rust
https://iceoryx.io
Apache License 2.0
1.03k stars 40 forks source link

[#213] test: add test cases #439

Closed xieyuschen closed 1 month ago

xieyuschen commented 1 month ago

Notes for Reviewer

I have added some test cases during I'm learning the codes. It improves out test.

Pre-Review Checklist for the PR Author

  1. [X] Add sensible notes for the reviewer
  2. [X] PR title is short, expressive and meaningful
  3. [X] Relevant issues are linked in the References section
  4. [X] Every source code file has a copyright header with SPDX-License-Identifier: Apache-2.0 OR MIT
  5. [X] Branch follows the naming format (iox2-123-introduce-posix-ipc-example)
  6. [X] Commits messages are according to this guideline
    • [X] Commit messages have the issue ID ([#123] Add posix ipc example)
    • [X] Commit author matches Eclipse Contributor Agreement (and ECA is signed)
  7. [X] Tests follow the best practice for testing
  8. [X] Changelog updated in the unreleased section including API breaking changes
  9. [x] Assign PR to reviewer
  10. [x] All checks have passed (except task-list-completed)

Checklist for the PR Reviewer

Post-review Checklist for the PR Author

  1. [x] All open points are addressed and tracked via issues

References

Updates #213

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 79.02%. Comparing base (a7f0df7) to head (c472781). Report is 3 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/439/graphs/tree.svg?width=650&height=150&src=pr&token=FN3YFXTJCI&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx)](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/439?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx) ```diff @@ Coverage Diff @@ ## main #439 +/- ## ========================================== + Coverage 78.93% 79.02% +0.08% ========================================== Files 196 196 Lines 23283 23366 +83 ========================================== + Hits 18379 18465 +86 + Misses 4904 4901 -3 ``` | [Files with missing lines](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/439?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx) | Coverage Δ | | |---|---|---| | [iceoryx2/src/service/builder/publish\_subscribe.rs](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/439?src=pr&el=tree&filepath=iceoryx2%2Fsrc%2Fservice%2Fbuilder%2Fpublish_subscribe.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx#diff-aWNlb3J5eDIvc3JjL3NlcnZpY2UvYnVpbGRlci9wdWJsaXNoX3N1YnNjcmliZS5ycw==) | `90.97% <ø> (-0.57%)` | :arrow_down: | | [.../src/service/static\_config/message\_type\_details.rs](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/439?src=pr&el=tree&filepath=iceoryx2%2Fsrc%2Fservice%2Fstatic_config%2Fmessage_type_details.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx#diff-aWNlb3J5eDIvc3JjL3NlcnZpY2Uvc3RhdGljX2NvbmZpZy9tZXNzYWdlX3R5cGVfZGV0YWlscy5ycw==) | `100.00% <100.00%> (ø)` | | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/439/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx)
xieyuschen commented 1 month ago

oops, I have found that alignment in 32bits is 4, not 8. let me change it:)

xieyuschen commented 1 month ago

@xieyuschen It is always a pleasure to start the week with an Earl Grey Hot (with milk) and a review of your PR.

Thank you very much for your continuous effort and helping us out!

ack, will try to resolve it later today and thanks for your clarify.

xieyuschen commented 1 month ago

Hi @elfenpiff , I have updated the PR with multiple small commits for you to check them based on your comments. I resolved the straitfoward comments and left some comments for you to see whether you have concerns about it.

Thanks for reviewing.

xieyuschen commented 1 month ago

Hi @elfenpiff , I have squashed the commits together for your final review. Could you review it and then we can merge it?

I plan to create another new PRs for the testing later. I found it helps me to understand the project while improving our codebase as well.

elfenpiff commented 1 month ago

@xieyuschen fix the little CI failure with size_of and we can get it merged.

xieyuschen commented 1 month ago

@xieyuschen fix the little CI failure with size_of and we can get it merged.

sure, i haven't encountered it in my local so i have missed it. but nvm, now it should be fine:)