[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 06/23] tests/migration-test: don't spam the logs
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [PATCH v2 06/23] tests/migration-test: don't spam the logs when we fail |
Date: |
Wed, 17 Jul 2019 14:43:18 +0100 |
Quite often the information about which test failed is hidden by the
wall of repeated failures for each page. Stop outputting the error
after 10 bad pages and just summarise the total damage at the end.
Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
---
v2
- bad - 10
---
tests/migration-test.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/tests/migration-test.c b/tests/migration-test.c
index a4feb9545d9..c1968740abe 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -308,7 +308,7 @@ static void check_guests_ram(QTestState *who)
uint8_t first_byte;
uint8_t last_byte;
bool hit_edge = false;
- bool bad = false;
+ int bad = 0;
qtest_memread(who, start_address, &first_byte, 1);
last_byte = first_byte;
@@ -327,15 +327,20 @@ static void check_guests_ram(QTestState *who)
hit_edge = true;
last_byte = b;
} else {
- fprintf(stderr, "Memory content inconsistency at %x"
- " first_byte = %x last_byte = %x current = %x"
- " hit_edge = %x\n",
- address, first_byte, last_byte, b, hit_edge);
- bad = true;
+ bad++;
+ if (bad <= 10) {
+ fprintf(stderr, "Memory content inconsistency at %x"
+ " first_byte = %x last_byte = %x current = %x"
+ " hit_edge = %x\n",
+ address, first_byte, last_byte, b, hit_edge);
+ }
}
}
}
- g_assert_false(bad);
+ if (bad >= 10) {
+ fprintf(stderr, "and in another %d pages", bad - 10);
+ }
+ g_assert(bad == 0);
}
static void cleanup(const char *filename)
--
2.20.1
- [Qemu-devel] [PATCH v2 00/23] testing/next for 4.1-rc2 (win, travis, iotests), Alex Bennée, 2019/07/17
- [Qemu-devel] [PATCH v2 01/23] archive-source: also create a stash for submodules, Alex Bennée, 2019/07/17
- [Qemu-devel] [PATCH v2 02/23] tests/docker: add test-misc for building tools & docs, Alex Bennée, 2019/07/17
- [Qemu-devel] [PATCH v2 03/23] tests/docker: Install Sphinx in the Ubuntu images, Alex Bennée, 2019/07/17
- [Qemu-devel] [PATCH v2 05/23] tests/docker: Install Ubuntu images noninteractively, Alex Bennée, 2019/07/17
- [Qemu-devel] [PATCH v2 04/23] tests/docker: Install Sphinx in the Fedora image, Alex Bennée, 2019/07/17
- [Qemu-devel] [PATCH v2 06/23] tests/migration-test: don't spam the logs when we fail,
Alex Bennée <=
- [Qemu-devel] [PATCH v2 08/23] shippable: re-enable the windows cross builds, Alex Bennée, 2019/07/17
- [Qemu-devel] [PATCH v2 07/23] tests/dockerfiles: update the win cross builds to stretch, Alex Bennée, 2019/07/17
- [Qemu-devel] [PATCH v2 09/23] tests/docker: Install Sphinx in the Debian images, Alex Bennée, 2019/07/17
- [Qemu-devel] [PATCH v2 10/23] tests/docker: Install the NSIS tools in the MinGW capable images, Alex Bennée, 2019/07/17
- [Qemu-devel] [PATCH v2 12/23] tests/docker: Install texinfo in the Fedora image, Alex Bennée, 2019/07/17
- [Qemu-devel] [PATCH v2 11/23] tests/docker: Set the correct cross-PKG_CONFIG_PATH in the MXE images, Alex Bennée, 2019/07/17
- [Qemu-devel] [PATCH v2 17/23] hw/i386: also turn off VMMOUSE is VMPORT is disabled, Alex Bennée, 2019/07/17
- [Qemu-devel] [PATCH v2 18/23] travis: enable travis_retry for check phase, Alex Bennée, 2019/07/17