util: Add a unit test for the m5 utility's "readfile" command.
authorGabe Black <gabeblack@google.com>
Wed, 8 Apr 2020 08:55:58 +0000 (01:55 -0700)
committerGabe Black <gabeblack@google.com>
Mon, 27 Jul 2020 08:29:34 +0000 (08:29 +0000)
commitdeb48638eac79ca3d4f1f11ba7b8de8fd5fdf848
treef92027f9a9d19dc24d9febfe28c7ecad8deeabb3
parent135d3e9cf5ad3909b398600537d137b41c8bd933
util: Add a unit test for the m5 utility's "readfile" command.

This feeds a fake file to the readfile command which is just a sequence
of incrementing 32 bit values. The incrementing values make sure that
the right region of the input file is being read at the right position,
and the relatively small size means there shouldn't be tons of zeroes
everywhere which can't be distinguished from each other.

Change-Id: I4286b1f92684f127c4885c29192c6c5244a61855
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27608
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Gem5 Cloud Project GCB service account <345032938727@cloudbuild.gserviceaccount.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
util/m5/src/command/SConscript.native
util/m5/src/command/readfile.test.cc [new file with mode: 0644]