Fix tests that would fail if run on microvm 6.1 #4733
Merged
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
This patchset fixes some tests that would fail if run on a guest kernel 6.1 (#4737). None of these seems to be an issue with the firecracker/guest kernel integration, but only a testing framework issue.
This patch-set was tested on 6.1 kernel here: https://buildkite.com/firecracker/mancio-test/builds/9
1. wait for VM to be up before taking snapshots
These two tests are failing on uvm 6.1. This is caused by
vmgenid
driver not being initialized at the time we take the snapshot. This is something we explicitly warn against in the documentation here but we were only observing it in x86.This patch adds the
wait_for_up
like other snapshot tests to ensure the guest is fully booted before taking the snapshot.2. remove assumption on no hwrng device except virtio_rng
test_rng.py
tests assume thatvirtio_rng
device is the only hw rng available in the microvm. Since 5.15, ARM uvms have a SMCCC TRNG device which is paravirtualized by KVM (https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=400659&state=%2A&archive=both).This patch removes that assumption by checking which rng are available and which is currently in use in the tests to ensure the right device is tested (
virtio-rng
).Reason
We are adding support for uvm 6.1, these tests, despite being only run on 5.10 in the CI, would fail if run on 6.1
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
.