qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Huth <thuth@redhat.com>,
	qemu-arm@nongnu.org,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v1 5/7] tests/migration-test: don't spam the logs when we fail
Date: Fri, 12 Jul 2019 13:22:52 +0200	[thread overview]
Message-ID: <a8137849-8d9c-bd87-523f-f2c7cdfa013c@redhat.com> (raw)
In-Reply-To: <20190712111849.9006-6-alex.bennee@linaro.org>

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 <alex.bennee@linaro.org>
> ---
>  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.

Thanks,
Laurent



  reply	other threads:[~2019-07-12 11:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-12 11:18 [Qemu-devel] [PATCH for 4.1? v1 0/7] testing/next (docker, win-cross) Alex Bennée
2019-07-12 11:18 ` [Qemu-devel] [PATCH v1 1/7] tests/docker: add test-misc for building tools & docs Alex Bennée
2019-07-13 15:48   ` Philippe Mathieu-Daudé
2019-07-15 11:08     ` Alex Bennée
2019-07-12 11:18 ` [Qemu-devel] [PATCH v1 2/7] tests/docker: Install Sphinx in the Ubuntu images Alex Bennée
2019-07-12 11:18 ` [Qemu-devel] [PATCH v1 3/7] tests/docker: Install Sphinx in the Fedora image Alex Bennée
2019-07-12 11:18 ` [Qemu-devel] [PATCH v1 4/7] tests/docker: Install Ubuntu images noninteractively Alex Bennée
2019-07-12 11:18 ` [Qemu-devel] [PATCH v1 5/7] tests/migration-test: don't spam the logs when we fail Alex Bennée
2019-07-12 11:22   ` Laurent Vivier [this message]
2019-07-12 13:35     ` Alex Bennée
2019-07-12 13:49       ` Laurent Vivier
2019-07-12 11:23   ` Thomas Huth
2019-07-12 11:42   ` Dr. David Alan Gilbert
2019-07-12 11:18 ` [Qemu-devel] [PATCH v1 6/7] tests/dockerfiles: update the win cross builds to stretch Alex Bennée
2019-07-13 14:56   ` Philippe Mathieu-Daudé
2019-07-12 11:18 ` [Qemu-devel] [PATCH v1 7/7] shippable: re-enable the windows cross builds Alex Bennée
2019-07-13 15:01   ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a8137849-8d9c-bd87-523f-f2c7cdfa013c@redhat.com \
    --to=lvivier@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=dgilbert@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).