Commit Graph

1491 Commits

Author SHA1 Message Date
Harshil Patel
5658eec958 tests: update mocking for tests
- After removal of the ClientWrapper class, the mocking of clients needs
  to be changed to _create_client function.
- Commented failing tests due to persistence issues.
  The persistence is being caused as the new mocked clients
  not being used as the older clients are persisting over
  the tests.

Change-Id: Ie342c9fc8103504dd12f49ae30b3bf62d189ce1d
2024-04-23 16:26:44 -07:00
Bobby R. Bruce
52a7218bd8 stdlib,tests: Fix test resources entry for to new schema
Change-Id: I77c263315d3e7f15df6f7fd83ab4ad9280faf777
2024-04-18 17:33:30 -07:00
Bobby R. Bruce
b80a04e146 stdlib,tests: Fix mocked_resquest_post - add kwargs
Change-Id: I1c080d42b6f238d2f716c500913dc7576dc13ed6
2024-04-18 17:33:30 -07:00
Bobby R. Bruce
e4ff5df35a tests,stdlib: Fix pyunit tests - Workload -> ShadowResource
Change-Id: I307439334c93851ebe3a78d3a80d048374a0900a
2024-04-18 17:33:30 -07:00
Yu-Cheng Chang
6b4dbdcedb tests,arch-riscv: update bitmanip asmtest binaries (#931)
Gem5 resource update: https://github.com/gem5/gem5-resources/pull/25
Gem5 issue: https://github.com/gem5/gem5/issues/883

Change-Id: I1892d7591d6fa49d0563623fd90292e0d38d9ba3
2024-04-16 09:51:32 -07:00
Bobby R. Bruce
504005da87 scons,tests: Add 'USE_TEST_OBJECTS' kconfig
This has the SimObjects defined in "src/test_objects" only be compiled
into the gem5 binary if the Kconfig 'USE_TEST_OBJECTS" == 'y'. This
happens in two cases:

1. When 'ALL/gem5' is compiled via "build_opts".
2. When tests are run via "./tests/main.py".

Change-Id: I2330008fd7c7900de5f4de142b8ac89ef4e351ce
2024-04-04 13:04:21 -07:00
Bobby R. Bruce
2771061207 stdlib,tests: Add StatTester SimObject and Scalar tests
This SimObject can be used to quickly test the statistics are
functioning correctly. The SimObject schedules a single event which sets
the statistics to values dependent on the SimObject params.

With this commit the "Scalar" stats have a StatTester subclass that can
be used for testing. More can be added as required.

Tests are included to check our Scalar SimStat functionality.

Change-Id: I78fa5d9a0c3fc7115bd6c6d3410a5436aaa47f55
2024-04-04 13:04:20 -07:00
Harshil Patel
76965c6431 tests: Update tests to use specific resource versions (#901)
This update modifies the test configuration to specify the versions of
resources used, rather than automatically using the latest versions.
Previously, if a resource was updated for a change, it could potentially
cause tests to fail if those tests were incompatible with the new
version of the resource.
Now, with this change, tests are tied to specific versions of resources,
ensuring that any updates to resources will require corresponding
updates to the tests to maintain compatibility.

Change-Id: I9633b1749f6c6c82af6aa6697b7e7656020f62fa
2024-03-21 09:03:46 -07:00
Giacomo Travaglini
058dd7e195 configs, tests: Amend stdlib configs to use WalkCache hierarchy
As X86 and RISCV are relying on a Table Walker cache, we
change their stdlib configs to use the newly defined

PrivateL1PrivateL2WalkCacheHierarchy

Change-Id: I63c3f70a9daa3b2c7a8306e51af8065bf1bea92b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2024-03-18 09:42:05 +00:00
Yu-Cheng Chang
521a7c1de0 tests: Exit riscv_asmtest script with simulator status code (#891)
It will be helpful to check if the instruction simulate well

Change-Id: I5faa435fad79601682126ee7978d8444093df900
2024-02-26 10:31:18 -08:00
Harshil Patel
0f79b15b2f tests: Update checkpoint tests to new checkpoints (#888)
Change-Id: I1bf6d47017bcf77a4f93341c73de355372e1dea7
2024-02-21 16:37:28 -08:00
Suraj Shirvankar
44aaebc49a tests: Allow pyunit tests to run on specific directories (#847)
This change allows pyunit tests to be run on specific directories
instead of the default `pyunit` directory.
You can pass in the directory as follows. I have built gem5.opt for
RISCV however it should work the same with other builds
```
./build/RISCV/gem5.opt tests/run_pyunit.py --directory tests/pyunit/gem5/
```
The default path works as it is currently 
```
./build/RISCV/gem5.opt tests/run_pyunit.py
```

Change-Id: Id9cc17498fa01b489de0bc96a9c80fc6b639a43f

Signed-off-by: Suraj Shirvankar <surajshirvankar@gmail.com>
2024-02-06 09:32:12 -08:00
Harshil Patel
d1fca18eb3 tests: Added tests for suites (#676)
Change-Id: I69db8e82e9373d659d125d3bd48a69de12b32390
2024-01-29 10:52:33 -08:00
Matthew Poremba
9b89149142 tests,ext: Remove GCN3 tags, update tests to Vega
Change-Id: I782b6e61cd43b51cfbe80161d4dc1cee125f7f64
2024-01-17 11:13:50 -06:00
Jason Lowe-Power
bab8af44fb Revert "tests: Fix garnet and memcheck tests to use X86"
This reverts commit b22ca02a65.
2023-12-20 15:32:57 -08:00
Bobby R. Bruce
b22ca02a65 tests: Fix garnet and memcheck tests to use X86
These tests previously used "build/NULL" but due to changes in the
"Ruby" and "garnet_synth_traffic.py" scripts, "NULL" fails as the script
exists "X86TimingSimple" with MESI_Two_Level.

This change fixes the tests by compiling and using the correct
compilation of gem5. It shouldn't affect the tests in any negative way.
As far as I'm aware it does not matter what ISA is used for these tests.

Change-Id: I8ae84b49f65968e97bef4904268de5a455f06f5c
2023-12-18 14:39:28 -08:00
Harshil Patel
bc12e7269d tests: fix gapbs and npb tests (#671)
Change-Id: I6090bde7903e302e501319b545fb4b06ef3e3df9
2023-12-12 12:33:22 -08:00
Bobby R. Bruce
569e21f798 configs,stdlib,tests: Remove get_runtime_isa() (#241)
`get_runtime_isa()` has been deprecated for some time. It is a leftover
piece of code from when gem5 was compiled to a single ISA and that ISA
used to configure the simulated system to use that ISA. Since multi-ISA
compilations are possible, `get_runtime_isa()` should not be used.
Unless the gem5 binary is compiled to a single ISA, a failure will
occur.

The new proceedure for specify which ISA to use is by the setting of the
correct `BaseCPU` implementation. E.g., `X86SimpleTimingCPU` of
`ArmO3CPU`.

This patch removes the remaining `get_runtime_isa()` instances and
removes the function itself. The `SimpleCore` class has been updated to
allow for it's CPU factory to return a class, needed by scripts in
"configs/common".

The deprecated functionality in the standard library, which allowed for
the specifying of an ISA when setting up a processor and/or core has
also been removed. Setting an ISA is now manditory.

Fixes #216.
2023-12-04 09:53:35 -08:00
Bobby R. Bruce
d11c40dcac misc: Run pre-commit run --all-files
This ensures `isort` is applied to all files in the repo.

Change-Id: Ib7ced1c924ef1639542bf0d1a01c5737f6ba43e9
2023-11-29 22:06:41 -08:00
Roger Chang
5b21233491 tests: Update Gem5Fixture to compatible of Kconfig system
Used after the build system changed to Kconfig

Change-Id: I699b36f09691dc821da8ee80fe5b60f30fe2179c
2023-11-23 08:26:11 +08:00
Ivana Mitrovic
45df1dbb55 docker-images: Changed path from Google Registry to GitHub
Replaced all instances of the Google Docker registry
(gcr.io/gem5-test/) with the GitHub Docker registry (ghcr.io/gem5/).
2023-10-16 11:53:27 -07:00
Kaustav Goswami
68af3f45c9 tests: updated the nightly tests to use SST 13.0.0 (#441)
PR https://github.com/gem5/gem5/pull/396 updates the gem5 SST bridge to
use StandardMem in SST. This change updates the nightly tests to use SST
13.0.0 instead of SST 11.1.0. It also updates the dockerfile.

Change-Id: I5c109c40379d2f09601a1c9f19c51dd716c6582e

---------

Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
Co-authored-by: Bobby R. Bruce <bbruce@ucdavis.edu>
2023-10-13 14:31:35 -07:00
Bobby R. Bruce
298119e402 misc,python: Run pre-commit run --all-files
Applies the `pyupgrade` hook to all files in the repo.

Change-Id: I9879c634a65c5fcaa9567c63bc5977ff97d5d3bf
2023-10-10 21:47:07 -07:00
Bobby R. Bruce
3f5d7d647a misc: Run pre-commit autoupdate (#419)
1. Runs `pre-commit autoupdate`.
2. Runs `pre-commit run --all-files`.
3. Adds (2.) to ".git-blame-ignore-rev".
2023-10-10 21:41:33 -07:00
Bobby R. Bruce
d559c24ac2 stdlib: Improve handing of errors in Atlas request failures (#404)
Now:

* The Atlas Client will attempt a connection 4 times, using an
exponential backoff approach between attempts.
* When a failure does arise a rich output is given so problems can be
easily diagnosed.

Addresses: #340
2023-10-10 21:34:24 -07:00
Harshil Patel
bbc301f2f0 stdlib, tests: Fixed bugs and tests
- Fixed bugs rekated to retrying on request faliure.
- Updated the pyunit tests.

Change-Id: Ia484690267bf27018488324f3408f7e47c59bef3
2023-10-10 15:54:20 -07:00
Bobby R. Bruce
ddf6cb88e4 misc: Run pre-commit run --all-files
This is reflect the updates made to black when running `pre-commit
autoupdate`.

Change-Id: Ifb7fea117f354c7f02f26926a5afdf7d67bc5919
2023-10-10 14:01:58 -07:00
Harshil Patel
3af3c1121b stdlib, resources: Addressed requested changes
Change-Id: I22abdc3bdcdde52301ed10cb3113e8925159c245
Co-authored-by: Kunal Pai <kunpai@users.noreply.github.com>
2023-10-02 23:27:32 -07:00
Harshil Patel
8182f8084b stdlib, resources, tests: Introduce Suite of Workloads
This patch introduces a new category called "suite".
A suite is a collection of workloads.
Each workload in a SuiteResource has a tag that can be narrowed down
through the function with_input_group.
Also, the set of input groups can be seen through list_input_groups.
Added unit tests to test all functions of SuiteResource class.

Change-Id: Iddda5c898b32b7cd874987dbe694ac09aa231f08

Co-authored-by: Kunal Pai <kunpai@ucdavis.edu>
2023-09-29 10:50:09 -07:00
Bobby R. Bruce
62d34ef374 misc: 'sim{out/err}' -> 'sim{out/err}.txt' (#250)
By default, the `--stderr-file` and `--stdout-file` arguments were
directing the simulator to output files named "simerr" and "simout"
respectively if an output redirect was requested.

A small annoyance is these files lack an extension meaning programs
refuse to open them, or don't do so withou additional effort. On many
systems they are assumed to scripts.

This patch adds the `.txt` extension to both, thus clearly indicating to
other programs these are text files and can be opened and read as such.
2023-09-27 17:36:03 -07:00
Bobby R. Bruce
391f62b213 misc: 'sim{out/err}' -> 'sim{out/err}.txt'
By default, the --stderr-file and --stdout-file arguments were
directing the simulator output to files named "simerr" and
"simout" respectively if an output redirect was requested.

A small annoyance is these files lack an extension meaning programs
refuse to open them, or to do so without some additional effort. On
many systems they are assumed to scripts.

This patch adds the .txt extension to both, thus clearly indicating
to other programs these are text files and can be opened to be read
as such.

Change-Id: Iff5af4a9e6966b4467d005a029dbf401099fbd35
2023-09-21 12:57:43 -07:00
Bobby R. Bruce
efd58f9b72 tests: Remove ":" from testing results output dir name
Colons in path names is not advisable.

Change-Id: I7748a36cabafde69759f7a9892f7b8910470b85e
2023-09-19 15:48:11 -07:00
Bobby R. Bruce
0337613afc ext,tests: Add --build-targets option to ./main.py list
This allows for build target information (i.e., the gem5 binary to be
built for the tests) to be returned.

Change-Id: I6638b54cbb1822555f58e74938d36043c11108ba
2023-09-19 15:48:10 -07:00
Bobby R. Bruce
c36a4d12aa tests: Replace print with testlib.log for PARSEC warn
Using just a print was causing this warning to print even with the `-q`
flag was passed. The `-q` flag sets the output to machine readable,
which the warning statement is not.

Change-Id: I139e2565dbc53aaee9027c0e003d34ba800a7ef4
2023-09-19 15:48:10 -07:00
Bobby R. Bruce
eb5ae35341 resources,stdlib: Add workload to resource specialization and deprecate workload.py (#212) 2023-09-07 12:45:45 -07:00
Harshil Patel
bbe96d6485 stdlib: Changed use of Workload to obtain_resource
- Changed files calling Workload class to call obtain_resoucre instead.

Change-Id: I41f5f0c3ccc7c08b39e7049eabef9609d6d68788
2023-09-06 10:06:16 -07:00
Harshil Patel
bf06d61c35 stdlib, tests, resources: Updated tests
- Updated workload tests to use WrokloadResource and obtain_resource

Change-Id: I39194e7fe764566a528e5141c29f30efa14e0cde
2023-09-05 12:39:38 -07:00
Bobby R. Bruce
c156df620d resources, stdlib: Add support for local files in obtain_resource (#204)
This patch allows a local JSON file to specify a local path in the JSON
object of a Resource, through the "url" field.

Local paths can be entered with the prefix "file:" in the "url" field.

If the local path exists, then the Resource from there is copied into
the resource directory defined in the
function earlier.

This behavior is the same as using specific Resource classes (ex.
BinaryResource) and passing a local_path into the function.

But, the above class does not allow simultaneous creation of local
Resources and Workloads of those local Resources.

With this patch, someone can use a local JSON, specify the location of
local Resources and create a Workload from those Resources and test both
together.
2023-08-29 20:35:40 -07:00
KUNAL PAI
d52c7ce87f resources, stdlib: Add support for local files in obtain_resource
This patch allows a local JSON file to specify a local path
in the JSON object of a Resource, through the "url" field.

Local paths can be entered with the prefix "file:" in "url".
All File URI scheme formats are supported.

This behavior is the same as using specific Resource classes
(ex. BinaryResource) and passing a local_path into the function.

But, the above infrastructure does not allow simultaneous
creation of Resources and Workloads of those Resources.

With this patch, someone can use a local JSON, specify the location
of local Resources and create a Workload from those Resources and
test both together.

Also, this patch adds pyunit tests to check the functionality
of the function used to convert the "url" field into a path.

Change-Id: I1fa3ce33a9870528efd7751d7ca24c27baf36ad4
2023-08-29 09:47:03 -07:00
Bobby R. Bruce
cf997c93a5 tests, gpu-compute: Updating weekly.sh to use mmapped version of FW (#186) 2023-08-24 10:16:25 -07:00
Roger Chang
f41172f9e4 tests: Add RV32 test binaries 2023-08-22 16:00:16 +08:00
Roger Chang
61488e1e17 tests: Add more tests for RV64 2023-08-22 16:00:16 +08:00
Roger Chang
fee1c3fc7a tests: Update asmtest script
Upload the config script to make it only for riscv asmtest and replace
Resource with obtain_resourse

Change-Id: I0bab96ea352b7ce1c6838203bfa13eee795f41f9
2023-08-22 16:00:16 +08:00
Bobby R. Bruce
d7d441becb tests: Add checkpoint tests for all ISAs (#167)
Added save and restore checkpoint tests for arm-hello, x86-hello,
x86-fs, power-hello

Added mips and sparc test but mips does not support checkpoint and there
is a bug in sparc.

Added test file to run the tests.
2023-08-18 15:01:39 -07:00
Harshil Patel
9d86a559ed tests: removed mips tests and added issue link.
- Removed MIPS tests.
- Added link to github issue sparc test bug.

Change-Id: Ib3c69dca578371ecf0ac2d7694f46f24834a7e5f
2023-08-18 09:51:40 -07:00
Bobby R. Bruce
c0216dbe48 stdlib: Allow passing of func as Exit Event generator
In this case the function is turned into a generator with the
"yield" of the generator the return the function's execution.

Change-Id: I4b06d64c5479638712a11e3c1a2f7bd30f60d188
2023-08-17 16:48:33 -07:00
Harshil Patel
b19d4beeb8 tests: Removed mips checkpoint tests
Change-Id: I03ad0025ec982245721fd7faad8d75cdbb99cf81
2023-08-11 09:00:11 -07:00
Bobby R. Bruce
fa918f61d1 tests: Move replacement policy and simulator config files (#173)
Moving these files should address the failures in the daily tests.
2023-08-11 07:39:06 -07:00
Melissa Jost
912b7c06dd tests: Move replacement policy and simulator config files
Moving these files should address the failures in the daily
tests.

Change-Id: I438adba1a45bdf6083651b6b3f610c8bbe4ebdf0
2023-08-10 16:38:20 -07:00
James Braun
da87f65e4a Updating weekly.sh to use mmapped version of FW
Change-Id: Id0059d9b3e9e4a4db3ba59793c41ae71269666ae
2023-08-09 23:05:58 -05:00