[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 5/7] tests/migration-test: don't spam the log
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH v1 5/7] tests/migration-test: don't spam the logs when we fail |
Date: |
Fri, 12 Jul 2019 14:35:20 +0100 |
User-agent: |
mu4e 1.3.2; emacs 26.1 |
Laurent Vivier <address@hidden> writes:
> On 12/07/2019 13:18, Alex Bennée wrote:
>> 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>
>> ---
>> 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 b6434628e1c..ce041f80c2a 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);
>
> "bad - 10" as you have already displayed 10 errors.
Will do.
>
> Thanks,
> Laurent
--
Alex Bennée
- [Qemu-devel] [PATCH for 4.1? v1 0/7] testing/next (docker, win-cross), Alex Bennée, 2019/07/12
- [Qemu-devel] [PATCH v1 1/7] tests/docker: add test-misc for building tools & docs, Alex Bennée, 2019/07/12
- [Qemu-devel] [PATCH v1 3/7] tests/docker: Install Sphinx in the Fedora image, Alex Bennée, 2019/07/12
- [Qemu-devel] [PATCH v1 2/7] tests/docker: Install Sphinx in the Ubuntu images, Alex Bennée, 2019/07/12
- [Qemu-devel] [PATCH v1 4/7] tests/docker: Install Ubuntu images noninteractively, Alex Bennée, 2019/07/12
- [Qemu-devel] [PATCH v1 5/7] tests/migration-test: don't spam the logs when we fail, Alex Bennée, 2019/07/12
- Re: [Qemu-devel] [PATCH v1 5/7] tests/migration-test: don't spam the logs when we fail, Thomas Huth, 2019/07/12
- Re: [Qemu-devel] [PATCH v1 5/7] tests/migration-test: don't spam the logs when we fail, Dr. David Alan Gilbert, 2019/07/12
- [Qemu-devel] [PATCH v1 7/7] shippable: re-enable the windows cross builds, Alex Bennée, 2019/07/12
- [Qemu-devel] [PATCH v1 6/7] tests/dockerfiles: update the win cross builds to stretch, Alex Bennée, 2019/07/12