diff --git a/tests/conftest.py b/tests/conftest.py index f542ac2e2de..b77ca055ce6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -510,6 +510,7 @@ def guest_kernel_fxt(request, record_property): guest_kernel_fxt, params=kernel_params("vmlinux-6.1*"), ) +guest_kernel_default = guest_kernel_linux_6_1 @pytest.fixture @@ -535,15 +536,9 @@ def rootfs_rw(): @pytest.fixture -def uvm_plain(microvm_factory, guest_kernel_linux_5_10, rootfs, pci_enabled): +def uvm_plain(microvm_factory, guest_kernel_default, rootfs, pci_enabled): """Create a vanilla VM, non-parametrized""" - return microvm_factory.build(guest_kernel_linux_5_10, rootfs, pci=pci_enabled) - - -@pytest.fixture -def uvm_plain_6_1(microvm_factory, guest_kernel_linux_6_1, rootfs, pci_enabled): - """Create a vanilla VM, non-parametrized""" - return microvm_factory.build(guest_kernel_linux_6_1, rootfs, pci=pci_enabled) + return microvm_factory.build(guest_kernel_default, rootfs, pci=pci_enabled) @pytest.fixture @@ -553,9 +548,9 @@ def uvm_plain_acpi(microvm_factory, guest_kernel_acpi, rootfs, pci_enabled): @pytest.fixture -def uvm_plain_rw(microvm_factory, guest_kernel_linux_5_10, rootfs_rw): +def uvm_plain_rw(microvm_factory, guest_kernel_default, rootfs_rw): """Create a vanilla VM, non-parametrized""" - return microvm_factory.build(guest_kernel_linux_5_10, rootfs_rw) + return microvm_factory.build(guest_kernel_default, rootfs_rw) @pytest.fixture diff --git a/tests/integration_tests/functional/test_api.py b/tests/integration_tests/functional/test_api.py index aa3c8b050d1..5b5fc262888 100644 --- a/tests/integration_tests/functional/test_api.py +++ b/tests/integration_tests/functional/test_api.py @@ -984,11 +984,11 @@ def test_api_entropy(uvm_plain): test_microvm.api.entropy.put() -def test_api_memory_hotplug(uvm_plain_6_1): +def test_api_memory_hotplug(uvm_plain): """ Test hotplug related API commands. """ - test_microvm = uvm_plain_6_1 + test_microvm = uvm_plain test_microvm.spawn() test_microvm.basic_config() test_microvm.add_net_iface() diff --git a/tests/integration_tests/functional/test_snapshot_basic.py b/tests/integration_tests/functional/test_snapshot_basic.py index 0c00033a627..7873a2ccc34 100644 --- a/tests/integration_tests/functional/test_snapshot_basic.py +++ b/tests/integration_tests/functional/test_snapshot_basic.py @@ -480,11 +480,11 @@ def test_snapshot_overwrite_self(uvm_plain_any, microvm_factory): # restored, with a new snapshot of this vm, does not break the VM -def test_vmgenid(uvm_plain_6_1, microvm_factory, snapshot_type): +def test_vmgenid(uvm_plain, microvm_factory, snapshot_type): """ Test VMGenID device upon snapshot resume """ - base_vm = uvm_plain_6_1 + base_vm = uvm_plain base_vm.spawn() base_vm.basic_config(track_dirty_pages=True) base_vm.add_net_iface() diff --git a/tests/integration_tests/functional/test_snapshot_not_losing_dirty_pages.py b/tests/integration_tests/functional/test_snapshot_not_losing_dirty_pages.py index 8e7bad0f0d5..0159e8efc85 100644 --- a/tests/integration_tests/functional/test_snapshot_not_losing_dirty_pages.py +++ b/tests/integration_tests/functional/test_snapshot_not_losing_dirty_pages.py @@ -25,13 +25,13 @@ def mount_tmpfs_small(worker_id): def test_diff_snapshot_works_after_error( - microvm_factory, guest_kernel_linux_5_10, rootfs, mount_tmpfs_small + microvm_factory, guest_kernel_default, rootfs, mount_tmpfs_small ): """ Test that if a partial snapshot errors it will work after and not lose data """ uvm = microvm_factory.build( - guest_kernel_linux_5_10, + guest_kernel_default, rootfs, jailer_kwargs={"chroot_base": mount_tmpfs_small}, ) diff --git a/tests/integration_tests/functional/test_uffd.py b/tests/integration_tests/functional/test_uffd.py index a67a24a4f6b..38615da73f0 100644 --- a/tests/integration_tests/functional/test_uffd.py +++ b/tests/integration_tests/functional/test_uffd.py @@ -12,10 +12,10 @@ @pytest.fixture(scope="function", name="snapshot") -def snapshot_fxt(microvm_factory, guest_kernel_linux_5_10, rootfs): +def snapshot_fxt(microvm_factory, guest_kernel_default, rootfs): """Create a snapshot of a microVM.""" - basevm = microvm_factory.build(guest_kernel_linux_5_10, rootfs) + basevm = microvm_factory.build(guest_kernel_default, rootfs) basevm.spawn() basevm.basic_config(vcpu_count=2, mem_size_mib=256) basevm.add_net_iface() diff --git a/tests/integration_tests/performance/test_hotplug_memory.py b/tests/integration_tests/performance/test_hotplug_memory.py index 584609c3ae1..afc62f92098 100644 --- a/tests/integration_tests/performance/test_hotplug_memory.py +++ b/tests/integration_tests/performance/test_hotplug_memory.py @@ -136,11 +136,11 @@ def uvm_resumed_memhp( "resumed-uffd-huge-pages", ], ) -def uvm_any_memhp(request, uvm_plain_6_1, rootfs, microvm_factory): +def uvm_any_memhp(request, uvm_plain, rootfs, microvm_factory): """Fixture that yields a booted or resumed VM with memory hotplugging""" ctor, vhost_user, huge_pages, uffd_handler, snapshot_type = request.param yield ctor( - uvm_plain_6_1, + uvm_plain, rootfs, microvm_factory, vhost_user, @@ -278,13 +278,11 @@ def test_virtio_mem_hotplug_hotunplug(uvm_any_memhp): ], ids=["all_different", "slot_sized_block", "single_slot", "single_block"], ) -def test_virtio_mem_configs(uvm_plain_6_1, memhp_config): +def test_virtio_mem_configs(uvm_plain, memhp_config): """ Check that the virtio mem device is working as expected for different configs """ - uvm = uvm_booted_memhp( - uvm_plain_6_1, None, None, False, memhp_config, None, None, None - ) + uvm = uvm_booted_memhp(uvm_plain, None, None, False, memhp_config, None, None, None) if not uvm.pci_enabled: pytest.skip( "Skip tests on MMIO transport to save time as we don't expect any difference." @@ -309,16 +307,16 @@ def test_virtio_mem_configs(uvm_plain_6_1, memhp_config): validate_metrics(uvm) -def test_snapshot_restore_persistence(uvm_plain_6_1, microvm_factory, snapshot_type): +def test_snapshot_restore_persistence(uvm_plain, microvm_factory, snapshot_type): """ Check that hptplugged memory is persisted across snapshot/restore. """ - if not uvm_plain_6_1.pci_enabled: + if not uvm_plain.pci_enabled: pytest.skip( "Skip tests on MMIO transport to save time as we don't expect any difference." ) uvm = uvm_booted_memhp( - uvm_plain_6_1, + uvm_plain, None, microvm_factory, False, @@ -349,17 +347,17 @@ def test_snapshot_restore_persistence(uvm_plain_6_1, microvm_factory, snapshot_t validate_metrics(restored_vm) -def test_snapshot_restore_incremental(uvm_plain_6_1, microvm_factory): +def test_snapshot_restore_incremental(uvm_plain, microvm_factory): """ Check that hptplugged memory is persisted across snapshot/restore. """ - if not uvm_plain_6_1.pci_enabled: + if not uvm_plain.pci_enabled: pytest.skip( "Skip tests on MMIO transport to save time as we don't expect any difference." ) uvm = uvm_booted_memhp( - uvm_plain_6_1, None, microvm_factory, False, DEFAULT_CONFIG, None, None, None + uvm_plain, None, microvm_factory, False, DEFAULT_CONFIG, None, None, None ) snapshot = uvm.snapshot_full() @@ -457,10 +455,8 @@ def test_memory_hotplug_latency( "slot_size_mib": 128, "block_size_mib": 2, } - uvm_plain_6_1 = microvm_factory.build(guest_kernel_linux_6_1, rootfs, pci=True) - uvm = uvm_booted_memhp( - uvm_plain_6_1, None, None, False, config, None, None, None - ) + uvm_plain = microvm_factory.build(guest_kernel_linux_6_1, rootfs, pci=True) + uvm = uvm_booted_memhp(uvm_plain, None, None, False, config, None, None, None) if i == 0: metrics.set_dimensions(