Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/functional/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/functional/test_snapshot_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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},
)
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/functional/test_uffd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
28 changes: 12 additions & 16 deletions tests/integration_tests/performance/test_hotplug_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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."
Expand All @@ -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,
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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(
Expand Down