Test selected kvm unit tests#27
Open
nmanthey wants to merge 9 commits into
Open
Conversation
Replace c5a.4xlarge (AMD EPYC) with c8i.4xlarge (Intel Xeon 6) as the default x86_64 instance type in DEFAULT_PLATFORM_MAP. The c8i family provides a newer CPU generation with equivalent compute resources (16 vCPUs, 32 GB RAM) and is a prerequisite for enabling nested virtualization support. This change affects KernelCI pull-lab jobs: when the poller translates a job_definition for an x86_64 workload, it will now launch c8i.4xlarge instances instead of c5a.4xlarge. Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
Add automatic detection and enablement of nested virtualization when launching EC2 instances from supported Intel-based families. When a supported instance type is detected, the CpuOptions parameter with NestedVirtualization=enabled is passed to the RunInstances API call. This exposes Intel VT-x to the guest, allowing KVM and Hyper-V workloads to run inside the EC2 instance. Supported families per AWS documentation: C8i, M8i, R8i, X8i, C7i, M7i, R7i, I7i and their variants (flex, d). Reference: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-ec2-nested-virtualization.html Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
Update instance_type from c5a.4xlarge to c8i.4xlarge in both example configuration files to match the new default platform map. This ensures local runs and integration tests use the same instance type as KernelCI-triggered pull-lab jobs. Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
The repository default branch is 'main' but all workflows referenced 'mainline', causing them to never trigger on pull requests or pushes. Changes: - basic-ci.yml: trigger on main, drop Python 3.9/3.10 from matrix (package requires >=3.11) - coverage-check.yml: checkout origin/main for base coverage - codeql.yml: trigger on main Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
- cli.py: remove empty f-string, wrap long line - artifacts.py: remove trailing blank line - pull_labs_poller.py: remove unused submit_tests import - test_kcidb_submit.py: add blank lines before nested definitions - test_pull_labs_poller.py: remove unused tempfile import, fix over-indented continuation lines, rewrite test to not patch the removed submit_tests symbol - test_pull_labs_translate.py: remove unused DEFAULT_TEST_TYPE_MAP import Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
- setup.py: add analysis deps (pandas, matplotlib, seaborn) to [dev] extra so pylint can resolve all imports during linting - pull_labs_poller.py: suppress unused-import on intentional boto3 availability check - setup_validate.py: remove redundant json.JSONDecodeError from except clauses (already covered by parent ValueError) - test_pull_labs_poller.py: disable protected-access check (tests intentionally exercise private methods) - test_role_manager.py: disable protected-access check - test_kcidb_submit.py: suppress unused-argument on mock callbacks that must match urlopen signature Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
Add test_nested_virtualization.py covering _supports_nested_virtualization() in VMLauncher. Tests verify that C8i, M8i, R8i, C7i, M7i, R7i, X8i, I7i families (and flex/d variants) are correctly detected as supporting nested virtualization, while older families (c5a, c6g, t3, m5) are not. Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
Twine check failed because the content type was missing, defaulting to RST which cannot parse Markdown backticks. Set content type explicitly to text/markdown. Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
Run the upstream kvm-unit-tests suite against the guest KVM on a nested-virtualization-enabled instance, as a functional check of the kernel's virtualization stack. The test runs in two stages: run-01 installs the target kernel from the pipeline's shared kernel-rpms area and reboots into it (reusing the flow from unixbench-kernel-regression), and run-02 confirms the kernel switched, then builds QEMU and runs the suite against that kernel's KVM. A hardware gate skips unsupported configurations early, QEMU is built from source because the base image ships no system emulator, and a small stable subset runs by default. Adds the vm-tests/kvm-unit-tests test directory and a c8i.4xlarge VM entry to the example config. The test artifacts are pinned so a daily pipeline run reflects kernel changes only, not test-suite drift: kvm-unit-tests is checked out at a fixed upstream revision (KVMUT_REF, default the commit validated on c8i), and the QEMU source tarball is verified against a pinned sha256 before building. Setting KVMUT_REF empty tracks the upstream default branch instead. Where these artifacts should ultimately come from -- a pinned upstream revision as here, versus a mirrored or vendored copy under our control -- is worth discussing for the merged pipeline. Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
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
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.
This change adds KVM unit tests on top of pull request #26