-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Update test_deflate_on_oom test #4880
Update test_deflate_on_oom test #4880
Conversation
Updated the deflate on oom test to increase stability of the test. Making the balloon smaller and the allocation larger. Signed-off-by: Jack Thomson <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4880 +/- ##
=======================================
Coverage 84.05% 84.05%
=======================================
Files 251 251
Lines 28096 28096
=======================================
Hits 23616 23616
Misses 4480 4480
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran the flaky test look as seen here: https://github.com/firecracker-microvm/firecracker/tree/main/tests#how-to-reproduce-intermittent-aka-flaky-tests for over an hour on my machine with no failures
how many failures were there before the change?
# get a lower reading than the initial one. | ||
initial_rss = get_stable_rss_mem_by_pid(firecracker_pid) | ||
inflate_size = 256 - int(initial_rss / 1024) + 10 | ||
inflate_size = 256 - (int(initial_rss / 1024) + 50) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this changes the sign of the offset, meaning we are inflating 60MiB less rather than 40MiB more as the comment suggests. Or am I misreading?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah intended to be 60mb less now as I think we want to test if the balloon will deflate on the oom kiiler. So we allocate more memory now which will trigger the oom killer and check if the balloon behaves as we expect.
I think I'd read the comment wrong, I'd read it as its the initial memory usage + 10 (now 50) taken away from overall guest memory
With the previous setup it would fail on my machine within a couple of iterations, but was fairly random |
Updated the deflate on oom test to attempt to increase stability of the test.
Making the a balloon less aggressive size, but allocating a larger chunk of memory, we are still able to test the functionality of the balloon device (it will deflate if the flag is enabled and not if disabled.) With this setup it means the guest is less likely to crash and cause the test to fail
I ran the flaky test look as seen here: https://github.com/firecracker-microvm/firecracker/tree/main/tests#how-to-reproduce-intermittent-aka-flaky-tests for over an hour on my machine with no failures
Changes
Altered configuration of the balloon deflate on oom tests
Reason
Attempt to fix deflate on oom flaky test
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md
.PR Checklist
PR.
CHANGELOG.md
.TODO
s link to an issue.contribution quality standards.
rust-vmm
.