Skip to content

Commit 40732d1

Browse files
ilstamzulinx86
authored andcommitted
tests: integration: Make test_diff_snapshot_overlay test multi-slot VMs
The test_diff_snapshot_overlay() case tests differential snapshots on VMs that have a single memory slot since basic_config() uses a 256MiB memory size by default. Parametrize the test so that it's repeated for both 256MiB and 4096MiB sizes. On x86 this will create 2 memory slots and hence test a different scenario. Suggested-by: Riccardo Mancini <mancio@amazon.com> Signed-off-by: Ilias Stamatis <ilstam@amazon.com>
1 parent b1622ac commit 40732d1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/integration_tests/functional/test_snapshot_basic.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,14 +410,15 @@ def test_create_large_diff_snapshot(uvm_plain):
410410
# process would have been taken down.
411411

412412

413-
def test_diff_snapshot_overlay(uvm_plain_any, microvm_factory):
413+
@pytest.mark.parametrize("mem_size", [256, 4096])
414+
def test_diff_snapshot_overlay(uvm_plain_any, microvm_factory, mem_size):
414415
"""
415416
Tests that if we take a diff snapshot and direct firecracker to write it on
416417
top of an existing snapshot file, it will successfully merge them.
417418
"""
418419
basevm = uvm_plain_any
419420
basevm.spawn()
420-
basevm.basic_config(track_dirty_pages=True)
421+
basevm.basic_config(track_dirty_pages=True, mem_size_mib=mem_size)
421422
basevm.add_net_iface()
422423
basevm.start()
423424

0 commit comments

Comments
 (0)