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

[#264] add unique ids #353

Merged
merged 23 commits into from
Aug 15, 2024

Conversation

elfenpiff
Copy link
Contributor

@elfenpiff elfenpiff commented Aug 14, 2024

Notes for Reviewer

Pre-Review Checklist for the PR Author

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

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Unit tests have been written for new behavior
  • Public API is documented
  • PR title describes the changes

Post-review Checklist for the PR Author

  1. All open points are addressed and tracked via issues

References

Closes #264

@elfenpiff elfenpiff self-assigned this Aug 14, 2024
@@ -17,9 +17,9 @@ use crate::posix::types::*;

pub unsafe fn proc_pidpath(pid: pid_t, buffer: *mut c_char, buffer_len: size_t) -> isize {
let path = if pid == crate::internal::getpid() {
"/proc/self/exe".to_owned()
"/proc/self/exe\0".to_owned()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Forgot here that rust string literals are not 0 terminated ... Thankfully the address sanitizer on the C++ side found it.

Copy link
Member

@elBoberido elBoberido left a comment

Choose a reason for hiding this comment

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

Only half way through, but it's too late for today

iceoryx2-ffi/cxx/include/iox/layout.hpp Outdated Show resolved Hide resolved
iceoryx2-ffi/cxx/include/iox/layout.hpp Outdated Show resolved Hide resolved
Copy link

codecov bot commented Aug 15, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.31%. Comparing base (38dd482) to head (91ab54b).
Report is 24 commits behind head on main.

Files Patch % Lines
iceoryx2-pal/posix/src/linux/unistd.rs 50.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #353      +/-   ##
==========================================
+ Coverage   80.28%   80.31%   +0.02%     
==========================================
  Files         192      192              
  Lines       22569    22569              
==========================================
+ Hits        18120    18126       +6     
+ Misses       4449     4443       -6     
Files Coverage Δ
iceoryx2/src/config.rs 80.95% <100.00%> (+4.76%) ⬆️
iceoryx2/src/port/port_identifiers.rs 87.50% <ø> (ø)
iceoryx2/src/service/header/publish_subscribe.rs 100.00% <ø> (ø)
iceoryx2-pal/posix/src/linux/unistd.rs 82.45% <50.00%> (ø)

... and 2 files with indirect coverage changes

iceoryx2-ffi/cxx/include/iox/layout.hpp Outdated Show resolved Hide resolved
@@ -281,7 +281,7 @@ impl Default for Config {
Self {
global: Global {
root_path_unix: Path::new(b"/tmp/iceoryx2/").unwrap(),
root_path_windows: Path::new(b"C:\\Temp\\iceoryx2\\").unwrap(),
root_path_windows: Path::new(b"c:\\Temp\\iceoryx2\\").unwrap(),
Copy link
Member

Choose a reason for hiding this comment

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

Food for thought and nothing for this PR.

What do you think of using the forward slash / for Windows paths? It is recommended for C# developers. From here

If you prefer to hard-code the directory separator character, you should use the forward slash (/) character. It is the only recognized directory separator character on Unix systems, as the output from the example shows, and is the AltDirectorySeparatorChar on Windows.

This prevents the insanity of things like C:\\\\\\\\Temp when the string is passed down a few layers and each one removes one of the escape characters.

@elfenpiff elfenpiff merged commit 09e8f44 into eclipse-iceoryx:main Aug 15, 2024
47 of 48 checks passed
@elfenpiff elfenpiff deleted the iox2-264-add-unique-ids branch August 15, 2024 14:38
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.

Create C++ language binding
2 participants