All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.5 0/2] Fix "make check" with mingw and Wine
@ 2015-11-23 12:39 Kevin Wolf
  2015-11-23 12:39 ` [Qemu-devel] [PATCH 1/2] tests/Makefile: Add more dependencies for test-timed-average Kevin Wolf
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Kevin Wolf @ 2015-11-23 12:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, pbonzini, famz, stefanha

I tried to run "make check" on my mingw build and got two failures. Both of
them are bugs in the test suite rather than qemu proper. They are easy enough
to fix, so here are the fixes.

Kevin Wolf (2):
  tests/Makefile: Add more dependencies for test-timed-average
  test-aio: Fix event notifier cleanup

 tests/Makefile   | 3 ++-
 tests/test-aio.c | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH 1/2] tests/Makefile: Add more dependencies for test-timed-average
  2015-11-23 12:39 [Qemu-devel] [PATCH for-2.5 0/2] Fix "make check" with mingw and Wine Kevin Wolf
@ 2015-11-23 12:39 ` Kevin Wolf
  2015-11-23 14:46   ` Paolo Bonzini
  2015-11-23 12:39 ` [Qemu-devel] [PATCH 2/2] test-aio: Fix event notifier cleanup Kevin Wolf
  2015-11-24  5:57 ` [Qemu-devel] [PATCH for-2.5 0/2] Fix "make check" with mingw and Wine Stefan Hajnoczi
  2 siblings, 1 reply; 8+ messages in thread
From: Kevin Wolf @ 2015-11-23 12:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, pbonzini, famz, stefanha

'make check' failed to compile the test case for mingw because of
undefined references. Pull in a few more dependencies so that it builds.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/Makefile b/tests/Makefile
index b937984..47fe5d5 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -416,7 +416,8 @@ tests/test-vmstate$(EXESUF): tests/test-vmstate.o \
 	$(test-qom-obj-y)
 tests/test-timed-average$(EXESUF): tests/test-timed-average.o qemu-timer.o \
 	libqemuutil.a stubs/clock-warp.o stubs/cpu-get-icount.o \
-	stubs/notify-event.o stubs/replay.o
+	stubs/notify-event.o stubs/replay.o stubs/mon-is-qmp.o stubs/fd-register.o \
+	stubs/mon-printf.o
 
 tests/test-qapi-types.c tests/test-qapi-types.h :\
 $(SRC_PATH)/tests/qapi-schema/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH 2/2] test-aio: Fix event notifier cleanup
  2015-11-23 12:39 [Qemu-devel] [PATCH for-2.5 0/2] Fix "make check" with mingw and Wine Kevin Wolf
  2015-11-23 12:39 ` [Qemu-devel] [PATCH 1/2] tests/Makefile: Add more dependencies for test-timed-average Kevin Wolf
@ 2015-11-23 12:39 ` Kevin Wolf
  2015-11-23 14:46   ` Paolo Bonzini
  2015-11-24  5:57 ` [Qemu-devel] [PATCH for-2.5 0/2] Fix "make check" with mingw and Wine Stefan Hajnoczi
  2 siblings, 1 reply; 8+ messages in thread
From: Kevin Wolf @ 2015-11-23 12:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, pbonzini, famz, stefanha

One test case closed an event notifier (event_notifier_cleanup())
without first disabling it (set_event_notifier(..., NULL)). This
resulted in a leftover handle 0 that was added to each subsequent
WaitForMultipleObjects() call, causing the function to fail (invalid
handle).

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/test-aio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/test-aio.c b/tests/test-aio.c
index 1623803..e188d8c 100644
--- a/tests/test-aio.c
+++ b/tests/test-aio.c
@@ -393,6 +393,7 @@ static void test_aio_external_client(void)
             aio_enable_external(ctx);
         }
         assert(aio_poll(ctx, false));
+        set_event_notifier(ctx, &data.e, NULL);
         event_notifier_cleanup(&data.e);
     }
 }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] tests/Makefile: Add more dependencies for test-timed-average
  2015-11-23 12:39 ` [Qemu-devel] [PATCH 1/2] tests/Makefile: Add more dependencies for test-timed-average Kevin Wolf
@ 2015-11-23 14:46   ` Paolo Bonzini
  2015-11-23 16:09     ` Kevin Wolf
  0 siblings, 1 reply; 8+ messages in thread
From: Paolo Bonzini @ 2015-11-23 14:46 UTC (permalink / raw)
  To: Kevin Wolf, qemu-devel; +Cc: famz, stefanha



On 23/11/2015 13:39, Kevin Wolf wrote:
>  tests/test-timed-average$(EXESUF): tests/test-timed-average.o qemu-timer.o \
>  	libqemuutil.a stubs/clock-warp.o stubs/cpu-get-icount.o \
> -	stubs/notify-event.o stubs/replay.o
> +	stubs/notify-event.o stubs/replay.o stubs/mon-is-qmp.o stubs/fd-register.o \
> +	stubs/mon-printf.o
>  

Why not just add libqemustub.a?  (If it works, do not even bother
reposting).

Paolo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] test-aio: Fix event notifier cleanup
  2015-11-23 12:39 ` [Qemu-devel] [PATCH 2/2] test-aio: Fix event notifier cleanup Kevin Wolf
@ 2015-11-23 14:46   ` Paolo Bonzini
  0 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2015-11-23 14:46 UTC (permalink / raw)
  To: Kevin Wolf, qemu-devel; +Cc: famz, stefanha



On 23/11/2015 13:39, Kevin Wolf wrote:
> One test case closed an event notifier (event_notifier_cleanup())
> without first disabling it (set_event_notifier(..., NULL)). This
> resulted in a leftover handle 0 that was added to each subsequent
> WaitForMultipleObjects() call, causing the function to fail (invalid
> handle).
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  tests/test-aio.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/test-aio.c b/tests/test-aio.c
> index 1623803..e188d8c 100644
> --- a/tests/test-aio.c
> +++ b/tests/test-aio.c
> @@ -393,6 +393,7 @@ static void test_aio_external_client(void)
>              aio_enable_external(ctx);
>          }
>          assert(aio_poll(ctx, false));
> +        set_event_notifier(ctx, &data.e, NULL);
>          event_notifier_cleanup(&data.e);
>      }
>  }
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] tests/Makefile: Add more dependencies for test-timed-average
  2015-11-23 14:46   ` Paolo Bonzini
@ 2015-11-23 16:09     ` Kevin Wolf
  2015-11-23 16:55       ` Paolo Bonzini
  0 siblings, 1 reply; 8+ messages in thread
From: Kevin Wolf @ 2015-11-23 16:09 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: famz, qemu-devel, stefanha

Am 23.11.2015 um 15:46 hat Paolo Bonzini geschrieben:
> On 23/11/2015 13:39, Kevin Wolf wrote:
> >  tests/test-timed-average$(EXESUF): tests/test-timed-average.o qemu-timer.o \
> >  	libqemuutil.a stubs/clock-warp.o stubs/cpu-get-icount.o \
> > -	stubs/notify-event.o stubs/replay.o
> > +	stubs/notify-event.o stubs/replay.o stubs/mon-is-qmp.o stubs/fd-register.o \
> > +	stubs/mon-printf.o
> >  
> 
> Why not just add libqemustub.a?  (If it works, do not even bother
> reposting).

Didn't remember that that's a thing and didn't check because the rule
already pulled in a few stubs manually. I'll go with the version below
then. (And given that you only gave an R-b, I guess I should take this
through my tree?)

Kevin


diff --git a/tests/Makefile b/tests/Makefile
index b937984..0ef00a1 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -415,8 +415,7 @@ tests/test-vmstate$(EXESUF): tests/test-vmstate.o \
         migration/qemu-file-unix.o qjson.o \
        $(test-qom-obj-y)
 tests/test-timed-average$(EXESUF): tests/test-timed-average.o qemu-timer.o \
-       libqemuutil.a stubs/clock-warp.o stubs/cpu-get-icount.o \
-       stubs/notify-event.o stubs/replay.o
+       $(test-util-obj-y)
 
 tests/test-qapi-types.c tests/test-qapi-types.h :\
 $(SRC_PATH)/tests/qapi-schema/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] tests/Makefile: Add more dependencies for test-timed-average
  2015-11-23 16:09     ` Kevin Wolf
@ 2015-11-23 16:55       ` Paolo Bonzini
  0 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2015-11-23 16:55 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: famz, qemu-devel, stefanha



On 23/11/2015 17:09, Kevin Wolf wrote:
> Am 23.11.2015 um 15:46 hat Paolo Bonzini geschrieben:
>> On 23/11/2015 13:39, Kevin Wolf wrote:
>>>  tests/test-timed-average$(EXESUF): tests/test-timed-average.o qemu-timer.o \
>>>  	libqemuutil.a stubs/clock-warp.o stubs/cpu-get-icount.o \
>>> -	stubs/notify-event.o stubs/replay.o
>>> +	stubs/notify-event.o stubs/replay.o stubs/mon-is-qmp.o stubs/fd-register.o \
>>> +	stubs/mon-printf.o
>>>  
>>
>> Why not just add libqemustub.a?  (If it works, do not even bother
>> reposting).
> 
> Didn't remember that that's a thing and didn't check because the rule
> already pulled in a few stubs manually. I'll go with the version below
> then. (And given that you only gave an R-b, I guess I should take this
> through my tree?)

Yes please, they are block layer tests.

Paolo

> Kevin
> 
> 
> diff --git a/tests/Makefile b/tests/Makefile
> index b937984..0ef00a1 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -415,8 +415,7 @@ tests/test-vmstate$(EXESUF): tests/test-vmstate.o \
>          migration/qemu-file-unix.o qjson.o \
>         $(test-qom-obj-y)
>  tests/test-timed-average$(EXESUF): tests/test-timed-average.o qemu-timer.o \
> -       libqemuutil.a stubs/clock-warp.o stubs/cpu-get-icount.o \
> -       stubs/notify-event.o stubs/replay.o
> +       $(test-util-obj-y)
>  
>  tests/test-qapi-types.c tests/test-qapi-types.h :\
>  $(SRC_PATH)/tests/qapi-schema/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.5 0/2] Fix "make check" with mingw and Wine
  2015-11-23 12:39 [Qemu-devel] [PATCH for-2.5 0/2] Fix "make check" with mingw and Wine Kevin Wolf
  2015-11-23 12:39 ` [Qemu-devel] [PATCH 1/2] tests/Makefile: Add more dependencies for test-timed-average Kevin Wolf
  2015-11-23 12:39 ` [Qemu-devel] [PATCH 2/2] test-aio: Fix event notifier cleanup Kevin Wolf
@ 2015-11-24  5:57 ` Stefan Hajnoczi
  2 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2015-11-24  5:57 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: pbonzini, famz, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 578 bytes --]

On Mon, Nov 23, 2015 at 01:39:04PM +0100, Kevin Wolf wrote:
> I tried to run "make check" on my mingw build and got two failures. Both of
> them are bugs in the test suite rather than qemu proper. They are easy enough
> to fix, so here are the fixes.
> 
> Kevin Wolf (2):
>   tests/Makefile: Add more dependencies for test-timed-average
>   test-aio: Fix event notifier cleanup
> 
>  tests/Makefile   | 3 ++-
>  tests/test-aio.c | 1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> -- 
> 1.8.3.1
> 

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-11-24  5:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-23 12:39 [Qemu-devel] [PATCH for-2.5 0/2] Fix "make check" with mingw and Wine Kevin Wolf
2015-11-23 12:39 ` [Qemu-devel] [PATCH 1/2] tests/Makefile: Add more dependencies for test-timed-average Kevin Wolf
2015-11-23 14:46   ` Paolo Bonzini
2015-11-23 16:09     ` Kevin Wolf
2015-11-23 16:55       ` Paolo Bonzini
2015-11-23 12:39 ` [Qemu-devel] [PATCH 2/2] test-aio: Fix event notifier cleanup Kevin Wolf
2015-11-23 14:46   ` Paolo Bonzini
2015-11-24  5:57 ` [Qemu-devel] [PATCH for-2.5 0/2] Fix "make check" with mingw and Wine Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.