qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.5] main-loop: suppress warnings under qtes


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH for-2.5] main-loop: suppress warnings under qtest
Date: Tue, 1 Dec 2015 17:04:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0


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 <address@hidden>
> Signed-off-by: Michael S. Tsirkin <address@hidden>
> ---
>  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 via email to

[Prev in Thread] Current Thread [Next in Thread]