feat(vmm-tests): add per-test Linux kernel version selection#3586
feat(vmm-tests): add per-test Linux kernel version selection#3586moor-coding wants to merge 1 commit into
Conversation
Add infrastructure for individual VMM tests to specify which Linux kernel version to use via the test macro syntax: #[openvmm_test(linux_direct_x64)] // default kernel #[openvmm_test(linux_direct_x64(kernel_6_1))] // explicit 6.1 #[openvmm_test(linux_direct_x64(kernel_6_18))]// explicit 6.18 Changes across all layers: - petri_artifacts_vmm_test: Add LinuxDirectKernelVersion enum and version-specific artifact IDs (LINUX_DIRECT_TEST_KERNEL_X64_6_1, _6_18, etc.) with IsLoadable impls - petri_artifact_resolver_openvmm_known_paths: Map versioned artifact IDs to versioned paths (e.g. x64/6.1/vmlinux, x64/6.18/vmlinux) - petri (Firmware): Add linux_direct_with_version() and linux_direct_bzimage_with_version() constructors that select version-specific kernel artifacts - vmm_test_macros: Parse optional (kernel_6_1)/(kernel_6_18) after linux_direct_x64, linux_direct_aarch64, linux_direct_bzimage_x64, and openhcl_linux_direct_x64 tokens. Generate appropriate Firmware constructor calls in codegen. - flowey (init_vmm_tests_env): Download all supported kernel versions and place them at both legacy paths and versioned subdirectories - flowey (resolve_openvmm_test_linux_kernel): Add Linux6_18 variant to LinuxTestKernelVersion with ALL constant for iteration Existing tests without a kernel version specifier continue to use the default (unversioned) artifact IDs, preserving full backward compatibility. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
This may be a maintainer question, but do we really want this functionality? Do we foresee a need to support more than one test kernel? I'd rather just do something like mark the one test unstable in order to update the test kernel to 6.18 everywhere, and then re stable it when a kernel fix is available. |
This change is coming from a discussion with @benhillis, I'm not sure of what the long-term outlook for the testing approach is at this moment so would love to get input from him |
I wanted to discuss this yesterday in the maintainers sync but we didn't really have quorum. I don't think it would be a bad idea to have a number of different guest OS kernels, we do in Azure right? |
|
I mean we do, but we probably get better coverage of those by including full linux distros, since distros may include their own patches or build configs different from ours. Linux direct testing is meant for simple quick validation. |
Add infrastructure for tests to specify which Linux kernel version to use, enabling per-test kernel version pinning.
Changes
LinuxDirectKernelVersionenum topetri_artifacts_vmm_testwithV6_1andV6_18variantsLINUX_DIRECT_TEST_KERNEL_X64_6_1, etc.)linux_direct_with_version()andlinux_direct_bzimage_with_version()methods to petri VM builder#[vmm_test]macro to accept parenthesized kernel version syntax:linux_direct_x64(kernel_6_1)Linux6_18variant toLinuxTestKernelVersionin flowey resolverMotivation
The upcoming openvmm-deps 0.3.0-33 release adds Linux 6.18 kernel support. Some tests (e.g.,
pcie_devices) cannot run on 6.18 due to a known kernel bug inmana_gd_probe. This PR adds the ability to pin individual tests to a specific kernel version, so the default can be upgraded to 6.18 while problematic tests remain on 6.1.A follow-up PR will flip the default kernel to 6.18 and pin
pcie_devicesto 6.1.Usage
Tests can now specify a kernel version in the
#[vmm_test]attribute:Unversioned
linux_direct_x64continues to use the default kernel version (currently 6.1).