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

Add iterator for bpf programs/maps in a bpf object #166

Merged
merged 4 commits into from May 6, 2022

Conversation

grantseltzer
Copy link
Member

@grantseltzer grantseltzer commented May 5, 2022

Plus a helper for getting section name, and a selftest

grantseltzer added 2 commits May 4, 2022
Signed-off-by: grantseltzer <grantseltzer@gmail.com>
selftest

Signed-off-by: grantseltzer <grantseltzer@gmail.com>
Signed-off-by: grantseltzer <grantseltzer@gmail.com>
@grantseltzer grantseltzer changed the title Add iterator for bpf programs in a bpf object Add iterator for bpf programs/maps in a bpf object May 5, 2022
@rafaeldtinoco
Copy link
Collaborator

rafaeldtinoco commented May 6, 2022

Reviewing this one...

rafaeldtinoco
rafaeldtinoco previously approved these changes May 6, 2022
Copy link
Collaborator

@rafaeldtinoco rafaeldtinoco left a comment

LGTM. There are 2 minor fixes over Println needed. Other than that, I think its good! Thanks.

}
for k, v := range expectedProgramNames {
if v == false {
fmt.Fprintln(os.Stderr, "did not iterate over expected program: %s", k)
Copy link
Collaborator

@rafaeldtinoco rafaeldtinoco May 6, 2022

Choose a reason for hiding this comment

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

fmt.Printf instead (you're using %s)

}
for k, v := range expectedMapNames {
if v == false {
fmt.Fprintln(os.Stderr, "did not iterate over expected map: %s", k)
Copy link
Collaborator

@rafaeldtinoco rafaeldtinoco May 6, 2022

Choose a reason for hiding this comment

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

fmt.Printf instead (you're using %s)

Signed-off-by: grantseltzer <grantseltzer@gmail.com>
@grantseltzer grantseltzer merged commit be71c35 into aquasecurity:main May 6, 2022
1 check passed
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.

None yet

2 participants