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

prog: fix tautological AttachTo condition in ProgramSpec.kernelModule #1640

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

brycekahle
Copy link
Contributor

It should've been ps.AttachTo != "", but targetsKernelModule already checks that condition, so just remove it completely.

@brycekahle brycekahle requested a review from a team as a code owner January 6, 2025 21:47
Copy link
Collaborator

@ti-mo ti-mo left a comment

Choose a reason for hiding this comment

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

Thanks! If this made it through, that means test coverage is lacking. Maybe now's a good opportunity to add one? You can assume bpf_testmod is loaded in CI if that helps.

@brycekahle
Copy link
Contributor Author

@ti-mo added some tests

@brycekahle brycekahle requested a review from ti-mo January 14, 2025 17:51
ti-mo and others added 2 commits January 15, 2025 14:04
This allows calling requireTestmod in a loop for marking subtests as requiring
bpf_testmod.

Signed-off-by: Timo Beckers <timo@isovalent.com>
This fixes a bug introduced by a refactor in 0.17. targetsKernelModule() already
checks for AttachTo == "", so drop the statement.

Signed-off-by: Bryce Kahle <bryce.kahle@datadoghq.com>
Co-authored-by: Timo Beckers <timo@isovalent.com>
@ti-mo ti-mo force-pushed the bryce.kahle/fix-kernel-module branch from a850752 to fbf9bb0 Compare January 15, 2025 13:07
@ti-mo ti-mo changed the title fix kernelModule AttachTo condition prog: fix tautological AttachTo condition in ProgramSpec.kernelModule Jan 15, 2025
@ti-mo ti-mo merged commit fd1fe1b into cilium:main Jan 15, 2025
16 of 17 checks passed
@brycekahle brycekahle deleted the bryce.kahle/fix-kernel-module branch January 22, 2025 17:51
@brycekahle
Copy link
Contributor Author

@ti-mo any chance of getting a minor release for this fix? I don't think kernel module programs will work without it.

@ti-mo
Copy link
Collaborator

ti-mo commented Jan 24, 2025

@ti-mo any chance of getting a minor release for this fix? I don't think kernel module programs will work without it.

@brycekahle Yep, aiming for Mon/Tues.

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.

2 participants