Skip to content

Commit 619f798

Browse files
committed
test: do not fail the boottime_initrd test
We will keep the metric, but not fail the test. Signed-off-by: Pablo Barbáchano <[email protected]>
1 parent ef43d4f commit 619f798

File tree

1 file changed

+4
-37
lines changed

1 file changed

+4
-37
lines changed

tests/integration_tests/performance/test_boottime.py

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,17 @@
22
# SPDX-License-Identifier: Apache-2.0
33
"""Tests that ensure the boot time to init process is within spec."""
44

5-
import platform
65
import re
76
import time
87

98
from framework.properties import global_props
10-
from framework.utils_cpuid import get_cpu_model_name, get_instance_type
119

1210
# The maximum acceptable boot time in us.
1311
MAX_BOOT_TIME_US = 150000
14-
# NOTE: For aarch64 most of the boot time is spent by the kernel to unpack the
15-
# initramfs in RAM. This time is influenced by the size and the compression
16-
# method of the used initrd image. The boot time for Skylake is greater than
17-
# other x86-64 CPUs, since L1TF mitigation (unconditional L1D cache flush) is
18-
# enabled.
19-
INITRD_BOOT_TIME_US = {
20-
"x86_64": {
21-
"m5d.metal": {
22-
"Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz": 230000,
23-
"Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz": 180000,
24-
},
25-
"m6i.metal": {
26-
"Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz": 180000,
27-
},
28-
"m6a.metal": {
29-
"AMD EPYC 7R13 48-Core Processor": 180000,
30-
},
31-
},
32-
"aarch64": {
33-
"m6g.metal": {
34-
"ARM_NEOVERSE_N1": 205000,
35-
},
36-
"c7g.metal": {
37-
"ARM_NEOVERSE_V1": 205000,
38-
},
39-
},
40-
}
12+
4113
# Regex for obtaining boot time from some string.
4214
TIMESTAMP_LOG_REGEX = r"Guest-boot-time\s+\=\s+(\d+)\s+us"
4315

44-
4516
DIMENSIONS = {
4617
"instance": global_props.instance,
4718
"cpu_model": global_props.cpu_model,
@@ -100,12 +71,9 @@ def test_initrd_boottime(test_microvm_with_initrd, record_property, metrics):
10071
vm = test_microvm_with_initrd
10172
vm.jailer.extra_args.update({"boot-timer": None})
10273
_tap = _configure_and_run_vm(vm, initrd=True)
103-
max_time_us = INITRD_BOOT_TIME_US[platform.machine()][get_instance_type()][
104-
get_cpu_model_name()
105-
]
106-
boottime_us = _test_microvm_boottime(vm, max_time_us=max_time_us)
74+
boottime_us = _test_microvm_boottime(vm, max_time_us=None)
10775
print(f"Boot time with initrd is: {boottime_us} us")
108-
record_property("boottime_initrd", f"{boottime_us} us < {max_time_us} us")
76+
record_property("boottime_initrd", f"{boottime_us} us")
10977
metrics.set_dimensions(DIMENSIONS)
11078
metrics.put_metric("boot_time_with_initrd", boottime_us, unit="Microseconds")
11179

@@ -123,8 +91,7 @@ def _test_microvm_boottime(vm, max_time_us=MAX_BOOT_TIME_US):
12391
boot_time_us = int(timestamps[0])
12492

12593
assert boot_time_us > 0
126-
# temporarily disable this test in 6.1
127-
if global_props.host_linux_version != "6.1":
94+
if max_time_us is not None:
12895
assert (
12996
boot_time_us < max_time_us
13097
), f"boot time {boot_time_us} cannot be greater than: {max_time_us} us"

0 commit comments

Comments
 (0)