Skip to contentSkip to conversation

Fix "make check" with mingw and Wine

PATCH In review Kevin Wolf 3 participants 8 messages Nov 23, 2015 – Nov 24, 2015

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

cover Fix "make check" with mingw and Wine

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(-)
Signature · 1 line
1.8.3.1
author
#1 lore raw

PATCH 1/2 tests/Makefile: Add more dependencies for test-timed-average

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

---
 tests/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/Makefile +2 -1
index b937984..47fe5d5 100644
@@ -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)
Signature · 1 line
1.8.3.1
#2 lore raw

Re: [Qemu-devel] [PATCH 1/2] tests/Makefile: Add more dependencies for test-timed-average

tests/Makefile tests/test-vmstate$(EXESUF): tests/test-vmstate.o \ · line 420

Quoted 6 lines · Kevin Wolf

tests/test-timed-average$(EXESUF): tests/test-timed-average.o qemu-timer.o \

tests/Makefile +2 -1
 	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

author
#3 lore raw

Re: [Qemu-devel] [PATCH 1/2] tests/Makefile: Add more dependencies for test-timed-average

Am 23.11.2015 um 15:46 hat Paolo Bonzini geschrieben:

Quoted 10 lines · Kevin Wolf

Review

Quoted 6 lines

tests/test-timed-average$(EXESUF): tests/test-timed-average.o qemu-timer.o \

(quoted diff) +2 -1
 	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

tests/Makefile +1 -2
index b937984..0ef00a1 100644
@@ -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)
#4 lore raw

Re: [Qemu-devel] [PATCH 1/2] tests/Makefile: Add more dependencies for test-timed-average

Quoted 12 lines · Kevin Wolf

Am 23.11.2015 um 15:46 hat Paolo Bonzini geschrieben:

Quoted 10 lines · Kevin Wolf

Review

Quoted 6 lines

tests/test-timed-average$(EXESUF): tests/test-timed-average.o qemu-timer.o \

(quoted diff) +2 -1
 	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).

Quoted 4 lines

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

Quoted 18 lines

Kevin

tests/Makefile +1 -2
index b937984..0ef00a1 100644
@@ -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)
author
#5 lore raw

PATCH 2/2 test-aio: Fix event notifier cleanup

In reply to Kevin Wolf

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).

---
 tests/test-aio.c | 1 +
 1 file changed, 1 insertion(+)
tests/test-aio.c +1 -0
index 1623803..e188d8c 100644
@@ -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);
     }
 }
Signature · 1 line
1.8.3.1
Reviewed-by on v1 2/2
#6 lore raw

Re: [Qemu-devel] [PATCH 2/2] test-aio: Fix event notifier cleanup

Quoted 17 lines · Kevin Wolf

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).

---
 tests/test-aio.c | 1 +
 1 file changed, 1 insertion(+)
tests/test-aio.c +0 -0
index 1623803..e188d8c 100644

tests/test-aio.c static void test_aio_external_client(void) · line 399

Quoted 7 lines
tests/test-aio.c +1 -0
@@ -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 on the v1 series
#7 lore raw
In reply to Kevin Wolf
Quoted 4 lines · Kevin Wolf

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.

Quoted 11 lines

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(-)
Signature · 1 line
1.8.3.1