-
Couldn't load subscription status.
- Fork 2.1k
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
Conversation
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:
|
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 checkstyleto 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.