Bobby R. Bruce has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/25063 )
Change subject: tests: Updated 'hello_se' to include other CPU types
......................................................................
tests: Updated 'hello_se' to include other CPU types
Some tests are ignored due to bugs in the test executables. This has
been logged in the Jira issue here:
https://gem5.atlassian.net/browse/GEM5-356
Jira: https://gem5.atlassian.net/browse/GEM5-109
Change-Id: Idd2db04175333d1c24604e736df7833c1e441480
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25063
Tested-by: kokoro <[email protected]>
Reviewed-by: Bobby R. Bruce <[email protected]>
Maintainer: Bobby R. Bruce <[email protected]>
---
M tests/gem5/.testignore
M tests/gem5/hello_se/test_hello_se.py
2 files changed, 132 insertions(+), 49 deletions(-)
Approvals:
Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/tests/gem5/.testignore b/tests/gem5/.testignore
index 3a15144..6d52d3f 100644
--- a/tests/gem5/.testignore
+++ b/tests/gem5/.testignore
@@ -1,39 +1,3 @@
-test-hello-RISCV-x86_64-opt
-test-hello-RISCV-x86_64-debug
-test-hello-RISCV-x86_64-fast
-test-hello-RISCV-i386-opt
-test-hello-RISCV-i386-debug
-test-hello-RISCV-i386-fast
-test-hello-RISCV-aarch64-opt
-test-hello-RISCV-aarch64-debug
-test-hello-RISCV-aarch64-fast
-test-hello-SPARC-x86_64-opt
-test-hello-SPARC-x86_64-debug
-test-hello-SPARC-x86_64-fast
-test-hello-SPARC-i386-opt
-test-hello-SPARC-i386-debug
-test-hello-SPARC-i386-fast
-test-hello-SPARC-aarch64-opt
-test-hello-SPARC-aarch64-debug
-test-hello-SPARC-aarch64-fast
-test-hello-MIPS-x86_64-opt
-test-hello-MIPS-x86_64-debug
-test-hello-MIPS-x86_64-fast
-test-hello-MIPS-i386-opt
-test-hello-MIPS-i386-debug
-test-hello-MIPS-i386-fast
-test-hello-MIPS-aarch64-opt
-test-hello-MIPS-aarch64-debug
-test-hello-MIPS-aarch64-fast
-test-hello-ALPHA-x86_64-opt
-test-hello-ALPHA-x86_64-debug
-test-hello-ALPHA-x86_64-fast
-test-hello-ALPHA-i386-opt
-test-hello-ALPHA-i386-debug
-test-hello-ALPHA-i386-fast
-test-hello-ALPHA-aarch64-opt
-test-hello-ALPHA-aarch64-debug
-test-hello-ALPHA-aarch64-fast
test-insttest-rv64a-linux-MinorCPU-RISCV-x86_64-opt
test-insttest-rv64c-linux-MinorCPU-RISCV-x86_64-opt
test-insttest-rv64d-linux-MinorCPU-RISCV-x86_64-opt
@@ -133,3 +97,93 @@
test-insttest-rv64i-linux-DerivO3CPU-RISCV-i386-fast
test-insttest-linux-AtomicSimpleCPU-SPARC-i386-fast
test-insttest-linux-TimingSimpleCPU-SPARC-i386-fast
+test-hello-linux-MinorCPU-RISCV-x86_64-debug
+test-hello-linux-MinorCPU-ALPHA-x86_64-debug
+test-hello-linux-TimingSimpleCPU-SPARC-x86_64-debug
+test-hello-linux-AtomicSimpleCPU-SPARC-x86_64-debug
+test-hello-linux-TimingSimpleCPU-MIPS-x86_64-debug
+test-hello-linux-AtomicSimpleCPU-MIPS-x86_64-debug
+test-hello-linux-DerivO3CPU-MIPS-x86_64-debug
+test-hello-linux-TimingSimpleCPU-ALPHA-x86_64-debug
+test-hello-linux-AtomicSimpleCPU-ALPHA-x86_64-debug
+test-hello-linux-DerivO3CPU-ALPHA-x86_64-debug
+test-hello-linux-MinorCPU-RISCV-x86_64-fast
+test-hello-linux-MinorCPU-ALPHA-x86_64-fast
+test-hello-linux-TimingSimpleCPU-SPARC-x86_64-fast
+test-hello-linux-AtomicSimpleCPU-SPARC-x86_64-fast
+test-hello-linux-TimingSimpleCPU-MIPS-x86_64-fast
+test-hello-linux-AtomicSimpleCPU-MIPS-x86_64-fast
+test-hello-linux-DerivO3CPU-MIPS-x86_64-fast
+test-hello-linux-TimingSimpleCPU-ALPHA-x86_64-fast
+test-hello-linux-AtomicSimpleCPU-ALPHA-x86_64-fast
+test-hello-linux-DerivO3CPU-ALPHA-x86_64-fast
+test-hello-linux-MinorCPU-RISCV-x86_64-opt
+test-hello-linux-MinorCPU-ALPHA-x86_64-opt
+test-hello-linux-TimingSimpleCPU-SPARC-x86_64-opt
+test-hello-linux-AtomicSimpleCPU-SPARC-x86_64-opt
+test-hello-linux-TimingSimpleCPU-MIPS-x86_64-opt
+test-hello-linux-AtomicSimpleCPU-MIPS-x86_64-opt
+test-hello-linux-DerivO3CPU-MIPS-x86_64-opt
+test-hello-linux-TimingSimpleCPU-ALPHA-x86_64-opt
+test-hello-linux-AtomicSimpleCPU-ALPHA-x86_64-opt
+test-hello-linux-DerivO3CPU-ALPHA-x86_64-opt
+test-hello-linux-MinorCPU-RISCV-arch64-debug
+test-hello-linux-MinorCPU-ALPHA-arch64-debug
+test-hello-linux-TimingSimpleCPU-SPARC-arch64-debug
+test-hello-linux-AtomicSimpleCPU-SPARC-arch64-debug
+test-hello-linux-TimingSimpleCPU-MIPS-arch64-debug
+test-hello-linux-AtomicSimpleCPU-MIPS-arch64-debug
+test-hello-linux-DerivO3CPU-MIPS-arch64-debug
+test-hello-linux-TimingSimpleCPU-ALPHA-arch64-debug
+test-hello-linux-AtomicSimpleCPU-ALPHA-arch64-debug
+test-hello-linux-DerivO3CPU-ALPHA-arch64-debug
+test-hello-linux-MinorCPU-RISCV-arch64-fast
+test-hello-linux-MinorCPU-ALPHA-arch64-fast
+test-hello-linux-TimingSimpleCPU-SPARC-arch64-fast
+test-hello-linux-AtomicSimpleCPU-SPARC-arch64-fast
+test-hello-linux-TimingSimpleCPU-MIPS-arch64-fast
+test-hello-linux-AtomicSimpleCPU-MIPS-arch64-fast
+test-hello-linux-DerivO3CPU-MIPS-arch64-fast
+test-hello-linux-TimingSimpleCPU-ALPHA-arch64-fast
+test-hello-linux-AtomicSimpleCPU-ALPHA-arch64-fast
+test-hello-linux-DerivO3CPU-ALPHA-arch64-fast
+test-hello-linux-MinorCPU-RISCV-arch64-opt
+test-hello-linux-MinorCPU-ALPHA-arch64-opt
+test-hello-linux-TimingSimpleCPU-SPARC-arch64-opt
+test-hello-linux-AtomicSimpleCPU-SPARC-arch64-opt
+test-hello-linux-TimingSimpleCPU-MIPS-arch64-opt
+test-hello-linux-AtomicSimpleCPU-MIPS-arch64-opt
+test-hello-linux-DerivO3CPU-MIPS-arch64-opt
+test-hello-linux-TimingSimpleCPU-ALPHA-arch64-opt
+test-hello-linux-AtomicSimpleCPU-ALPHA-arch64-opt
+test-hello-linux-DerivO3CPU-ALPHA-arch64-opt
+test-hello-linux-MinorCPU-RISCV-i386-debug
+test-hello-linux-MinorCPU-ALPHA-i386-debug
+test-hello-linux-TimingSimpleCPU-SPARC-i386-debug
+test-hello-linux-AtomicSimpleCPU-SPARC-i386-debug
+test-hello-linux-TimingSimpleCPU-MIPS-i386-debug
+test-hello-linux-AtomicSimpleCPU-MIPS-i386-debug
+test-hello-linux-DerivO3CPU-MIPS-i386-debug
+test-hello-linux-TimingSimpleCPU-ALPHA-i386-debug
+test-hello-linux-AtomicSimpleCPU-ALPHA-i386-debug
+test-hello-linux-DerivO3CPU-ALPHA-i386-debug
+test-hello-linux-MinorCPU-RISCV-i386-fast
+test-hello-linux-MinorCPU-ALPHA-i386-fast
+test-hello-linux-TimingSimpleCPU-SPARC-i386-fast
+test-hello-linux-AtomicSimpleCPU-SPARC-i386-fast
+test-hello-linux-TimingSimpleCPU-MIPS-i386-fast
+test-hello-linux-AtomicSimpleCPU-MIPS-i386-fast
+test-hello-linux-DerivO3CPU-MIPS-i386-fast
+test-hello-linux-TimingSimpleCPU-ALPHA-i386-fast
+test-hello-linux-AtomicSimpleCPU-ALPHA-i386-fast
+test-hello-linux-DerivO3CPU-ALPHA-i386-fast
+test-hello-linux-MinorCPU-RISCV-i386-opt
+test-hello-linux-MinorCPU-ALPHA-i386-opt
+test-hello-linux-TimingSimpleCPU-SPARC-i386-opt
+test-hello-linux-AtomicSimpleCPU-SPARC-i386-opt
+test-hello-linux-TimingSimpleCPU-MIPS-i386-opt
+test-hello-linux-AtomicSimpleCPU-MIPS-i386-opt
+test-hello-linux-DerivO3CPU-MIPS-i386-opt
+test-hello-linux-TimingSimpleCPU-ALPHA-i386-opt
+test-hello-linux-AtomicSimpleCPU-ALPHA-i386-opt
+test-hello-linux-DerivO3CPU-ALPHA-i386-opt
diff --git a/tests/gem5/hello_se/test_hello_se.py
b/tests/gem5/hello_se/test_hello_se.py
index 07a0835..75043b9 100644
--- a/tests/gem5/hello_se/test_hello_se.py
+++ b/tests/gem5/hello_se/test_hello_se.py
@@ -1,3 +1,6 @@
+# Copyright (c) 2020 The Regents of the University of California
+# All Rights Reserved.
+#
# Copyright (c) 2020 ARM Limited
# All rights reserved
#
@@ -54,6 +57,24 @@
'x86': ('hello64-dynamic',)
}
+cpu_types = {
+ 'x86': ('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU'),
+ 'arm' : ('TimingSimpleCPU', 'AtomicSimpleCPU','DerivO3CPU'),
+ 'alpha':
('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU', 'MinorCPU'),
+ 'mips' : ('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU'),
+ 'riscv' :
('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU', 'MinorCPU'),
+ 'sparc' : ('TimingSimpleCPU', 'AtomicSimpleCPU')
+}
+
+supported_os = {
+ 'x86': ('linux',),
+ 'arm' : ('linux',),
+ 'alpha' : ('linux',),
+ 'mips' : ('linux',),
+ 'riscv' : ('linux',),
+ 'sparc' : ('linux',)
+}
+
if config.bin_path:
base_path = config.bin_path
else:
@@ -61,32 +82,40 @@
'bin')
urlbase = 'http://dist.gem5.org/dist/current/test-progs/hello/bin/'
+
ref_path = joinpath(getcwd(), 'ref')
verifiers = (
- verifier.MatchStdoutNoPerf(joinpath(ref_path, 'simout')),
+ verifier.MatchStdoutNoPerf(joinpath(ref_path, 'simout')),
)
-def verify_config(isa, binary, hosts):
- url = urlbase + isa + '/linux/' + binary
- path = joinpath(base_path, isa, 'linux')
+def verify_config(isa, binary, operating_s, cpu, hosts):
+ url = urlbase + isa + '/' + operating_s + '/' + binary
+ path = joinpath(base_path, isa, operating_s)
hello_program = DownloadedProgram(url, path, binary)
gem5_verify_config(
- name='test-'+binary,
- fixtures=(hello_program,),
- verifiers=verifiers,
- config=joinpath(config.base_dir, 'configs', 'example','se.py'),
- config_args=['--cmd', joinpath(path, binary)],
- valid_isas=(isa.upper(),),
- valid_hosts=hosts,
+ name='test-' + binary + '-' + operating_s + "-" + cpu,
+ fixtures=(hello_program,),
+ verifiers=verifiers,
+ config=joinpath(config.base_dir, 'configs', 'example','se.py'),
+ config_args=['--cmd', joinpath(path, binary), '--cpu-type', cpu,
+ '--caches'],
+ valid_isas=(isa.upper(),),
+ valid_hosts=hosts,
)
# Run statically linked hello worlds
for isa in static_progs:
for binary in static_progs[isa]:
- verify_config(isa, binary, constants.supported_hosts)
+ for operating_s in supported_os[isa]:
+ for cpu in cpu_types[isa]:
+ verify_config(isa, binary, operating_s, cpu,
+ constants.supported_hosts)
# Run dynamically linked hello worlds
for isa in dynamic_progs:
for binary in dynamic_progs[isa]:
- verify_config(isa, binary, constants.target_host[isa.upper()])
+ for operating_s in supported_os[isa]:
+ for cpu in cpu_types[isa]:
+ verify_config(isa, binary, operating_s, cpu,
+ constants.target_host[isa.upper()])
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/25063
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: Idd2db04175333d1c24604e736df7833c1e441480
Gerrit-Change-Number: 25063
Gerrit-PatchSet: 12
Gerrit-Owner: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Gabe Black <[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]
http://m5sim.org/mailman/listinfo/gem5-dev