Skip to content

Commit adb3732

Browse files
authored
Merge branch 'main' into aarch64-max-dev
2 parents d72e1cf + 68ed647 commit adb3732

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

tests/framework/microvm.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1206,13 +1206,20 @@ def build_n_from_snapshot(
12061206
uffd_handler_name=None,
12071207
incremental=False,
12081208
use_snapshot_editor=True,
1209+
no_netns_reuse=False,
12091210
):
12101211
"""A generator of `n` microvms restored, either all restored from the same given snapshot
12111212
(incremental=False), or created by taking successive snapshots of restored VMs
12121213
"""
12131214
last_snapshot = None
12141215
for _ in range(nr_vms):
1215-
microvm = self.build()
1216+
microvm = self.build(
1217+
**(
1218+
{"netns": net_tools.NetNs(str(uuid.uuid4()))}
1219+
if no_netns_reuse
1220+
else {}
1221+
)
1222+
)
12161223
microvm.spawn()
12171224

12181225
snapshot_copy = microvm.restore_from_snapshot(

tests/integration_tests/performance/test_jailer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def test_jailer_startup(
5252
{
5353
"instance": global_props.instance,
5454
"cpu_model": global_props.cpu_model,
55+
"host_kernel": f"linux-{global_props.host_linux_version}",
5556
"performance_test": "test_jailer_startup",
5657
"parallel": str(parallel),
5758
"mounts": str(mounts),

tests/integration_tests/performance/test_snapshot.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ def test_restore_latency(
122122

123123
snapshot = vm.snapshot_full()
124124
vm.kill()
125-
for microvm in microvm_factory.build_n_from_snapshot(snapshot, ITERATIONS):
125+
for microvm in microvm_factory.build_n_from_snapshot(
126+
snapshot, ITERATIONS, no_netns_reuse=True
127+
):
126128
value = 0
127129
# Parse all metric data points in search of load_snapshot time.
128130
microvm.flush_metrics()

0 commit comments

Comments
 (0)