Skip to content

Commit a1f6a6e

Browse files
committed
fix(test): remove tests that are not relevant any more
With the new snapshot format we break compatibility with all previous snapshot format versions. This commits removes all the tests that were checking functional correctness and performance of loading older snapshots in the current Firecracker binary. In the future, it might be that two Firecracker binaries support the same snapshot versions. When that happens we should thing of a proper way to test that this works, but the current tests are not fit for purpose. Signed-off-by: Babis Chalios <[email protected]>
1 parent 2fa7494 commit a1f6a6e

File tree

3 files changed

+0
-272
lines changed

3 files changed

+0
-272
lines changed

tests/integration_tests/functional/test_mmds.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import pytest
1111

1212
from framework.artifacts import working_version_as_artifact
13-
from framework.properties import global_props
1413
from framework.utils import (
1514
configure_mmds,
1615
generate_mmds_get_request,
@@ -612,39 +611,6 @@ def test_mmds_snapshot(uvm_nano, microvm_factory, version):
612611
)
613612

614613

615-
def test_mmds_older_snapshot(
616-
microvm_factory, guest_kernel, rootfs, firecracker_release
617-
):
618-
"""
619-
Test MMDS behavior restoring older snapshots in the current version.
620-
621-
Ensures that the MMDS version is persisted or initialised with the default
622-
if the FC version does not support this feature.
623-
"""
624-
625-
# due to bug fixed in commit 8dab78b
626-
firecracker_version = firecracker_release.version_tuple
627-
if global_props.instance == "m6a.metal" and firecracker_version < (1, 3, 3):
628-
pytest.skip("incompatible with AMD and Firecracker <1.3.3")
629-
630-
microvm = microvm_factory.build(
631-
guest_kernel,
632-
rootfs,
633-
fc_binary_path=firecracker_release.path,
634-
jailer_binary_path=firecracker_release.jailer,
635-
)
636-
microvm.spawn()
637-
microvm.basic_config()
638-
microvm.add_net_iface()
639-
640-
mmds_version = "V2"
641-
_validate_mmds_snapshot(
642-
microvm,
643-
microvm_factory,
644-
mmds_version,
645-
)
646-
647-
648614
def test_mmds_v2_negative(test_microvm_with_api):
649615
"""
650616
Test invalid MMDS GET/PUT requests when using V2.

tests/integration_tests/functional/test_snapshot_advanced.py

Lines changed: 0 additions & 156 deletions
This file was deleted.

tests/integration_tests/performance/test_snapshot_perf.py

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
# SPDX-License-Identifier: Apache-2.0
33
"""Basic tests scenarios for snapshot save/restore."""
44

5-
import pytest
6-
7-
from framework.properties import global_props
8-
95
# How many latencies do we sample per test.
106
SAMPLE_COUNT = 3
117
USEC_IN_MSEC = 1000
@@ -23,84 +19,6 @@ def snapshot_create_producer(vm):
2319
return value
2420

2521

26-
def snapshot_resume_producer(microvm_factory, snapshot):
27-
"""Produce results for snapshot resume tests."""
28-
29-
microvm = microvm_factory.build()
30-
microvm.spawn()
31-
microvm.restore_from_snapshot(snapshot, resume=True)
32-
33-
# Attempt to connect to resumed microvm.
34-
# Verify if guest can run commands.
35-
exit_code, _, _ = microvm.ssh.run("ls")
36-
assert exit_code == 0
37-
38-
value = 0
39-
# Parse all metric data points in search of load_snapshot time.
40-
metrics = microvm.get_all_metrics()
41-
for data_point in metrics:
42-
cur_value = data_point["latencies_us"]["load_snapshot"] / USEC_IN_MSEC
43-
if cur_value > 0:
44-
value = cur_value
45-
break
46-
47-
print("Latency {value} ms")
48-
return value
49-
50-
51-
def test_older_snapshot_resume_latency(
52-
microvm_factory,
53-
guest_kernel_linux_4_14,
54-
rootfs,
55-
firecracker_release,
56-
io_engine,
57-
metrics,
58-
):
59-
"""
60-
Test scenario: Older snapshot load performance measurement.
61-
62-
With each previous firecracker version, create a snapshot and try to
63-
restore in current version.
64-
"""
65-
66-
# due to bug fixed in commit 8dab78b
67-
firecracker_version = firecracker_release.version_tuple
68-
if global_props.instance == "m6a.metal" and firecracker_version < (1, 3, 3):
69-
pytest.skip("incompatible with AMD and Firecracker <1.3.3")
70-
71-
vm = microvm_factory.build(
72-
guest_kernel_linux_4_14,
73-
rootfs,
74-
monitor_memory=False,
75-
fc_binary_path=firecracker_release.path,
76-
jailer_binary_path=firecracker_release.jailer,
77-
)
78-
vm.spawn()
79-
vm.basic_config(vcpu_count=2, mem_size_mib=512)
80-
vm.add_net_iface()
81-
vm.start()
82-
# Check if guest works.
83-
exit_code, _, _ = vm.ssh.run("ls")
84-
assert exit_code == 0
85-
snapshot = vm.snapshot_full()
86-
87-
metrics.set_dimensions(
88-
{
89-
**vm.dimensions,
90-
"io_engine": io_engine,
91-
"performance_test": "test_older_snapshot_resume_latency",
92-
"firecracker_version": firecracker_release.name,
93-
}
94-
)
95-
96-
for _ in range(SAMPLE_COUNT):
97-
metrics.put_metric(
98-
"latency",
99-
snapshot_resume_producer(microvm_factory, snapshot),
100-
"Milliseconds",
101-
)
102-
103-
10422
def test_snapshot_create_latency(
10523
microvm_factory,
10624
guest_kernel_linux_4_14,

0 commit comments

Comments
 (0)