Skip to content

Commit 4b03f0d

Browse files
pb8owearyzen
authored andcommitted
ci: replace c7g with m7g
And try to handle both generically by the CPU in tests, rather than depending on a particular instance type. Signed-off-by: Pablo Barbáchano <pablob@amazon.com>
1 parent bb982cc commit 4b03f0d

File tree

5 files changed

+24
-33
lines changed

5 files changed

+24
-33
lines changed

.buildkite/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"m6i.metal",
1616
"m6a.metal",
1717
"m6g.metal",
18-
"c7g.metal",
18+
"m7g.metal",
1919
]
2020

2121
DEFAULT_PLATFORMS = [

.buildkite/pipeline_pr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
defaults = overlay_dict(defaults, args.step_param)
3939

4040
defaults_once_per_architecture = defaults.copy()
41-
defaults_once_per_architecture["instances"] = ["m6i.metal", "c7g.metal"]
41+
defaults_once_per_architecture["instances"] = ["m6i.metal", "m7g.metal"]
4242
defaults_once_per_architecture["platforms"] = [("al2", "linux_5.10")]
4343

4444

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ We test all combinations of:
136136
| m6i.metal | al2 linux_5.10 | | linux_5.10 |
137137
| m6a.metal | al2023 linux_6.1 | | |
138138
| m6g.metal | | | |
139-
| c7g.metal | | | |
139+
| m7g.metal | | | |
140140

141141
## Known issues and Limitations
142142

tests/integration_tests/functional/test_rng.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
from framework.properties import global_props
88
from framework.utils import check_entropy
99

10-
if global_props.instance == "c7g.metal" and global_props.host_linux_version == "4.14":
11-
pytestmark = pytest.mark.skip(reason="c7g requires no SVE 5.10 kernel")
10+
if (
11+
global_props.cpu_model == "ARM_NEOVERSE_V1"
12+
and global_props.host_linux_version == "4.14"
13+
):
14+
# Graviton3 instances in 4.14 require a non-SVE kernel to boot
15+
pytestmark = pytest.mark.skip(reason="[cm]7g requires non-SVE 5.10 kernel")
1216

1317

1418
@pytest.fixture(params=[None])

tests/integration_tests/security/test_vulnerabilities.py

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929
VULN_DIR = "/sys/devices/system/cpu/vulnerabilities"
3030

3131

32+
skip_if_g3_on_linux_4_14 = pytest.mark.skipif(
33+
global_props.cpu_model == "ARM_NEOVERSE_V1"
34+
and global_props.host_linux_version == "4.14",
35+
# Graviton3 instances in 4.14 require a non-SVE kernel to boot
36+
reason="[cm]7g 4.14 requires modifications to the 5.10 guest kernel to boot successfully.",
37+
)
38+
39+
3240
def configure_microvm(
3341
factory,
3442
kernel,
@@ -211,10 +219,7 @@ def check_vulnerabilities_on_guest(status):
211219
assert report_guest_vulnerabilities == known_guest_vulnerabilities
212220

213221

214-
@pytest.mark.skipif(
215-
global_props.instance == "c7g.metal" and global_props.host_linux_version == "4.14",
216-
reason="c7g host 4.14 requires modifications to the 5.10 guest kernel to boot successfully.",
217-
)
222+
@skip_if_g3_on_linux_4_14
218223
def test_spectre_meltdown_checker_on_host(spectre_meltdown_checker):
219224
"""
220225
Test with the spectre / meltdown checker on host.
@@ -249,10 +254,7 @@ def test_spectre_meltdown_checker_on_host(spectre_meltdown_checker):
249254
assert report == expected, f"Unexpected vulnerabilities: {report} vs {expected}"
250255

251256

252-
@pytest.mark.skipif(
253-
global_props.instance == "c7g.metal" and global_props.host_linux_version == "4.14",
254-
reason="c7g host 4.14 requires modifications to the 5.10 guest kernel to boot successfully.",
255-
)
257+
@skip_if_g3_on_linux_4_14
256258
def test_spectre_meltdown_checker_on_guest(spectre_meltdown_checker, build_microvm):
257259
"""
258260
Test with the spectre / meltdown checker on guest.
@@ -270,10 +272,7 @@ def test_spectre_meltdown_checker_on_guest(spectre_meltdown_checker, build_micro
270272
check_vulnerabilities_on_guest(status)
271273

272274

273-
@pytest.mark.skipif(
274-
global_props.instance == "c7g.metal" and global_props.host_linux_version == "4.14",
275-
reason="c7g host 4.14 requires modifications to the 5.10 guest kernel to boot successfully.",
276-
)
275+
@skip_if_g3_on_linux_4_14
277276
def test_spectre_meltdown_checker_on_restored_guest(
278277
spectre_meltdown_checker, build_microvm, microvm_factory
279278
):
@@ -294,10 +293,7 @@ def test_spectre_meltdown_checker_on_restored_guest(
294293
check_vulnerabilities_on_guest(status)
295294

296295

297-
@pytest.mark.skipif(
298-
global_props.instance == "c7g.metal" and global_props.host_linux_version == "4.14",
299-
reason="c7g host 4.14 requires modifications to the 5.10 guest kernel to boot successfully.",
300-
)
296+
@skip_if_g3_on_linux_4_14
301297
def test_spectre_meltdown_checker_on_guest_with_template(
302298
spectre_meltdown_checker, build_microvm_with_template
303299
):
@@ -314,10 +310,7 @@ def test_spectre_meltdown_checker_on_guest_with_template(
314310
)
315311

316312

317-
@pytest.mark.skipif(
318-
global_props.instance == "c7g.metal" and global_props.host_linux_version == "4.14",
319-
reason="c7g host 4.14 requires modifications to the 5.10 guest kernel to boot successfully.",
320-
)
313+
@skip_if_g3_on_linux_4_14
321314
def test_spectre_meltdown_checker_on_guest_with_custom_template(
322315
spectre_meltdown_checker, build_microvm_with_custom_template
323316
):
@@ -333,10 +326,7 @@ def test_spectre_meltdown_checker_on_guest_with_custom_template(
333326
)
334327

335328

336-
@pytest.mark.skipif(
337-
global_props.instance == "c7g.metal" and global_props.host_linux_version == "4.14",
338-
reason="c7g host 4.14 requires modifications to the 5.10 guest kernel to boot successfully.",
339-
)
329+
@skip_if_g3_on_linux_4_14
340330
def test_spectre_meltdown_checker_on_restored_guest_with_template(
341331
spectre_meltdown_checker, build_microvm_with_template, microvm_factory
342332
):
@@ -355,10 +345,7 @@ def test_spectre_meltdown_checker_on_restored_guest_with_template(
355345
)
356346

357347

358-
@pytest.mark.skipif(
359-
global_props.instance == "c7g.metal" and global_props.host_linux_version == "4.14",
360-
reason="c7g host 4.14 requires modifications to the 5.10 guest kernel to boot successfully.",
361-
)
348+
@skip_if_g3_on_linux_4_14
362349
def test_spectre_meltdown_checker_on_restored_guest_with_custom_template(
363350
spectre_meltdown_checker,
364351
build_microvm_with_custom_template,

0 commit comments

Comments
 (0)