Skip to content

Commit 7431683

Browse files
committed
refactor(tests): use uvm_plain instead of uvm_plain_6_1
As now uvm_plain is 6.1, drop uvm_plain_6_1 and use uvm_plain directly in those tests. No changes to the tests. Signed-off-by: Riccardo Mancini <mancio@amazon.com>
1 parent 3ef58a3 commit 7431683

File tree

4 files changed

+16
-26
lines changed

4 files changed

+16
-26
lines changed

tests/conftest.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -541,12 +541,6 @@ def uvm_plain(microvm_factory, guest_kernel_default, rootfs, pci_enabled):
541541
return microvm_factory.build(guest_kernel_default, rootfs, pci=pci_enabled)
542542

543543

544-
@pytest.fixture
545-
def uvm_plain_6_1(microvm_factory, guest_kernel_linux_6_1, rootfs, pci_enabled):
546-
"""Create a vanilla VM, non-parametrized"""
547-
return microvm_factory.build(guest_kernel_linux_6_1, rootfs, pci=pci_enabled)
548-
549-
550544
@pytest.fixture
551545
def uvm_plain_acpi(microvm_factory, guest_kernel_acpi, rootfs, pci_enabled):
552546
"""Create a vanilla VM, non-parametrized"""

tests/integration_tests/functional/test_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,11 +984,11 @@ def test_api_entropy(uvm_plain):
984984
test_microvm.api.entropy.put()
985985

986986

987-
def test_api_memory_hotplug(uvm_plain_6_1):
987+
def test_api_memory_hotplug(uvm_plain):
988988
"""
989989
Test hotplug related API commands.
990990
"""
991-
test_microvm = uvm_plain_6_1
991+
test_microvm = uvm_plain
992992
test_microvm.spawn()
993993
test_microvm.basic_config()
994994
test_microvm.add_net_iface()

tests/integration_tests/functional/test_snapshot_basic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,11 +480,11 @@ def test_snapshot_overwrite_self(uvm_plain_any, microvm_factory):
480480
# restored, with a new snapshot of this vm, does not break the VM
481481

482482

483-
def test_vmgenid(uvm_plain_6_1, microvm_factory, snapshot_type):
483+
def test_vmgenid(uvm_plain, microvm_factory, snapshot_type):
484484
"""
485485
Test VMGenID device upon snapshot resume
486486
"""
487-
base_vm = uvm_plain_6_1
487+
base_vm = uvm_plain
488488
base_vm.spawn()
489489
base_vm.basic_config(track_dirty_pages=True)
490490
base_vm.add_net_iface()

tests/integration_tests/performance/test_hotplug_memory.py

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ def uvm_resumed_memhp(
136136
"resumed-uffd-huge-pages",
137137
],
138138
)
139-
def uvm_any_memhp(request, uvm_plain_6_1, rootfs, microvm_factory):
139+
def uvm_any_memhp(request, uvm_plain, rootfs, microvm_factory):
140140
"""Fixture that yields a booted or resumed VM with memory hotplugging"""
141141
ctor, vhost_user, huge_pages, uffd_handler, snapshot_type = request.param
142142
yield ctor(
143-
uvm_plain_6_1,
143+
uvm_plain,
144144
rootfs,
145145
microvm_factory,
146146
vhost_user,
@@ -278,13 +278,11 @@ def test_virtio_mem_hotplug_hotunplug(uvm_any_memhp):
278278
],
279279
ids=["all_different", "slot_sized_block", "single_slot", "single_block"],
280280
)
281-
def test_virtio_mem_configs(uvm_plain_6_1, memhp_config):
281+
def test_virtio_mem_configs(uvm_plain, memhp_config):
282282
"""
283283
Check that the virtio mem device is working as expected for different configs
284284
"""
285-
uvm = uvm_booted_memhp(
286-
uvm_plain_6_1, None, None, False, memhp_config, None, None, None
287-
)
285+
uvm = uvm_booted_memhp(uvm_plain, None, None, False, memhp_config, None, None, None)
288286
if not uvm.pci_enabled:
289287
pytest.skip(
290288
"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):
309307
validate_metrics(uvm)
310308

311309

312-
def test_snapshot_restore_persistence(uvm_plain_6_1, microvm_factory, snapshot_type):
310+
def test_snapshot_restore_persistence(uvm_plain, microvm_factory, snapshot_type):
313311
"""
314312
Check that hptplugged memory is persisted across snapshot/restore.
315313
"""
316-
if not uvm_plain_6_1.pci_enabled:
314+
if not uvm_plain.pci_enabled:
317315
pytest.skip(
318316
"Skip tests on MMIO transport to save time as we don't expect any difference."
319317
)
320318
uvm = uvm_booted_memhp(
321-
uvm_plain_6_1,
319+
uvm_plain,
322320
None,
323321
microvm_factory,
324322
False,
@@ -349,17 +347,17 @@ def test_snapshot_restore_persistence(uvm_plain_6_1, microvm_factory, snapshot_t
349347
validate_metrics(restored_vm)
350348

351349

352-
def test_snapshot_restore_incremental(uvm_plain_6_1, microvm_factory):
350+
def test_snapshot_restore_incremental(uvm_plain, microvm_factory):
353351
"""
354352
Check that hptplugged memory is persisted across snapshot/restore.
355353
"""
356-
if not uvm_plain_6_1.pci_enabled:
354+
if not uvm_plain.pci_enabled:
357355
pytest.skip(
358356
"Skip tests on MMIO transport to save time as we don't expect any difference."
359357
)
360358

361359
uvm = uvm_booted_memhp(
362-
uvm_plain_6_1, None, microvm_factory, False, DEFAULT_CONFIG, None, None, None
360+
uvm_plain, None, microvm_factory, False, DEFAULT_CONFIG, None, None, None
363361
)
364362

365363
snapshot = uvm.snapshot_full()
@@ -457,10 +455,8 @@ def test_memory_hotplug_latency(
457455
"slot_size_mib": 128,
458456
"block_size_mib": 2,
459457
}
460-
uvm_plain_6_1 = microvm_factory.build(guest_kernel_linux_6_1, rootfs, pci=True)
461-
uvm = uvm_booted_memhp(
462-
uvm_plain_6_1, None, None, False, config, None, None, None
463-
)
458+
uvm_plain = microvm_factory.build(guest_kernel_linux_6_1, rootfs, pci=True)
459+
uvm = uvm_booted_memhp(uvm_plain, None, None, False, config, None, None, None)
464460

465461
if i == 0:
466462
metrics.set_dimensions(

0 commit comments

Comments
 (0)