Skip to content

WIP#4705

Draft
andrewstrohman wants to merge 8 commits intomainfrom
pr/andrewstrohman/refactor-resolve
Draft

WIP#4705
andrewstrohman wants to merge 8 commits intomainfrom
pr/andrewstrohman/refactor-resolve

Conversation

@andrewstrohman
Copy link
Contributor

Fixes

Description

Changelog

@andrewstrohman andrewstrohman added the release-note/minor This PR introduces a minor user-visible change label Feb 27, 2026
@andrewstrohman andrewstrohman force-pushed the pr/andrewstrohman/refactor-resolve branch 10 times, most recently from e5ecf85 to 549f7da Compare March 3, 2026 04:11
FedeDP and others added 3 commits March 4, 2026 18:42
When we want to resolve a precise index of an array, like for example
`do_pipe2` with `resolve: "[1]"`, we want to skip nested pointer logic,
since we are already going to dereference the correct index.
Also, updated `TestResolveBTFArgFromKprobePolicy` to test the behavior.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Refactor so that we have have one test per argument type.

Since we are limited to configuring 5 arguments, we were limited to
testing 5 argument types per test. It's also easier to debug one
argument type per test.

Signed-off-by: Andy Strohman <astrohma@isovalent.com>
To cover a pointer to an int and a pointer to string at the end of the
resolve path.

Signed-off-by: Andy Strohman <astrohma@isovalent.com>
@andrewstrohman andrewstrohman force-pushed the pr/andrewstrohman/refactor-resolve branch 2 times, most recently from d61c3cf to 863fb3c Compare March 4, 2026 23:15
To cover nested anonymous unions and structs.

Signed-off-by: Andy Strohman <astrohma@isovalent.com>
Test that nested anonymous unions and structs work.

Signed-off-by: Andy Strohman <astrohma@isovalent.com>
We do not support dynamic arrays of pointers, so adjust the test to
reflect this.

Signed-off-by: Andy Strohman <astrohma@isovalent.com>
From a BTF perspective, the 2D array gets flattened to a 1D array. This
test demonstrates how to configure resolve in order to locate the
correct element.

Signed-off-by: Andy Strohman <astrohma@isovalent.com>
@andrewstrohman andrewstrohman force-pushed the pr/andrewstrohman/refactor-resolve branch from 863fb3c to de2d01e Compare March 4, 2026 23:35
Only support dynamic array of non-pointers

Signed-off-by: Andy Strohman <astrohma@isovalent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/minor This PR introduces a minor user-visible change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants