-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Tiny integration test fixes to fill accidental gaps in coverage #5050
Open
roypat
wants to merge
5
commits into
firecracker-microvm:main
Choose a base branch
from
roypat:tiny-test-fixes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+17
−60
Conversation
This file contains 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
Make the test actually assert that the returned error matches the error message stored in a local variable. Signed-off-by: Patrick Roy <[email protected]>
The `response` variable was assigned, but never used. Just delete it. Signed-off-by: Patrick Roy <[email protected]>
335a9dc
to
26bb489
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5050 +/- ##
=======================================
Coverage 83.19% 83.19%
=======================================
Files 247 247
Lines 26641 26641
=======================================
Hits 22163 22163
Misses 4478 4478
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Instead of sleeping for 2 seconds to wait for booting, add a network device and wait for ssh availability (happens automatically in .start()). Use mark_killed() to assert that Firecracker exited instead of "waitpid". Using `waitpid(2)` here is wrong, because it only works on child processes, and Firecracker is no child of the pytest process (it is daemonized, for starters). The reason we never caught this being broken is because the test also simply ignores all exceptions raised. But there's more issues here: The test never caused _killed to be set to `True`, so if Firecracker really did exit, then we would have been seeing intermittent failures during microvm teardown (as Microvm.kill() asserts that the process is still alive if _killed is False). In fact, our guest kernels do not have the required drivers compiled in to support CTRL+ALT+DEL (thanks Riccardo for figuring this part out). Signed-off-by: Patrick Roy <[email protected]>
Ensure all io_engine related tests run with both the sync and the async io_engine. Prior to 4.14 deprecation, some tests used the following logic to determine whether the Async engine or the Sync engine should be tested: If io_uring is supported (e.g. host_kernel != 4.14) then use Async Else use Sync This meant we were running with the Async engine on 5.10 and 6.1, and with the Sync engine on 4.14. However, once 4.14 went out of support, this meant that tests employing this logic only ever tested the Async engine anymore. Fix this by having all these tests always run with both Sync and Async engines, independently of host kernel version. Also remove all logic around checking whether io_uring is supported, because it definitely is supported on all currently supported host kernels. Signed-off-by: Patrick Roy <[email protected]>
Turns out that `except ConnectionError` catches the `ConnectionError` from the standard library, while what needs to be caught is the (different) `ConnectionError` from the `requests` package. Signed-off-by: Patrick Roy <[email protected]>
ca4e793
to
17f40ef
Compare
roypat
added a commit
to roypat/firecracker
that referenced
this pull request
Feb 26, 2025
Firecracker supports sending a CTRL+ALT+DEL event to the guest, to trigger a reboot, and we had an integration test for this. However, the integration test was broken (see firecracker-microvm#5050), and actually, our guest kernels dont have the necessary drivers compiled in to actually receive the CTRL+ALT+DEL. Fix this by actually enabling the relavant Kconfigs. We don't re-build the artifacts just yet, as it'll happen anyway in a few days when we branch off the next release. Signed-off-by: Patrick Roy <[email protected]>
roypat
added a commit
to roypat/firecracker
that referenced
this pull request
Feb 26, 2025
Firecracker supports sending a CTRL+ALT+DEL event to the guest, to trigger a reboot, and we had an integration test for this. However, the integration test was broken (see firecracker-microvm#5050), and actually, our guest kernels dont have the necessary drivers compiled in to actually receive the CTRL+ALT+DEL. Fix this by actually enabling the relavant Kconfigs. We don't re-build the artifacts just yet, as it'll happen anyway in a few days when we branch off the next release. Suggested-by: Riccardo Mancini <[email protected]> Signed-off-by: Patrick Roy <[email protected]>
10 tasks
roypat
added a commit
that referenced
this pull request
Feb 26, 2025
Firecracker supports sending a CTRL+ALT+DEL event to the guest, to trigger a reboot, and we had an integration test for this. However, the integration test was broken (see #5050), and actually, our guest kernels dont have the necessary drivers compiled in to actually receive the CTRL+ALT+DEL. Fix this by actually enabling the relavant Kconfigs. We don't re-build the artifacts just yet, as it'll happen anyway in a few days when we branch off the next release. Suggested-by: Riccardo Mancini <[email protected]> Signed-off-by: Patrick Roy <[email protected]>
blocked until we rebuild CI artifacts |
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.
Fixes a handful of small issues discovered in integration tests, such as
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
.