elf_reader: add tests for ELF objects without BTF#1939
Merged
ti-mo merged 2 commits intocilium:mainfrom Feb 18, 2026
Merged
Conversation
Contributor
|
@puwun Thanks for picking this up! After looking at this for a bit, I think it would be preferable to reuse the existing loader.c as much as possible to increase coverage. I suggest the following:
Try to make only the strictly-necessary changes to keep things straightforward to review. Thank you! |
0c9fc75 to
d7485d5
Compare
Contributor
Author
|
@ti-mo thanks, updated 👍 |
When the ELF has no BTF, ex.extInfo will be nil. This was overlooked in a recent refactor. Signed-off-by: Timo Beckers <timo@isovalent.com>
d7485d5 to
b0adcf6
Compare
30f5825 to
affa282
Compare
Adds infrastructure to test loading of ELF objects compiled without BTF information. Signed-off-by: Pavan More <pavansmore05@gmail.com> Co-authored-by: Timo Beckers <timo@isovalent.com>
affa282 to
eb0f746
Compare
ti-mo
approved these changes
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds infrastructure to test loading of ELF objects compiled without BTF information, verifying the fix from #1807
Changes:
testdata/loader_nobtf.cusing legacy map definitions.Makefileto compile this new test data with-g0(no BTF).TestLoadCollectionSpecWithoutBTFto verify successful parsing whenspec.Typesis nil.Fixes: #1810