[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 6/7] tests: only update last_byte when at the edge
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-devel] [PULL 6/7] tests: only update last_byte when at the edge |
Date: |
Tue, 24 Jul 2018 19:34:53 +0100 |
From: Peter Xu <address@hidden>
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 <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
tests/migration-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/migration-test.c b/tests/migration-test.c
index 086f727b34..e079e0bdb6 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -300,6 +300,7 @@ static void check_guests_ram(QTestState *who)
* to us yet.
*/
hit_edge = true;
+ last_byte = b;
} else {
fprintf(stderr, "Memory content inconsistency at %x"
" first_byte = %x last_byte = %x current = %x"
@@ -308,7 +309,6 @@ static void check_guests_ram(QTestState *who)
bad = true;
}
}
- last_byte = b;
}
g_assert_false(bad);
}
--
2.17.1
- [Qemu-devel] [PULL 0/7] migration queue for 3.0, Dr. David Alan Gilbert (git), 2018/07/24
- [Qemu-devel] [PULL 1/7] migration: fix potential overflow in multifd send, Dr. David Alan Gilbert (git), 2018/07/24
- [Qemu-devel] [PULL 2/7] migrate: Fix cancelling state warning, Dr. David Alan Gilbert (git), 2018/07/24
- [Qemu-devel] [PULL 4/7] migration: update recv bitmap only on dest vm, Dr. David Alan Gilbert (git), 2018/07/24
- [Qemu-devel] [PULL 3/7] audio/hda: Fix migration, Dr. David Alan Gilbert (git), 2018/07/24
- [Qemu-devel] [PULL 5/7] migration: disallow recovery for release-ram, Dr. David Alan Gilbert (git), 2018/07/24
- [Qemu-devel] [PULL 6/7] tests: only update last_byte when at the edge,
Dr. David Alan Gilbert (git) <=
- [Qemu-devel] [PULL 7/7] migration: fix duplicate initialization for expected_downtime and cleanup_bh, Dr. David Alan Gilbert (git), 2018/07/24
- Re: [Qemu-devel] [PULL 0/7] migration queue for 3.0, Peter Maydell, 2018/07/24