mem: make MemTest panic on a packet error
authorCiro Santilli <ciro.santilli@arm.com>
Tue, 10 Mar 2020 18:43:12 +0000 (18:43 +0000)
committerCiro Santilli <ciro.santilli@arm.com>
Wed, 29 Apr 2020 18:33:50 +0000 (18:33 +0000)
commitb4ab0c168cea7697176b19f0d0a4e54db139ed3c
treea6eeecbc2b0ee57fd0586ccc675b887ee281e73b
parent4f16a4e65a35d8c5f48a4baa2c949d04bf4c9405
mem: make MemTest panic on a packet error

Before this change, running:

./build/NULL/gem5.opt configs/example/ruby_mem_test.py -m 20000000 \
  --functional 10

would only print warning for memory errors such as:

warn: Read access failed at 0x107a00

and there was no way to make the simulation fail.

This commit makes those warnings into errors such as:

panic: Read access failed at 0x107a00

unless --suppress-func-errors is given.

This will be used to automate MemTest testing in later commits.

Change-Id: I1840c1ed1853f1a71ec73bd50cadaac095794f91
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26804
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
configs/example/ruby_mem_test.py
src/cpu/testers/memtest/MemTest.py
src/cpu/testers/memtest/memtest.cc
src/cpu/testers/memtest/memtest.hh
tests/configs/memtest-ruby.py