From 5fb00e1df6b2b7d9db472d0c25765263ed1b839f Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Mon, 7 Jan 2013 13:05:52 -0500 Subject: tests: Add CPU switching tests This changeset adds a set of tests that stress the CPU switching code. It adds the following test configurations: * tsunami-switcheroo-full -- Alpha system (atomic, timing, O3) * realview-switcheroo-atomic -- ARM system (atomic<->atomic) * realview-switcheroo-timing -- ARM system (timing<->timing) * realview-switcheroo-o3 -- ARM system (O3<->O3) * realview-switcheroo-full -- ARM system (atomic, timing, O3) Reference data is provided for the 10.linux-boot test case. All of the tests trigger a CPU switch once per millisecond during the boot process. The in-order CPU model was not included in any of the tests as it does not support CPU handover. --- tests/run.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'tests/run.py') diff --git a/tests/run.py b/tests/run.py index e4474ac5c..ae00be286 100644 --- a/tests/run.py +++ b/tests/run.py @@ -93,6 +93,16 @@ def require_sim_object(name, fatal=False): else: skip_test(msg) +def run_test(root): + """Default run_test implementations. Scripts can override it.""" + + # instantiate configuration + m5.instantiate() + + # simulate until program terminates + exit_event = m5.simulate(maxtick) + print 'Exiting @ tick', m5.curTick(), 'because', exit_event.getCause() + # Since we're in batch mode, dont allow tcp socket connections m5.disableAllListeners() @@ -160,10 +170,4 @@ for sysattr in [ "system", "testsys", "drivesys" ]: if hasattr(root, sysattr): initCPUs(getattr(root, sysattr)) -# instantiate configuration -m5.instantiate() - -# simulate until program terminates -exit_event = m5.simulate(maxtick) - -print 'Exiting @ tick', m5.curTick(), 'because', exit_event.getCause() +run_test(root) -- cgit v1.2.3