Giacomo Travaglini has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/44446 )
Change subject: tests: Use MatchFileRegex vierifier for realview regressions
......................................................................
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 <[email protected]>
Change-Id: I37e0882967443449d5fedfe3963bd25528a030f8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44446
Tested-by: kokoro <[email protected]>
Reviewed-by: Daniel Carvalho <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
---
M tests/gem5/fs/linux/arm/test.py
1 file changed, 13 insertions(+), 2 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
Daniel Carvalho: Looks good to me, approved
kokoro: Regressions pass
diff --git a/tests/gem5/fs/linux/arm/test.py
b/tests/gem5/fs/linux/arm/test.py
index be612361..bf9f517 100644
--- a/tests/gem5/fs/linux/arm/test.py
+++ b/tests/gem5/fs/linux/arm/test.py
@@ -41,6 +41,8 @@
from testlib import *
+import re
+
arm_fs_kvm_tests = [
'realview64-kvm',
'realview64-kvm-dual',
@@ -102,6 +104,15 @@
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 @@
]
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 @@
]
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,),
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/44446
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I37e0882967443449d5fedfe3963bd25528a030f8
Gerrit-Change-Number: 44446
Gerrit-PatchSet: 4
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s