qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH for-2.5] main-loop: suppress warnings under qtest
Date: Tue, 1 Dec 2015 17:04:38 +0100	[thread overview]
Message-ID: <565DC516.9070708@redhat.com> (raw)
In-Reply-To: <1448882964-22433-1-git-send-email-mst@redhat.com>



On 30/11/2015 12:30, Michael S. Tsirkin wrote:
> commit 01c22f2cdd4fcf02276ea10f48253850a5fd7259 ("main-loop: Suppress
> "I/O thread spun" warnings for qtest") doesn't actually disable the
> warning for everyone since some tests don't run under the qtest
> accelerator.
> 
> Check qtest_driver instead.
> 
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>  main-loop.c   | 2 +-
>  stubs/qtest.c | 5 +++++
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/main-loop.c b/main-loop.c
> index df28670..5877615 100644
> --- a/main-loop.c
> +++ b/main-loop.c
> @@ -230,7 +230,7 @@ static int os_host_main_loop_wait(int64_t timeout)
>      if (!timeout && (spin_counter > MAX_MAIN_LOOP_SPIN)) {
>          static bool notified;
>  
> -        if (!notified && !qtest_enabled()) {
> +        if (!notified && !qtest_driver()) {
>              fprintf(stderr,
>                      "main-loop: WARNING: I/O thread spun for %d iterations\n",
>                      MAX_MAIN_LOOP_SPIN);
> diff --git a/stubs/qtest.c b/stubs/qtest.c
> index dc17594..4dfde61 100644
> --- a/stubs/qtest.c
> +++ b/stubs/qtest.c
> @@ -12,3 +12,8 @@
>  
>  /* Needed for qtest_allowed() */
>  bool qtest_allowed;
> +
> +bool qtest_driver(void)
> +{
> +    return false;
> +}
> 

Queued for 2.5, thanks.  Will send pull request tomorrow morning.

Paolo

      reply	other threads:[~2015-12-01 16:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-30 11:30 [Qemu-devel] [PATCH for-2.5] main-loop: suppress warnings under qtest Michael S. Tsirkin
2015-12-01 16:04 ` Paolo Bonzini [this message]

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=565DC516.9070708@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).