Peter Xu 829db8b497 tests: only update last_byte when at the edge
The only possible change of last_byte is when it reaches the edge.
Setting it every time might let last_byte contain an invalid data when
memory corruption is detected, then the check of the next byte will be
incorrect.  For example, a single page corruption at address 0x14ad000
will also lead to a "fake" corruption at 0x14ae000:

  Memory content inconsistency at 14ad000 first_byte = 44 last_byte = 44 current = ef hit_edge = 0
  Memory content inconsistency at 14ae000 first_byte = 44 last_byte = ef current = 44 hit_edge = 0

After the patch, it'll only report the corrputed page:

  Memory content inconsistency at 14ad000 first_byte = 44 last_byte = 44 current = ef hit_edge = 0

Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180723123305.24792-4-peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2018-07-24 17:21:55 +01:00
..
2018-02-22 15:44:07 -08:00
2017-09-22 10:46:25 +08:00
2018-03-21 15:13:40 +01:00
2018-07-24 11:45:25 +01:00
2017-03-01 11:51:28 +04:00
2017-03-01 11:51:05 +04:00
2017-10-20 13:32:10 +02:00
2017-03-01 11:51:05 +04:00
2018-06-04 10:15:16 +01:00
2017-10-20 13:32:10 +02:00
2018-03-06 14:01:27 +01:00
2017-01-10 08:49:59 -08:00
2018-06-01 15:13:46 +02:00
2018-02-08 09:22:03 +08:00
2017-09-05 22:34:40 +02:00
2018-07-05 11:25:14 +01:00
2018-07-05 11:25:14 +01:00
2017-12-20 22:01:24 +08:00