tests/tcg: better detect truncated reads
commitfcf112317c6c5eaa816a010a701efeaebc5baf60
authorAlex Bennée <alex.bennee@linaro.org>
Mon, 3 Jun 2019 15:14:24 +0000 (3 16:14 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 12 Jun 2019 16:53:22 +0000 (12 17:53 +0100)
tree1caa3f80babf70df822d2a73d2b6ec8d18bfb024
parent8c79b288513587e960b6b7257a9d955d5592f209
tests/tcg: better detect truncated reads

If we've truncated a wider read we can detect the condition earlier by
looking at the number of zeros we've read. So we don't trip up on
cases where we have written zeros to the start of the buffer we also
ensure we only start each offset read from the right address.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
tests/tcg/multiarch/system/memory.c