-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Miscellaneous flaky test fixes #5177
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
Merged
Merged
+111
−171
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5177 +/- ##
==========================================
- Coverage 83.07% 82.93% -0.15%
==========================================
Files 250 250
Lines 26946 26932 -14
==========================================
- Hits 22385 22335 -50
- Misses 4561 4597 +36
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
roypat
reviewed
Apr 30, 2025
The signal handler unit test registers the signal handlers, spins up a new thread, and sends signals to itself (using kill) to check that the metrics get updated. This is a very complicated test for a unit test, and it's already covered in the integration test test_signals.py. As this test is seldomly failing in our CI, it's best to get rid of its complexity and rely on the integration tests, which are better suited for this kind of test. Signed-off-by: Riccardo Mancini <mancio@amazon.com>
We seldom have failures in the CI where the test_mknod_and_own_dev fails because a file already exists. The test is using the actual /dev to create tmp devices. As there's no reason to use the actual /dev, move it to use a random folder and clean it up after the test. Signed-off-by: Riccardo Mancini <mancio@amazon.com>
The test was reimplementing the logic for creating a temporary directory instead of using TempDir, so I've changed it to simplify it. Also, save the PathBuf object instead of the String to be able to do Path operations in a canonical way without formatting strings. Signed-off-by: Riccardo Mancini <mancio@amazon.com>
This test has been flaky for a while, where sometimes the file is empty. As we're just interested that the message got delivered, not that the file was created in a timely manner, I'm adding a small retry. Signed-off-by: Riccardo Mancini <mancio@amazon.com>
test_balloon_snapshot started being flaky after we changed the logic on how we wait for the RSS to become stable. One theory is that we are not waiting enough time for the stats to refresh, so this change adds a sleep to ensure we have waited enough for the stats to be "fresh". Failure: ``` assert 189022208 > 189022208 ``` Signed-off-by: Riccardo Mancini <mancio@amazon.com>
We found a single failure for which the steal time between snapshot and restore went slightly above 2s on an AMD instance. As the purpose of this check is to ensure the value is "sane" (iow not a completely random number), not that it's really accurate (that's a kernel problem), I'm bumping it to 10s. Signed-off-by: Riccardo Mancini <mancio@amazon.com>
An upstream patch was backported to ubuntu 24.04 6.8.0-58 kernel that makes the nx hugepages recover thread a child of the firecracker process, thus increasing process count to 7. As we're not really interested in knowing how many threads we have in this test, let's remove the assertion altogether. Signed-off-by: Riccardo Mancini <mancio@amazon.com>
pb8o
approved these changes
May 2, 2025
roypat
approved these changes
May 2, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Fixes:
Reason
I've gone through the recent flaky test failures and this is a proposed fix. In most cases, the fix is to add a time interval to break an async race condition for which we have no better way to resolve.
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
tools/devtool checkstyle
to verify that the PR passes theautomated style checks.
how they are solving the problem in a clear and encompassing way.
in the PR.
CHANGELOG.md
.Runbook for Firecracker API changes.
integration tests.
TODO
.rust-vmm
.