-
Notifications
You must be signed in to change notification settings - Fork 2k
Increase testing coverage for PCI code #5346
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
Increase testing coverage for PCI code #5346
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/pcie #5346 +/- ##
================================================
+ Coverage 80.59% 82.35% +1.75%
================================================
Files 265 265
Lines 30690 30640 -50
================================================
+ Hits 24736 25233 +497
+ Misses 5954 5407 -547
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:
|
874ffb1
to
f083fe6
Compare
We are not really using the `as_any` and `id` members of the PciDevice trait. At the moment, only VirtIO devices and the PCI root port is implementing PciDevice and we are never iterating over the container of PCI devices. Signed-off-by: Babis Chalios <[email protected]>
Add a unit test for the logic that handles adding BARs for a device. Also, ensure that we check that the BAR index we are adding is within range before we use it to index the BARs vector. Signed-off-by: Babis Chalios <[email protected]>
Make sure that configuring the MSI-X capability in PCI configuration space works properly (configuration space is initialized as expected). Also, make sure that the implementation respects the read/write properties of the respective bits. Finally, fix logic in the code that adds capabilities to take into account properly the size of capabilities. Signed-off-by: Babis Chalios <[email protected]>
Make sure we handle correctly accessing invalid registers. Signed-off-by: Babis Chalios <[email protected]>
Make sure we detect correctly valid intents to reprogram (move) BARs. Also, make sure we correctly ignore buggy ones. Signed-off-by: Babis Chalios <[email protected]>
Add a few unit tests to check the logic that accesses PCI configuration space via the PCI Bus. Ensure that negative cases are being handled properly. Signed-off-by: Babis Chalios <[email protected]>
Also, drop some of effectively dead code that Cloud Hypervisor was using because they were not relying on KVM to handle interrupt controllers. Finally, fixup some error cases on guest reads which need to return all-ones when bad accesses happen. Signed-off-by: Babis Chalios <[email protected]>
The merge-base changed after approval.
75eb51d
into
firecracker-microvm:feature/pcie
Changes
Add tests for PCI-related code within the
pci
crateUnit tests for PCI configuration space handling, regarding guest accesses within the configuration space and configuration of MSIx interrupts
Reason
Increase testing coverage
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 checkbuild --all
to verify that the PR passesbuild checks on all supported architectures.
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
.