tests: Update memory tests to be compatible with python3
tests: Update memory tests to be compatible with python3

Signed-off-by: Hoa Nguyen <a0aa8449aacb303edcb25d6bbe69da9124f010fc@ucdavis.edu>
Change-Id: I9bb7444c62e6b29e9c91dbf30320a38718f08b8c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29353
Maintainer: Bobby R. Bruce <b9dba908ffb6c6d8ffe449cc88b3709c13c485c2@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <92de577f37050ad05b60626d2f17913f40dcb1a2@gmail.com>
Tested-by: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>

gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5