tests: Use MatchFileRegex vierifier for realview regressions
We have seen cases where the primary CPU was not able to bootstrap the secondary CPUs in multicore tests (dual). The Linux booting process "quietly" gives up (no panic) and it completes the booting without bringing up the seondary CPU(s). This makes the dual test useless as it is supposed to test SMP setups. By adding a MatchFileRegex verifier, we make sure we are able to catch these cases, correctly raising an error if not all CPUs are available. We do this by inspecting the kernel log for the following print: "CPU1: Booted secondary processor" There are probably more resilient alternatives to a regex based check, but those require a less minimal rootfs (the current m5_exit.squashfs.arm64 FS has a single /sbin/init binary executing a simple m5 exit operation) Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Change-Id: I37e0882967443449d5fedfe3963bd25528a030f8 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44446 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
@@ -41,6 +41,8 @@ from os.path import join as joinpath
|
||||
|
||||
from testlib import *
|
||||
|
||||
import re
|
||||
|
||||
arm_fs_kvm_tests = [
|
||||
'realview64-kvm',
|
||||
'realview64-kvm-dual',
|
||||
@@ -102,6 +104,15 @@ arm_fs_binaries = DownloadedArchive(url, path, tarball)
|
||||
def support_kvm():
|
||||
return os.access("/dev/kvm", os.R_OK | os.W_OK)
|
||||
|
||||
def verifier_list(name):
|
||||
verifiers=[]
|
||||
if "dual" in name:
|
||||
verifiers.append(verifier.MatchFileRegex(
|
||||
re.compile(r'.*CPU1: Booted secondary processor.*'),
|
||||
["system.terminal"]))
|
||||
|
||||
return verifiers
|
||||
|
||||
for name in arm_fs_quick_tests:
|
||||
if name in arm_fs_kvm_tests:
|
||||
# The current host might not be supporting KVM
|
||||
@@ -121,7 +132,7 @@ for name in arm_fs_quick_tests:
|
||||
]
|
||||
gem5_verify_config(
|
||||
name=name,
|
||||
verifiers=(), # Add basic stat verifiers
|
||||
verifiers=verifier_list(name), # Add basic stat verifiers
|
||||
config=joinpath(filepath, 'run.py'),
|
||||
config_args=args,
|
||||
valid_isas=(constants.arm_tag,),
|
||||
@@ -138,7 +149,7 @@ for name in arm_fs_long_tests:
|
||||
]
|
||||
gem5_verify_config(
|
||||
name=name,
|
||||
verifiers=(), # TODO: Add basic stat verifiers
|
||||
verifiers=verifier_list(name), # TODO: Add basic stat verifiers
|
||||
config=joinpath(filepath, 'run.py'),
|
||||
config_args=args,
|
||||
valid_isas=(constants.arm_tag,),
|
||||
|
||||
Reference in New Issue
Block a user