Giacomo Travaglini has uploaded this change for review. ( 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 <giacomo.travagl...@arm.com>
Change-Id: I37e0882967443449d5fedfe3963bd25528a030f8
---
M tests/gem5/fs/linux/arm/test.py
1 file changed, 13 insertions(+), 2 deletions(-)



diff --git a/tests/gem5/fs/linux/arm/test.py b/tests/gem5/fs/linux/arm/test.py
index 4167426..de35b9c 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,),

--
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: 1
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to