Commit Graph

1321 Commits

Author SHA1 Message Date
Bobby R. Bruce
005049f548 stdlib,python: Allow setting of to tick exits via m5
This commit adds the following functions to the `m5` python module:

- setMaxTick(tick) -> None
- getMaxTick() -> int
- getTicksUntilMax() -> int
- scheduleTickExitFromCurrent(tick, exit_string) -> None
- scheduleTickExitAbsolute(tick, exit_string) -> None

Until this patch the only way to set an exit at a particular tick was
via `simulate.run` which would reschedule the maximum tick. This
functionality has been explicity exposed via the new `setMaxTick`
function. However, as this is only rescheduling the maximum tick, it
stops scheduling exits at multiple different ticks.

To get around this problem the `scheduleTickExit` functions have been
added. These allow a user to schedule multiple exit events. The
functions contain a `exit_string` parameter that provides the string
the simulator is to return when the specified tick is met. By default
this string is "Tick exit reached" which is used by the stdlib
Simulator module to declare a new `SCHEDULED_TICK` exit event (Note:
this has been deliberatly kept seperate from the `MAX_TICK` exit event.
This commit serves as an attempt to decouple these are two concepts).

Tests are provided in this patch to ensure these new functions work as
intended.

Additional notes:
- The `simulate` function has been fixed to match the documentation. If
  the `num_cycles` is -1 then the maximum ticks is set to MaxTicks.
  Otherwise the max ticks is set to `curTicks() + num_cycles`. The
  functionality of this function will remain unchanged to the end-user.
- Full integration into the Simulator module is not complete as of this
  patch. Users must us the m5 python module to set these exit events.

Change-Id: I6c92b31dd409dc866152224600ea8166cfcba38b
Issue-on: https://gem5.atlassian.net/browse/GEM5-1131
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66231
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66331
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-12-02 17:24:04 +00:00
Bobby R. Bruce
ee9e07474b tests: Delete build directory before running KVM in nightly
The nightly tests failed here:
https://jenkins.gem5.org/job/nightly/430/. What seems to have happened
is the ALL/gem5.opt us compiled within the Docker container but then,
for the KVM tests, there is an attempt to recompile on the host, which
causes compilation problems. The safest strategy here is delete the
build directory prior to running the KVM tests.

In latest versions of our test infrastructure, the KVM tests should be
run completely separately (i.e., in different Jenkin's jobs) to avoid
this.

Change-Id: Id7d18c0504dd324f7a0e5e9a7809463520969dda
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65911
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65977
2022-11-28 18:52:51 +00:00
Bobby R. Bruce
753470e8fa tests: Update riscvmatched tests to use ALL/gem5.opt
Where possible we are trying to use the ALL/gem5.opt compilation of
gem5. This change updates the riscvmatched tests to this.

Change-Id: I1c5f1d86cdf5cf29b8964f8a894a3476a7cb290a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65854
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65975
2022-11-28 18:52:51 +00:00
Bobby R. Bruce
793076f2bd configs,stdlib,tests: Update riscvmatched-fs.py to-init
The "test-gem5-library-example-riscvmatched-fs" test, which runs
"configs/example/gem5_library/riscvmatched-fs.py", was running the
script in full. This takes a very long time. Given we already have boot
tests for RISCV, it's better to just run this configuration to just the
end of the Linux boot (significantly faster than a full OS boot). This
patch adds this feature to the config script and modifies the test to
utilize it.

Change-Id: I1e37a26aab5e9a127ebd64590be79fbc16fe53aa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65853
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65974
2022-11-28 18:52:51 +00:00
Bobby R. Bruce
5204b58e19 stdlib: Rename JsonSerializable to SerializableStat
As this abstract class now allows the output of text stats, it's more
appropriate to rename it. It no longer handles processing just for JSON
output

Change-Id: Ia9a1e3ef4029de45a11ac261fb14c9bdfa412cdd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59273
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-11-03 22:32:36 +00:00
Bobby R. Bruce
2211fdb607 tests,stdlib: Add a test for JsonSerializable
Change-Id: I9e1fa6ee67f5d73d41fa9972bdb9a3da7dda8957
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58729
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-11-03 22:32:36 +00:00
Melissa Jost
23d405ea55 tests, resources: CVE-2007-4559 Patch
Hi, we are security researchers from the Advanced Research Center at Trellix.
We have began a campaign to patch a widespread bug named CVE-2007-4559.
CVE-2007-4559 is a 15 year old bug in the Python tarfile package. By using
extract() or extractall() on a tarfile object without sanitizing input,
a maliciously crafted .tar file could perform a directory path traversal
attack. We found at least one unsantized extractall() in your codebase
and are providing a patch for you via pull request. The patch essentially
checks to see if all tarfile members will be extracted safely and throws
an exception otherwise. We encourage you to use this patch or your own
solution to secure against CVE-2007-4559.

If you have further questions you may contact us through this
projects lead researcher Kasimir Schulz.

Change-Id: I891ac6652cfbd479aed51d64ef6d4e0fe740e06d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65271
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-11-03 22:17:50 +00:00
Bobby R. Bruce
19bad67a6e tests: Remove ARM compilation requirement for quick/Kokoro
The ARM Boot Tests required the compilation of ARM/gem5.opt to run a
quick test that the CHI protocol was functioning correctly with ARM and
the ArmBoard. This test has been removed and the test refactored
slightly to use the ALL/gem5.opt.

The CHI protocol is already tested nightly.

Change-Id: Ibe406348caefa2493860036eb89a20681478ea66
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65195
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-11-02 05:57:41 +00:00
Bobby R. Bruce
54322872dd tests: Remove unneeded build step from nightly.sh
The `main.py` script will build the ISAs required to run tests. Our
compiler tests (see "tests/compiler-tests.sh") are run nightly and
already test to ensure these ISAs are compiled correctly. Compiling
these ISAs as part of this script is therefore redundant. This patch
removes this step to save testing time.

Change-Id: I58636acfd5512886ac11ca84ee96cbdc9e344c68
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65175
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-11-02 05:57:41 +00:00
Bobby R. Bruce
3c171a1ae4 tests: Remove tests requiring comp of novel ISAs in long
The only tests requiring the the compilation of SPARC, MIPS, and POWER
for the long/nightly suite were
"tests/gem5/multi_isa/test_multi_isa.py" and
"gem5/stdlib/test_requires.py". As compilation of gem5 is quite costly,
it'd best we simply remove these tests. They are minor and not very
important.

Compilation of these ISAs will continue to be tested via the compilation
tests.

Change-Id: I98b33eec5d0adb144109d32851033380f1641ad4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65193
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-11-02 05:57:41 +00:00
Bobby R. Bruce
e07ca68ed7 tests: Remove long/nightly X86 Boot tests
The long/nightly tests are failing due to timeout (e.g.,:
https://jenkins.gem5.org/job/nightly/398/). We must therefore be more
careful about what we test on a nightly basis.

Each of these X86 boot tests takes an hour and, generally, are largely
the same (just with different CPU cores, cache hierarchy, and memory
system). Given this is largely redundant, some of these tests have been
remove dto save on testing time.

Change-Id: I761fca1aa5e111a03183f83d4e326aaea1bdbc3a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65192
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-11-02 05:57:41 +00:00
Bobby R. Bruce
4145d9fb91 tests: Remove long/nightly ARM Boot tests
The long/nightly tests are failing due to timeout (e.g.:
https://jenkins.gem5.org/job/nightly/398/). We must therefore be more
careful about what we test on a nightly basis.

Each of these ARM boot tests takes an hour and, generally, are largely
the same (just with different CPU cores, cache hierarchy, and memory
system). Given this is largely redundant, some of these tests have been
removed to save on testing time.

Change-Id: I8d80d3e0869aca67aa7279a164bdce85d20f3682
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65191
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-11-02 05:57:41 +00:00
Bobby R. Bruce
8ffecdd966 stdlib,configs,tests: Rename config to arm-ubuntu-run.py
The "config/example/gem5_library/arm-ubuntu-boot-exit.py" script is
renamed to "config/example/gem5_library/arm-ubuntu-run.py". This makes
it more consistent with similar scripts in the
"config/example/gem5_library" directory: "x86-ubuntu-run.py" and
"riscv-ubuntu-run.py".

Change-Id: I9d96fd68e122f2841573b1717b0969cd44972771
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65132
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-11-01 18:57:36 +00:00
Bobby R. Bruce
25d4fb2d91 stdlib: Move _connect_things to run as pre_instantiation
Through working with the gem5 stdlib there have been instances where
connecting the memory, processor, and cache hierarchy to the board (via
the AbstractBoard's `_connect_things` function) at the point of the
AbstractBoard's construction is problematic as the memory, processor,
and cache hierarchy may require information to connect correctly that is
only known to the AbstractBoard after construction. In particular this
can occur when a Workload contains information needed to configure
correctly.

To resolve this problem the `_connect_things` function has been moved to
run as a pre-initialization step. That is, run immediately before
`m5.instantiate`. This is done in the Simulator module.

This will break cases where a user utilizes the stdlib AbstractBoard but
does not use the stdlib Simulator module. As such, an Exception is
raised in these cases explaining the fix to the user. This is done via a
hack where the boards' `createCCObject` function (inheritted
from SimObject) is overriden with a check to ensure `_connect_things`
has been run. To fix the `_pre_instantiate` function must be executed
prior to `m5.instantiate` in the Python configuration script. Test and
config scripts in the gem5 repo have been updated accordingly.

Change-Id: Ibaef36eb7433ce104b861b1da80fc600f08f715a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65051
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-11-01 18:57:36 +00:00
Kaustav Goswami
75c1df0d06 stdlib,arch-arm: Add ruby cache support to the ArmBoard
This change adds ruby cache support to the ArmBoard. Previously
only classic caches were supported by the ArmBoard. The ArmBoard
was tested with CHI, MESI_Two_Level and MI_example caches from
the gem5's stdlib.

Change-Id: I480fe6ae13e3bd8438a425548ed113d443fcee40
Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64011
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-11-01 18:57:36 +00:00
Mahyar Samani
32e4ac65a8 tests: Adding trusted stats for stats tests.
This changes adds the trusted stats required for comparing the
output stats from each test.

Change-Id: Id85f84f3086481f5d4b8eb7ee36e7a6f862782cc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58569
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-10-25 01:08:11 +00:00
Mahyar Samani
a3d2f68120 tests: Adding tests for gem5stats.
This change adds the first of many tests for the gem5stats.
The current test only considers a setup consisiting of
traffic generator, cache and memory.

Change-Id: I3ebe16131aed5bf6dad68de673f9491f1bea1c78
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55743
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2022-10-25 01:08:11 +00:00
Bobby R. Bruce
c021bb6099 tests: Update presubmit.sh to use Clang-14
As of https://gem5-review.googlesource.com/c/public/gem5/+/64176 we now
support Clang-14. This patch therefore updates the Kokoro tests to
utilize this for the `ALL/gem5.fast` compilation. This should help catch
Clang compilation errors earlier.

Change-Id: I6b5bac47565823bbd413e006cfe577468b1bbb70
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64292
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-10-20 19:10:03 +00:00
Bobby R. Bruce
21cb85f201 tests: Updating the tests to use Ubuntu 22.04 docker image
As of https://gem5-review.googlesource.com/c/public/gem5/+/64177 we
support version 22.04. This patch therefore updates the testing
infrastructure (kokoro/quick, nightly/long, weekly/extra-long) to use
the Ubuntu 22.04 docker image.

The "jenkins/gem5art-tests.sh" test script has been updated to no longer
require the `pip upgrade`. This was needed for Ubuntu 20.04 as it
utilized an older version of pip which did not have all the dependencies
these tests requried. As of Ubuntu 20.04 this is no longer required.

Change-Id: Ia8f8b1b2c62ad5d5a8419cb31b6a1d2b6dff7ac9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64291
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-10-20 19:10:03 +00:00
Bobby R. Bruce
6840c5e7ea tests: Fix verifier '_iterable_regex' func for None regex
In the case where no regex was specified (i,e., `regex == None`), the
`_iterable_regex` function returned `None`. For the testlib to work this
function must return an iterable.

Without this patch it is not possible to compare two files without a
specifying a regex.

Change-Id: Ibc8a2f783c3b786dbdca6a4284850b594024f2f9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64851
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-10-20 00:45:45 +00:00
Jason Lowe-Power
b3372a7053 stdlib: Update TestBoard to work with Simulator
This change makes minor updates to the TestBoard so that it can work
nicely with the Simulator module.

This change also makes the cache hierarchy optional for the TestBoard.

Change-Id: If46d53779164e87b6fc06176355be6b4ae05aa99
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64017
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Mahyar Samani <msamani@ucdavis.edu>
2022-10-18 21:40:59 +00:00
Bobby R. Bruce
2472b27c8f tests: Move 'riscvmatched-fs.py' example test to weekly
As of https://gem5-review.googlesource.com/c/public/gem5/+/64131, the
"configs/example/gem5_library/riscvmatched-fs.py' test was added to the
long/nightly test suite. This test is very long and the Nightly tests
are now timing out: https://jenkins.gem5.org/job/nightly/385/.

To solve this problem this test is being moved to the weekly tests.

Change-Id: I7956797b6ce1a813e1fdbbd38e8be61962d345a2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64671
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-10-17 22:44:14 +00:00
Giacomo Travaglini
9bac517337 tests: Run ALL unit-tests with the nightly script
The NULL run is missing ISA specific unit-tests

Change-Id: Ia468d2da0141c4834e932b63980ebe230912bfe2
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64312
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-10-12 10:34:02 +00:00
Bobby R. Bruce
ee53d38bae tests: Add 'riscvmatched-fs.py' example to long/nightly tests
This patch adds "configs/example/gem5_library/riscvmatched-fs.py" as a
long/nightly test.

Change-Id: I2a31832d16a149e81e3a68f8a402d3dc86fb1924
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64131
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-10-11 22:56:17 +00:00
Bobby R. Bruce
0ac27fd0bc util-docker,tests: Update supported/test OS to Ubuntu 22.04
We add a Ubuntu 22.04 min- and all-dependency docker images. We also
update the compiler tests to compile with Ubuntu 22.04.

The Ubuntu 20.04 min-dependency image has been removed. It is no
longer required.

Change-Id: Iaf7f7e8598907beb16e154c971f327927f707cb9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64177
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2022-10-10 17:24:03 +00:00
Bobby R. Bruce
555ed60eaa util-docker,tests: Add Clang-14 compiler image and test
This increases gem5's supported compiler up to Clang Version 14.

Change-Id: Ia85e81f33367b7186dd54fc2aeb3541111ccdb57
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64176
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-10-10 17:24:03 +00:00
Bobby R. Bruce
57a5bebe80 util-docker,tests: Add Clang-13 compiler image and test
This increases gem5's supported compiler up to Clang Version 13.

Change-Id: I5a9b602b67626b195dcd8e297abbcfb70cf83cbe
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64175
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-10-10 17:24:03 +00:00
Bobby R. Bruce
be64af890a util-docker,tests: Add GCC-12 compiler image and test
This increases gem5's supported compiler up to GCC Version 12

Change-Id: Ifed5b8456bd1ab36a2fa58d8be7911acbef29bdd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64174
Reviewed-by: Kunal Pai <kunpai@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-10-10 17:24:03 +00:00
Bobby R. Bruce
e844f17045 tests: Exclude ARM KVM tests from nightly run
Our Jenkin's server is an X86 host and cannot run ARM KVM.

Change-Id: Id10988aefa2534e73407c6a241fb3d5c9d958b7c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64111
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-10-06 17:30:06 +00:00
Bobby R. Bruce
f59eb93660 tests: Add 'checkpoint-path' to simpoints stdlib example
The
'configs/example/gem5_library_checkpoints/simpoints-se-checkpoint.py'
example would dump the savepoint in the CWD. This is fine when running
as an example, but we also run this script as a test. In this case the
checkpoint litters the repository.

To fix this, an optional 'checkpoint-path' argument is added to this
example which specifies where the checkpoint is to be saved. In the
tests, the checkpoint is saved to 'tests/gem5/resources'. This is our
default location for resources needed/produced by tests and is ignored
by git.

Change-Id: I3dccc574b9e64d32386fd822ed7248ee365a0a08
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64092
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-10-04 21:31:51 +00:00
Bobby R. Bruce
64a087e5e8 tests: Add 'checkpoint-path' to checkpoint stdlib example
The
'configs/example/gem5_library_example_tests/test_gem5_library_examples.py'
example would dump the savepoint in the CWD. This is fine when running
as an example, but we also run this script as a test. In this case the
checkpoint litters the repository.

To fix this, an optional 'checkpoint-path' argument is added to this
example which specifies where the checkpoint is to be saved. In the
tests, the checkpoint is saved to 'tests/gem5/resources'. This is our
default location for resources needed/produced by tests and is ignored
by git.

Change-Id: Ib985433786c99c37794a1c67cc4337a5dfd0498d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64091
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-10-04 21:31:51 +00:00
Bobby R. Bruce
3e51091806 tests: Add Simpoints example scripts as tests
These both ensure these example scripts still work as intended and
provides tests for the stdlib Simpoint API.

Change-Id: I549c3d22458a5013a335857c83a4e78dc425e37d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63931
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-10-04 21:31:51 +00:00
Giacomo Travaglini
cc3c15f1e0 configs, tests: Use proper releases in KVM simulations
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Change-Id: I071f3d9c4eb5e4c7df3052bb8db93fece30cd069
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64073
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-10-04 09:45:20 +00:00
Jason Lowe-Power
e7a73c7b59 tests: Fix error in Arm test
I missed this one in the last changeset.

Change-Id: I71d7fa2ac4ff36d4aef5d950e6ed8973ffc32a4e
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63991
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Melissa Jost <melissakjost@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-09-30 14:39:39 +00:00
Jason Lowe-Power
c1de2b8762 tests: Move the arm+ruby tests to not use ALL
The main Ruby.py script does not support the ALL target (it still
depends on get_runtime_isa). So, instead of testing these with the all
target, move them to be tested with just Arm built.

Change-Id: I7942177fffd2bbfb0696b67c1e94e2ec30d8178b
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63852
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2022-09-27 20:46:55 +00:00
Jason Lowe-Power
a12ac1a877 tests: Fix errors in arm switcheroo
When switching to the all target, there is no longer a "DerivO3CPU" we
now need to drop the "Deriv"

Note that there are still some cases where it is valid to use "DerivO3"
where it is converted to drop the "Deriv" via a map.

Cleaning this up further is for future work.

Change-Id: Ide59eb3a5c7daf15c13afe395409f588562c1b54
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63851
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-09-26 22:43:03 +00:00
Kaustav Goswami
c3e25af907 arch-arm,tests: added arm-linux-boot tests for the ArmBoard
This change adds ARM boot tests for the ArmBoard. The tests are
similar to existing boot tests which supports both m5 exit
instructions and a max-tick input format.

Change-Id: I9cb78424cf236e9092b4d4d34b68b1589b50ef37
Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62194
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-09-23 17:16:01 +00:00
Bobby R. Bruce
d0cbb1c630 tests: Add test for riscvmatched-hello stdlib example
This test ensures the example script is still functioning and, by proxy,
does a simple test to ensure the riscvmatched board's SE workload
capabilities are still working.

Change-Id: I7c79856e84122c6737e1e9667b6e626b4622d04c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63591
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-09-23 16:19:09 +00:00
Bobby R. Bruce
a4757bef47 tests: Add 'requires' tests for ALL/gem5
Change-Id: I58012b092dc1ec027474e2e45ad3e9809b31578b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63433
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-09-22 18:19:56 +00:00
Bobby R. Bruce
b94a6a50a5 tests: Update presubmit.sh to compile ALL/gem5.fast
This part of the Kokoro presubmit tests was designed to ensure gem5
still compiled sucessfully with Clang and to the '.fast' variant. ARM
was chosen arbitarily. Now that ALL exists, it makes more sense to use
it for this test.

Change-Id: Ia3593f7dd506205da13802a69094f4dd7019ab90
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63371
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-09-22 18:19:56 +00:00
Bobby R. Bruce
3b0cb574f5 tests: Update tests to use ALL/gem5.opt compilation
Where possible the gem5 tests have been updated to use the
build/ALL/gem5.opt compilation.

If a quick test requied a specific a ISA/protocol compilation they
were moved to the long/nightly set. This means all the quick/kokoro
tests are run with the build/ALL/gem5.opt compilation.

The learning_gem5 tests have been updated to use ALL/gem5.opt.

The equivilant examples on the website have been updated via:
https://gem5-review.googlesource.com/c/public/gem5-website/+/63336

Change-Id: I533689ad6848233867bdba9e9a43bb5840ed65c7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63374
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-09-22 18:19:56 +00:00
Bobby R. Bruce
8c1c60d43f tests: Update RISCV asmtests to use 'simple_binary_run.py'
The tests have been modified to be functionally equivalent but utilize
the standard library via the 'simple_binary_run.py' script.

Change-Id: Ib8b7a442a478d0fb152339ff5ba039412d0fef48
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63373
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-09-15 19:06:45 +00:00
Bobby R. Bruce
bcb9181db3 tests: Remove 'test_build' from the testlib
These gem5 builds are compiled automatically if required by a test.
Additionally, they are redundant given the existance of the compiler
tests, run daily.

Change-Id: I71141f82a86538a77384e684b9d261794e103b99
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63334
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-09-15 19:06:45 +00:00
Bobby R. Bruce
cc3940b69e tests: Add 'ALL' build to the compiler tests
Change-Id: I7f31a23999173e7cd06f3ee87e5e4f0ae42c54ea
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63333
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-09-15 19:06:45 +00:00
Bobby R. Bruce
f9e1b308c1 tests: Enable build/ALL/gem5 supported-isas-check tests
These tests were disabled until the build/ALL/gem5 compilation was
complete. These test the `gem5.runtime.get_supported_isas` function.

Change-Id: Ieac5676e9fed121f3cfe35e38f9748431824cbc0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63332
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-09-15 19:06:45 +00:00
Bobby R. Bruce
17a46091fa tests: Remove '--ignore-style' from m5 weekly test build
The '--ignore-style' flag was added to the `scons build/x86/out/m5`
command in the weekly tests in this commit:
https://gem5-review.googlesource.com/c/public/gem5/+/63012

The m5 compilation does not attempt to run the style check hooks and, as
such, this command failed as the '--ignore-style' flag is not
recognized.

This caused the weekly tests to fail:
https://jenkins.gem5.org/job/weekly/76

This commit removes this flag.

Change-Id: Ic0320609ac5234be978743377f13dd1cf7f1e782
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63553
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-09-13 17:05:54 +00:00
Bobby R. Bruce
700f64c1c1 scons: Ensure style_hooks check exits if hook cannot install
If the pre-commit could not be installed the compilation would continue
as the exit code from running the pre-commit install script was not
read or processed. This commit adds a check. If the install is
unsuccessful the users is asked whether they want to continue the
compilation or not.

This check can be ignored with the '--ignore-style'. The tests have been
updated to include this flag in all cases we compile gem5 to ensure
tests remain automated and uninterrupted on Kokoro/Jenkins.

Change-Id: Iaf4db71300883b828b00d77784c9bb46b2698f89
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63012
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-09-08 18:31:08 +00:00
Bobby R. Bruce
bb60998aa9 configs,tests: Update tests/configs for RISCV boot workload
As of this commit:
https://gem5-review.googlesource.com/c/public/gem5-resources/+/62659
we have a RISCV Ubuntu 20.04 boot workload. This patch applies it to
test scripts and example scripts where appropriate.

Change-Id: Ibf9bed1a978b6d2e456b528f64cf3a9d6dc0e568
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62664
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-09-08 17:40:11 +00:00
Bobby R. Bruce
af4fd2f2c6 tests,configs: Update x86 boot tests/examples with Workload
As of this commit:
https://gem5-review.googlesource.com/c/public/gem5-resources/+/62658
there is an x86-ubuntu-18.04-boot workload.

Where appropriate tests and example scripts have been updated to use
this workload.

Change-Id: I7c9dc8e0e53b1d3f4c365f0382b5f5d4224436f7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62663
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-09-08 17:40:11 +00:00
Gabe Black
073c32be2c misc: Replace TARGET_ISA with USE_${ISA} variables.
The TARGET_ISA variable would let you select one ISA from a list of
possible ISAs. That has now been replaced with USE_ARM_ISA, USE_X86_ISA,
etc, variables which are boolean on or off. That will allow any number
of ISAs to be enabled or disabled individually. Enabling something other
than exactly one of these will probably prevent you from getting a
working gem5 binary, but those problems are being addressed in other,
parallel change series.

I decided to use the USE_ prefix since it was consistent with most other
on/off variables we have in gem5. One noteable exception is the
BUILD_GPU setting which, you could convincingly argue, is a better
prefix than USE_. Another option would be to use CONFIG_, in
anticipation of using a kconfig style config mechanism in gem5.

It seemed premature to start using a CONFIG_ prefix here, and if we
decide to switch to some other prefix like BUILD_, it should be a
purposeful choice and not something somebody just starts using.

Change-Id: I90fef2835aa4712782e6c1313fbf564d0ed45538
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52491
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-09-02 10:20:51 +00:00