Fix "make check" with mingw and Wine
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
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
@@ -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
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.oqemu-timer.o \tests/Makefile +2
-1libqemuutil.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
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.oqemu-timer.o \(quoted diff) +2
-1libqemuutil.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.oWhy 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
@@ -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)
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.oqemu-timer.o \(quoted diff) +2
-1libqemuutil.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.oWhy 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@@ -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)
PATCH 2/2 test-aio: Fix event notifier cleanup
In reply to Kevin WolfOne 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
@@ -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
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 subsequentWaitForMultipleObjects()call, causing the function to fail (invalid handle).Signed-off-by Kevin Wolf <[email protected]>--- tests/test-aio.c | 1 + 1 file changed, 1 insertion(+)tests/test-aio.c +0
-0
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); } }
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 cleanuptests/Makefile | 3 ++- tests/test-aio.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)Signature · 1 line
1.8.3.1