Skip to content

Commit 07ae7f6

Browse files
committed
feat(cpu-features-aarch64): add after snaphot test
Add verification of cpu features after loading a snapshot of a vm with cpu-template applied. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
1 parent b4bcc8c commit 07ae7f6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/integration_tests/functional/test_cpu_features_aarch64.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ def test_cpu_features_with_static_template(
108108
guest_kv = re.search(r"vmlinux-(\d+\.\d+)", guest_kernel.name).group(1)
109109
_check_cpu_features_arm(vm, guest_kv, "v1n1")
110110

111+
# Check that cpu features are still correct
112+
# after snap/restore cycle.
113+
snapshot = vm.snapshot_full()
114+
restored_vm = microvm_factory.build()
115+
restored_vm.spawn()
116+
restored_vm.restore_from_snapshot(snapshot, resume=True)
117+
_check_cpu_features_arm(restored_vm, guest_kv, "v1n1")
118+
111119

112120
@pytest.mark.skipif(
113121
PLATFORM != "aarch64",
@@ -128,3 +136,11 @@ def test_cpu_features_with_custom_template(
128136
vm.start()
129137
guest_kv = re.search(r"vmlinux-(\d+\.\d+)", guest_kernel.name).group(1)
130138
_check_cpu_features_arm(vm, guest_kv, custom_cpu_template["name"])
139+
140+
# Check that cpu features are still correct
141+
# after snap/restore cycle.
142+
snapshot = vm.snapshot_full()
143+
restored_vm = microvm_factory.build()
144+
restored_vm.spawn()
145+
restored_vm.restore_from_snapshot(snapshot, resume=True)
146+
_check_cpu_features_arm(restored_vm, guest_kv, custom_cpu_template["name"])

0 commit comments

Comments
 (0)