gem5: add mechanism to list regression tests

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2020-01-20 00:00:00 +00:00
parent 911cd11ab9
commit 9fbe39542d
2 changed files with 39 additions and 7 deletions

View File

@@ -11963,10 +11963,16 @@ TODO: why is the `--dtb` required despite `fs_bigLITTLE.py` having a DTB generat
Tested on: https://github.com/cirosantilli/linux-kernel-module-cheat/commit/18c1c823feda65f8b54cd38e261c282eee01ed9f[18c1c823feda65f8b54cd38e261c282eee01ed9f]
=== gem5 unit tests
=== gem5 in-tree tests
https://stackoverflow.com/questions/52279971/how-to-run-the-gem5-unit-tests
All those tests could in theory be added to this repo instead of to gem5, and this is actually the superior setup as it is cross emulator.
But can the people from the project be convinced of that?
==== gem5 unit tests
These are just very small GTest tests that test a single class in isolation, they don't run any executables.
Build the unit tests and run them:
@@ -12009,7 +12015,7 @@ This does not run the test however.
Note that the command and it's corresponding results don't need to show consecutively on stdout because tests are run in parallel. You just have to match them based on the class name `CircleBufTest` to the file `circlebuf.test.cpp`.
=== gem5 regression tests
==== gem5 regression tests
https://stackoverflow.com/questions/52279971/how-to-run-the-gem5-unit-tests
@@ -12028,6 +12034,18 @@ After the first run has downloaded the test binaries for you, you can speed up t
Note however that `--skip-build` is required at least once per branch to download the test binaries, because the test interface is bad.
List available instead of running them:
....
./gem5-regression --gem5-worktree master --arch aarch64 --cmd list
....
You can then pick one suite from the list (not tests) and run just it e.g. with:
....
./gem5-regression --arch aarch64 -- --uid SuiteUID:tests/gem5/cpu_tests/test.py:cpu_test_AtomicSimpleCPU_Bubblesort-ARM-opt
....
=== gem5 simulate() limit reached
This error happens when the following instruction limits are reached: