Skip to content

Commit 475aa52

Browse files
Alexandru-Cezar Sardandianpopa
authored andcommitted
tests/snapshots: remove test_restore_no_tsc
This test does 2 things: * Create a snapshot using Firecracker v0.24 * Restore that snapshot using the current build Firecracker v0.24 is used here because the snapshot file does not contain the TSC frequency. We do want to allow resume on the same processor type without any TSC adjustment but since Firecracker v0.24 is not supported anymore we need a different type of test to do this validation. Signed-off-by: Alexandru-Cezar Sardan <[email protected]>
1 parent 78b027d commit 475aa52

File tree

1 file changed

+0
-56
lines changed

1 file changed

+0
-56
lines changed

tests/integration_tests/functional/test_snapshot_advanced.py

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -126,62 +126,6 @@ def test_restore_old_version(bin_cloner_path):
126126
logger.debug(vm.log_data)
127127

128128

129-
@pytest.mark.skipif(
130-
platform.machine() != "x86_64",
131-
reason="TSC is x86_64 specific."
132-
)
133-
def test_restore_no_tsc(bin_cloner_path):
134-
"""
135-
Test scenario: restore a snapshot without TSC in current version.
136-
137-
@type: functional
138-
"""
139-
logger = logging.getLogger("no_tsc_snapshot")
140-
builder = MicrovmBuilder(bin_cloner_path)
141-
142-
artifacts = ArtifactCollection(_test_images_s3_bucket())
143-
# Fetch the v0.24.0 firecracker binary as that one does not have
144-
# the TSC frequency in the snapshot file.
145-
firecracker_artifacts = artifacts.firecrackers(
146-
keyword="v0.24.0"
147-
)
148-
firecracker = firecracker_artifacts[0]
149-
firecracker.download()
150-
jailer = firecracker.jailer()
151-
jailer.download()
152-
diff_snapshots = True
153-
154-
# Create a snapshot.
155-
snapshot = create_snapshot_helper(
156-
builder,
157-
logger,
158-
drives=scratch_drives,
159-
ifaces=net_ifaces,
160-
fc_binary=firecracker.local_path(),
161-
jailer_binary=jailer.local_path(),
162-
diff_snapshots=diff_snapshots,
163-
balloon=True
164-
)
165-
166-
# Resume microvm using current build of FC/Jailer.
167-
# The resume should be successful because the CPU model
168-
# in the snapshot state is the same as this host's.
169-
microvm, _ = builder.build_from_snapshot(
170-
snapshot,
171-
resume=True,
172-
diff_snapshots=False
173-
)
174-
validate_all_devices(
175-
logger,
176-
microvm,
177-
net_ifaces,
178-
scratch_drives,
179-
diff_snapshots
180-
)
181-
logger.debug("========== Firecracker restore snapshot log ==========")
182-
logger.debug(microvm.log_data)
183-
184-
185129
@pytest.mark.skipif(
186130
platform.machine() != "x86_64",
187131
reason="TSC is x86_64 specific."

0 commit comments

Comments
 (0)