Skip to content

Commit 1e7700c

Browse files
committed
test: Skip frequency check if host not report it
Intel Sapphire Rapids does not report its frequency in the model name string on host ("Intel(R) Xeon(R) Platinum 8488C"). Signed-off-by: Takahiro Itazuri <[email protected]>
1 parent a31a4ad commit 1e7700c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/integration_tests/functional/test_cpu_features_x86_64.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ def test_brand_string(uvm_plain_any):
150150
151151
* For Intel CPUs, the guest brand string should be:
152152
Intel(R) Xeon(R) Processor @ {host frequency}
153+
or
154+
Intel(R) Xeon(R) Processor
153155
where {host frequency} is the frequency reported by the host CPUID
154156
(e.g. 4.01GHz)
155157
* For AMD CPUs, the guest brand string should be:
@@ -184,7 +186,9 @@ def test_brand_string(uvm_plain_any):
184186
cif = open("/proc/cpuinfo", "r", encoding="utf-8")
185187
cpu_info = cif.read()
186188
mo = re.search("model name.*:.* ([0-9]*.[0-9]*[G|M|T]Hz)", cpu_info)
187-
assert mo
189+
# Skip if host frequency is not reported
190+
if mo is None:
191+
return
188192
host_frequency = mo.group(1)
189193

190194
# Assert the model name matches "Intel(R) Xeon(R) Processor @ "

0 commit comments

Comments
 (0)