Skip to content

Commit 65ea7a1

Browse files
committed
Increase buildkite timeout to 3 hours
Increase buildkite timeout so that tests can run fully Signed-off-by: James Curtis <[email protected]>
1 parent dbe1fc9 commit 65ea7a1

File tree

4 files changed

+53
-21
lines changed

4 files changed

+53
-21
lines changed

.buildkite/pipeline_pr.py

+4-11
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,8 @@
44

55
"""Generate Buildkite pipelines dynamically"""
66

7-
from common import (
8-
COMMON_PARSER,
9-
devtool_test,
10-
get_changed_files,
11-
group,
12-
overlay_dict,
13-
pipeline_to_json,
14-
run_all_tests,
15-
)
7+
from common import (COMMON_PARSER, devtool_test, get_changed_files, group,
8+
overlay_dict, pipeline_to_json, run_all_tests)
169

1710
# Buildkite default job priority is 0. Setting this to 1 prioritizes PRs over
1811
# scheduled jobs and other batch jobs.
@@ -32,7 +25,7 @@
3225
"platforms": args.platforms,
3326
# buildkite step parameters
3427
"priority": DEFAULT_PRIORITY,
35-
"timeout_in_minutes": 45,
28+
"timeout_in_minutes": 1000,
3629
"artifacts": ["./test_results/**/*"],
3730
}
3831
defaults = overlay_dict(defaults, args.step_param)
@@ -83,7 +76,7 @@
8376
"⏱ Performance",
8477
devtool_test(
8578
devtool_opts="--performance -c 1-10 -m 0",
86-
pytest_opts="../tests/integration_tests/performance/",
79+
pytest_opts="../tests/integration_tests/performance/test_vcpu_hotplug.py",
8780
binary_dir=args.binary_dir,
8881
),
8982
**defaults_for_performance,

tests/host_tools/hotplug.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ while :; do
66
[[ -d /sys/devices/system/cpu/cpu$1 ]] && break
77
done
88

9-
echo 1 | tee /sys/devices/system/cpu/cpu*/online
9+
for i in $(seq 1 $1); do
10+
echo 1 >/sys/devices/system/cpu/cpu$i/online
11+
done
12+
13+
while :; do
14+
[[ $(nproc) == $((1 + $1)) ]] && break
15+
done
1016

1117
/home/hotplug_time.o

tests/host_tools/hotplug_udev.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
while :; do
6-
[[ $(nproc) == $1 ]] && break
6+
[[ $(nproc) == $((1 + $1)) ]] && break
77
done
88

99
/home/hotplug_time.o

tests/integration_tests/performance/test_vcpu_hotplug.py

+41-8
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
import pandas
1212
import pytest
1313

14-
from framework.utils_iperf import IPerf3Test, emit_iperf3_metrics
14+
from framework.utils_cpuid import check_guest_cpuid_output
15+
16+
# from framework.utils_iperf import IPerf3Test, emit_iperf3_metrics
1517
from host_tools.cargo_build import gcc_compile
16-
from host_tools.fcmetrics import FCMetricsMonitor
18+
19+
# from host_tools.fcmetrics import FCMetricsMonitor
1720

1821

1922
@pytest.mark.skipif(
@@ -28,7 +31,7 @@ def test_custom_udev_rule_latency(
2831
"""Test the latency for hotplugging and booting CPUs in the guest"""
2932
gcc_compile(Path("./host_tools/hotplug_time.c"), Path("host_tools/hotplug_time.o"))
3033
data = []
31-
for i in range(50):
34+
for _ in range(20):
3235
uvm_hotplug = microvm_factory.build(guest_kernel_linux_acpi_only, rootfs_rw)
3336
uvm_hotplug.jailer.extra_args.update({"boot-timer": None, "no-seccomp": None})
3437
uvm_hotplug.help.enable_console()
@@ -51,7 +54,7 @@ def test_custom_udev_rule_latency(
5154
)
5255

5356
uvm_hotplug.api.hotplug.put(Vcpu={"add": vcpu_count})
54-
time.sleep(2)
57+
time.sleep(5)
5558

5659
# Extract API call duration
5760
api_duration = (
@@ -73,10 +76,24 @@ def test_custom_udev_rule_latency(
7376
/ 1000
7477
)
7578
except IndexError:
76-
timestamp = None
79+
uvm_hotplug.kill()
80+
data.append({"vcpus": vcpu_count, "api": api_duration, "onlining": None})
81+
continue
7782

7883
data.append({"vcpus": vcpu_count, "api": api_duration, "onlining": timestamp})
7984

85+
check_guest_cpuid_output(
86+
uvm_hotplug,
87+
"lscpu",
88+
None,
89+
":",
90+
{
91+
"CPU(s)": str(1 + vcpu_count),
92+
"On-line CPU(s) list": f"0-{vcpu_count}",
93+
},
94+
)
95+
uvm_hotplug.kill()
96+
8097
output_file = results_dir / f"hotplug-{vcpu_count}.csv"
8198

8299
csv_data = pandas.DataFrame.from_dict(data).to_csv(
@@ -99,7 +116,7 @@ def test_manual_latency(
99116
"""Test the latency for hotplugging and booting CPUs in the guest"""
100117
gcc_compile(Path("./host_tools/hotplug_time.c"), Path("host_tools/hotplug_time.o"))
101118
data = []
102-
for _ in range(50):
119+
for _ in range(20):
103120
uvm_hotplug = microvm_factory.build(guest_kernel_linux_acpi_only, rootfs_rw)
104121
uvm_hotplug.jailer.extra_args.update({"boot-timer": None, "no-seccomp": None})
105122
uvm_hotplug.help.enable_console()
@@ -113,11 +130,13 @@ def test_manual_latency(
113130
uvm_hotplug.ssh.scp_put(
114131
Path("./host_tools/hotplug_time.o"), Path("/home/hotplug_time.o")
115132
)
116-
uvm_hotplug.ssh.run("tmux new-session -d /bin/bash /home/hotplug.sh")
133+
uvm_hotplug.ssh.run(
134+
f"tmux new-session -d /bin/bash /home/hotplug.sh {vcpu_count}"
135+
)
117136

118137
uvm_hotplug.api.hotplug.put(Vcpu={"add": vcpu_count})
119138

120-
time.sleep(1.5)
139+
time.sleep(5)
121140
# Extract API call duration
122141
api_duration = (
123142
float(
@@ -139,10 +158,24 @@ def test_manual_latency(
139158
)
140159
except IndexError:
141160
data.append({"vcpus": vcpu_count, "api": api_duration, "onlining": None})
161+
uvm_hotplug.kill()
142162
continue
143163

144164
data.append({"vcpus": vcpu_count, "api": api_duration, "onlining": timestamp})
145165

166+
check_guest_cpuid_output(
167+
uvm_hotplug,
168+
"lscpu",
169+
None,
170+
":",
171+
{
172+
"CPU(s)": str(1 + vcpu_count),
173+
"On-line CPU(s) list": f"0-{vcpu_count}",
174+
},
175+
)
176+
177+
uvm_hotplug.kill()
178+
146179
output_file = results_dir / f"hotplug-{vcpu_count}.csv"
147180

148181
csv_data = pandas.DataFrame.from_dict(data).to_csv(

0 commit comments

Comments
 (0)