Skip to content

Commit da969fb

Browse files
committed
tests: skip x86_64 tests at module level
All tests in the file are x86_64 specific, so do the skip at the top-level, once. Signed-off-by: Pablo Barbáchano <[email protected]>
1 parent 033402e commit da969fb

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

tests/integration_tests/functional/test_cpu_features_x86_64.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
)
3131
DATA_FILES = Path("./data/msr")
3232

33+
pytestmark = pytest.mark.skipif(
34+
global_props.cpu_architecture != "x86_64", reason="Only run in x86_64"
35+
)
36+
3337

3438
def read_msr_csv(fd):
3539
"""Read a CSV of MSRs"""
@@ -105,7 +109,6 @@ def skip_test_based_on_artifacts(snapshot_artifacts_dir):
105109
pytest.skip(re.sub(" +", " ", reason))
106110

107111

108-
@pytest.mark.skipif(PLATFORM != "x86_64", reason="CPUID is only supported on x86_64.")
109112
@pytest.mark.parametrize(
110113
"num_vcpus",
111114
[1, 2, 16],
@@ -126,7 +129,6 @@ def test_cpuid(uvm_plain_any, num_vcpus, htt):
126129
_check_cpuid_x86(vm, num_vcpus, "true" if num_vcpus > 1 else "false")
127130

128131

129-
@pytest.mark.skipif(PLATFORM != "x86_64", reason="CPUID is only supported on x86_64.")
130132
@pytest.mark.skipif(
131133
cpuid_utils.get_cpu_vendor() != cpuid_utils.CpuVendor.AMD,
132134
reason="L3 cache info is only present in 0x80000006 for AMD",
@@ -143,9 +145,6 @@ def test_extended_cache_features(uvm_plain_any):
143145
_check_extended_cache_features(vm)
144146

145147

146-
@pytest.mark.skipif(
147-
PLATFORM != "x86_64", reason="The CPU brand string is masked only on x86_64."
148-
)
149148
def test_brand_string(uvm_plain_any):
150149
"""
151150
Ensure good formatting for the guest brand string.
@@ -204,10 +203,6 @@ def test_brand_string(uvm_plain_any):
204203
assert False
205204

206205

207-
@pytest.mark.skipif(
208-
PLATFORM != "x86_64",
209-
reason="This is x86_64 specific test.",
210-
)
211206
def test_host_vs_guest_cpu_features_x86_64(uvm_nano):
212207
"""Check CPU features host vs guest"""
213208

@@ -929,9 +924,6 @@ def test_cpu_cpuid_restore(microvm_factory, guest_kernel, msr_cpu_template):
929924
)
930925

931926

932-
@pytest.mark.skipif(
933-
PLATFORM != "x86_64", reason="CPU features are masked only on x86_64."
934-
)
935927
@pytest.mark.parametrize("cpu_template", ["T2", "T2S", "C3"])
936928
def test_cpu_template(uvm_plain_any, cpu_template, microvm_factory):
937929
"""
@@ -1249,7 +1241,6 @@ def check_enabled_features(test_microvm, cpu_template):
12491241
)
12501242

12511243

1252-
@pytest.mark.skipif(PLATFORM != "x86_64", reason="This test is specific to x86_64.")
12531244
def test_c3_on_skylake_show_warning(uvm_plain, cpu_template):
12541245
"""
12551246
This test verifies that the warning message about MMIO stale data mitigation

0 commit comments

Comments
 (0)