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 shadowing log size variable in verifier log retry loop #1635

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

ti-mo
Copy link
Collaborator

@ti-mo ti-mo commented Dec 20, 2024

When ProgramOptions.LogSize was removed in 0.16, the tests weren't updated to exercise the retry loop, since a minimum log size was chosen that was larger than what the test program could generate.

With the addition of LogSizeStart, this notoriously fragile code broke when logSize was again tracked as a separate variable, while being accidentally shadowed within the scope of the for loop. This resulted in an endless loop on kernels without the LogTrueSize field.

Remove the shadowing and fix the tests.

@ti-mo ti-mo marked this pull request as ready for review December 20, 2024 01:16
@ti-mo ti-mo requested a review from a team as a code owner December 20, 2024 01:16
When ProgramOptions.LogSize was removed in 0.16, the tests weren't updated to
exercise the retry loop, since a minimum log size was chosen that was larger
than what the test program could generate.

With the addition of LogSizeStart, this notoriously fragile code broke when
logSize was again tracked as a separate variable, while being accidentally
shadowed within the scope of the for loop. This resulted in an endless loop
on kernels without the LogTrueSize field.

Remove the shadowing and fix the tests.

Signed-off-by: Timo Beckers <timo@isovalent.com>
@ti-mo ti-mo force-pushed the tb/logsize-probing-tests branch from f0fcfe6 to b4381c3 Compare December 20, 2024 01:23
@ti-mo ti-mo merged commit e439d37 into cilium:main Dec 20, 2024
16 of 17 checks passed
@ti-mo ti-mo deleted the tb/logsize-probing-tests branch December 20, 2024 01:29
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