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

Make blaze_sym::path member optional #293

Merged
merged 2 commits into from
Aug 3, 2023
Merged

Conversation

d-e-s-o
Copy link
Collaborator

@d-e-s-o d-e-s-o commented Aug 2, 2023

We recently made the path attribute in the Rust symbolize::Sym type optional. For the C API, we mapped a None to an empty string. That is arguably not in line with how optionality is generally encoded in C. Switch to using a NULL pointer instead.

We recently made the path attribute in the Rust symbolize::Sym type
optional. For the C API, we mapped a None to an empty string. That is
arguably not in line with how optionality is generally encoded in C.
Switch to using a NULL pointer instead.

Signed-off-by: Daniel Müller <[email protected]>
This change extends our ELF and DWARF symbolization tests. ELF
symbolization was not actually exercised from Rust, while DWARF
symbolization was lacking in the C API tests. So fix that. Also extend
the tests to check for source directories, file names, and line numbers
(or lack thereof).

Signed-off-by: Daniel Müller <[email protected]>
@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (304915f) 89.27% compared to head (f038e4c) 89.28%.

❗ Current head f038e4c differs from pull request most recent head 898dbe6. Consider uploading reports for the commit 898dbe6 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #293   +/-   ##
=======================================
  Coverage   89.27%   89.28%           
=======================================
  Files          37       37           
  Lines        4652     4656    +4     
=======================================
+ Hits         4153     4157    +4     
  Misses        499      499           
Files Changed Coverage Δ
src/c_api/symbolize.rs 94.72% <100.00%> (+0.06%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@d-e-s-o d-e-s-o merged commit 3508671 into libbpf:main Aug 3, 2023
@d-e-s-o d-e-s-o deleted the topic/opt-path branch August 3, 2023 00:01
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.

1 participant