Commit Graph

1491 Commits

Author SHA1 Message Date
Roger Chang
083566d0c8 arch-riscv: add RV32 ADFIMU_Zfh instruction tests
1. Add rv32 binary files into asmtests
2. Support Riscv CPU with 32 bits register to  simple_binary_run.py

Change-Id: I5cc4c2eeb7654a4acc2d167eb76d8b6522e65dd9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65533
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-12-30 22:56:01 +00:00
Bobby R. Bruce
218b3925be misc: Merge branch stable into develop branch
This ensures both branches are in-sync and have not diverged.

Change-Id: Ib487d8596037017b9ec03d7e8a76229373c153db
2022-12-30 20:43:00 +00:00
Bobby R. Bruce
06f18242fe tests: Fix compiler-tests.sh build args passing
Reverts this fix:
https://gem5-review.googlesource.com/c/public/gem5/+/66631

While this did fix the case where no build args were passed, it broke
the case where build args were passed.

This fix ensures the script works in both cases.

Change-Id: I6cc8cc0c2a10c801d4a59e54b070383ac8ee93ae
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66772
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-12-17 20:50:13 +00:00
Melissa Jost
55d8219717 tests: Remove get_runtime_isa() from parsec_disk_run.py
This change removes the call to get_runtime_isa(), as it has
been deprecated.

Change-Id: Ie1b0b5fb456fd8ed504a531841fe4ea8e211502c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66611
Maintainer: Boris Shingarov <shingarov@labware.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Boris Shingarov <shingarov@labware.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-12-17 11:37:13 +00:00
Melissa Jost
4cae2ae4ad tests: Remove get_runtime_isa() from parsec_disk_run.py
This change removes the call to get_runtime_isa(), as it has
been deprecated.

Change-Id: Ie1b0b5fb456fd8ed504a531841fe4ea8e211502c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66612
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-12-17 11:36:59 +00:00
Bobby R. Bruce
2ed4323899 tests: Fix compiler-tests.sh for no build args passed case
When a user ran "tests/compiler-tests.sh" without passing any arguments,
the compiler tests would fail with:

```
scons: Reading SConscript files ...
Error: No existing build directory and no variant for /gem5
```

However, when passed with arguments, such as:

```
./tests/compiler-tests.sh -j6
```

the tests passed.

The fix for this is to merge the "$build_out" and "$build_args" into a
single string when executing the docker. I do not know exactly why this
works, but it does fix the error.

Change-Id: Ibcd316668b60fb7706f0ee05ab6dadf56228319d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66631
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-12-13 16:36:40 +00:00
Bobby R. Bruce
d65173d596 tests: Move replacement policy tests to long/Nightly
These tests require the compilation of NULL with the MI_Example cache
coherence protocol. This is a large overhead for these tests. They are
therefore better off being run nightly rather than as a
pre-commit/kokoro/quick test.

Change-Id: I87b25afa313ecca65c738e3a8692a9bf72b06620
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66615
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2022-12-13 00:20:49 +00:00
Bobby R. Bruce
91f8f2b276 tests: Add missing _pre_instantiate()
As of this change:
https://gem5-review.googlesource.com/c/public/gem5/+/65051, the
`_pre_instantiate` function must be called prior to `m5.instantiate`
when using the stdlib without the Simulator module. The
"test/gem5/replacement-policies/run_replacement_policy_test.py" lacked
this and was causing errors when running replacement policy tests.

In addition we also fix the incorrect type of size in`createArtifact'.
This was causing problems with the Kokoro build system.
The typing here was `int` but had a default value of `None`. The correct
type is therefore `Optional[int]`.

Change-Id: Ibaf63151196b15f68e643fa5c1b290439d6618c8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66371
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
(cherry picked from commit a3fd9631cc)
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66613
2022-12-13 00:20:13 +00:00
Jarvis
bd31956060 tests: Add replacement policy tests
Add tests to test the correctness of replacement policies using
TrafficGen.
Enable debug-flags to print the hit and miss messages so that you
can compare the results with the comments in the tests. Even though
the tests are targeting specific replacement policies, they can be
reused to test all replacement policies.

Change-Id: I3a8013fbcb19adae25b0818ac9e4b0be60be0689
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60389
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
2022-12-07 23:18:23 +00:00
Bobby R. Bruce
620e5243e7 tests: Update presubmit.sh to use v22-1 docker images
Change-Id: I7b800f794af699281f17d6c484393c1646e3de4e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65923
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-12-05 20:25:53 +00:00
Bobby R. Bruce
1c422628bc tests: Update weekly test docker image tags to v22-1
Change-Id: I6a7ff942234f65b763d2974deb740942bfc2cc17
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65922
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-12-05 20:25:53 +00:00
Bobby R. Bruce
38778c5a17 tests: Abstract the docker image tag for Weekly tests
This abstraction allows us to more easily change the tags between
different gem5 releases and/or between stable and the develop branch.

Change-Id: Iad49cabac9b4000e8570162d3e12453c6d097ee2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65921
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-12-05 20:25:53 +00:00
Bobby R. Bruce
1e5bd5b89a tests: Update nightly test docker image tags to v22-1
Change-Id: I3d1fa67a89594050cb8069541004763ac5ba66a4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65920
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-12-05 20:25:53 +00:00
Bobby R. Bruce
1c79a469ba tests: Abstract the docker image tag for Nightly tests
This abstraction allows us to more easily change the tags between
different gem5 releases and/or between stable and the develop branch.

Change-Id: Ieb38e9a333ef8592b586014a3a9220f4a18c64e3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65919
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-12-05 20:25:53 +00:00
Bobby R. Bruce
d1c72cecb3 tests: Update the compiler-tests.sh to use the v22-1 images
This keeps the running of the compiler tests consistent by using a fixed
version of the compiler images.

Change-Id: I6e8d8313939696ed22f22e55f9c274c0105ce236
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/65918
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-12-05 20:25:53 +00:00
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
8479a691aa 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>
2022-12-02 06:04:53 +00:00
Hoa Nguyen
eac06ad681 python: Fix multiline quotes in a single line
An example case,
```python
mem_side_port = RequestPort(
    "This port sends requests and " "receives responses"
)
```

This is the residue of running the python formatter.
This is done by finding all tokens matching the regex `"\s"(?![.;"])`
and manually replacing them by empty strings.

Change-Id: Icf223bbe889e5fa5749a81ef77aa6e721f38b549
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66111
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-11-29 23:44:38 +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
4054565b85 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>
2022-11-23 06:12:26 +00:00
Bobby R. Bruce
db35dfb942 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>
2022-11-22 05:54:29 +00:00
Bobby R. Bruce
5794643e44 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>
2022-11-22 05:53:43 +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