* [Qemu-devel] [PATCH v3 0/3] tests: mingw32 make check fixes
@ 2014-03-28 9:55 Stefan Hajnoczi
2014-03-28 9:55 ` [Qemu-devel] [PATCH v3 1/3] tests: Remove unsupported tests for MinGW Stefan Hajnoczi
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2014-03-28 9:55 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Andreas Faerber, Stefan Hajnoczi, sw
v3:
* Add Stefan Weil's test-aio fix patch [Stefan Weil]
* Patch 3 commit description s/The causes targets/This causes make targets/ [Stefan Weil]
v2:
* Use ifeq instead of using *-n [Andreas]
make check is broken on mingw32 builds because we the CONFIG_POSIX checks are
outdated. This series fixes them.
It should make the buildbot happy again for mingw32 where we fail make check:
http://buildbot.b1-systems.de/qemu/builders
Stefan Hajnoczi (2):
tests: skip POSIX-only tests on Windows
tests: correctly skip qtest on non-POSIX hosts
Stefan Weil (1):
tests: Remove unsupported tests for MinGW
tests/Makefile | 8 +++++---
tests/test-aio.c | 16 ++++++++++++++++
2 files changed, 21 insertions(+), 3 deletions(-)
--
1.8.5.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH v3 1/3] tests: Remove unsupported tests for MinGW
2014-03-28 9:55 [Qemu-devel] [PATCH v3 0/3] tests: mingw32 make check fixes Stefan Hajnoczi
@ 2014-03-28 9:55 ` Stefan Hajnoczi
2014-03-28 9:55 ` [Qemu-devel] [PATCH v3 2/3] tests: skip POSIX-only tests on Windows Stefan Hajnoczi
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2014-03-28 9:55 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Andreas Faerber, Stefan Hajnoczi, sw
From: Stefan Weil <sw@weilnetz.de>
test_timer_schedule and test_source_timer_schedule don't compile for MinGW
because some functions are not implemented for MinGW (qemu_pipe,
aio_set_fd_handler).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
tests/test-aio.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tests/test-aio.c b/tests/test-aio.c
index 56f4288..e5f8b55 100644
--- a/tests/test-aio.c
+++ b/tests/test-aio.c
@@ -65,6 +65,8 @@ static void bh_test_cb(void *opaque)
}
}
+#if !defined(_WIN32)
+
static void timer_test_cb(void *opaque)
{
TimerTestData *data = opaque;
@@ -78,6 +80,8 @@ static void dummy_io_handler_read(void *opaque)
{
}
+#endif /* !_WIN32 */
+
static void bh_delete_cb(void *opaque)
{
BHTestData *data = opaque;
@@ -423,6 +427,8 @@ static void test_wait_event_notifier_noflush(void)
event_notifier_cleanup(&data.e);
}
+#if !defined(_WIN32)
+
static void test_timer_schedule(void)
{
TimerTestData data = { .n = 0, .ctx = ctx, .ns = SCALE_MS * 750LL,
@@ -484,6 +490,8 @@ static void test_timer_schedule(void)
timer_del(&data.timer);
}
+#endif /* !_WIN32 */
+
/* Now the same tests, using the context as a GSource. They are
* very similar to the ones above, with g_main_context_iteration
* replacing aio_poll. However:
@@ -766,6 +774,8 @@ static void test_source_wait_event_notifier_noflush(void)
event_notifier_cleanup(&data.e);
}
+#if !defined(_WIN32)
+
static void test_source_timer_schedule(void)
{
TimerTestData data = { .n = 0, .ctx = ctx, .ns = SCALE_MS * 750LL,
@@ -815,6 +825,8 @@ static void test_source_timer_schedule(void)
timer_del(&data.timer);
}
+#endif /* !_WIN32 */
+
/* End of tests. */
@@ -845,7 +857,9 @@ int main(int argc, char **argv)
g_test_add_func("/aio/event/wait", test_wait_event_notifier);
g_test_add_func("/aio/event/wait/no-flush-cb", test_wait_event_notifier_noflush);
g_test_add_func("/aio/event/flush", test_flush_event_notifier);
+#if !defined(_WIN32)
g_test_add_func("/aio/timer/schedule", test_timer_schedule);
+#endif
g_test_add_func("/aio-gsource/notify", test_source_notify);
g_test_add_func("/aio-gsource/flush", test_source_flush);
@@ -860,6 +874,8 @@ int main(int argc, char **argv)
g_test_add_func("/aio-gsource/event/wait", test_source_wait_event_notifier);
g_test_add_func("/aio-gsource/event/wait/no-flush-cb", test_source_wait_event_notifier_noflush);
g_test_add_func("/aio-gsource/event/flush", test_source_flush_event_notifier);
+#if !defined(_WIN32)
g_test_add_func("/aio-gsource/timer/schedule", test_source_timer_schedule);
+#endif
return g_test_run();
}
--
1.8.5.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH v3 2/3] tests: skip POSIX-only tests on Windows
2014-03-28 9:55 [Qemu-devel] [PATCH v3 0/3] tests: mingw32 make check fixes Stefan Hajnoczi
2014-03-28 9:55 ` [Qemu-devel] [PATCH v3 1/3] tests: Remove unsupported tests for MinGW Stefan Hajnoczi
@ 2014-03-28 9:55 ` Stefan Hajnoczi
2014-03-28 18:21 ` Stefan Weil
2014-03-28 9:55 ` [Qemu-devel] [PATCH v3 3/3] tests: correctly skip qtest on non-POSIX hosts Stefan Hajnoczi
2014-03-31 7:26 ` [Qemu-devel] [PATCH v3 0/3] tests: mingw32 make check fixes Stefan Hajnoczi
3 siblings, 1 reply; 8+ messages in thread
From: Stefan Hajnoczi @ 2014-03-28 9:55 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Andreas Faerber, Stefan Hajnoczi, sw
test-rfifolock and test-vmstate only build on POSIX hosts. Exclude them
if building for Windows.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
tests/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/Makefile b/tests/Makefile
index 2d021fb..ef286e7 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -35,7 +35,7 @@ check-unit-y += tests/test-visitor-serialization$(EXESUF)
check-unit-y += tests/test-iov$(EXESUF)
gcov-files-test-iov-y = util/iov.c
check-unit-y += tests/test-aio$(EXESUF)
-check-unit-y += tests/test-rfifolock$(EXESUF)
+check-unit-$(CONFIG_POSIX) += tests/test-rfifolock$(EXESUF)
check-unit-y += tests/test-throttle$(EXESUF)
gcov-files-test-aio-$(CONFIG_WIN32) = aio-win32.c
gcov-files-test-aio-$(CONFIG_POSIX) = aio-posix.c
@@ -59,7 +59,7 @@ check-unit-y += tests/test-bitops$(EXESUF)
check-unit-y += tests/test-qdev-global-props$(EXESUF)
check-unit-y += tests/check-qom-interface$(EXESUF)
gcov-files-check-qom-interface-y = qom/object.c
-check-unit-y += tests/test-vmstate$(EXESUF)
+check-unit-$(CONFIG_POSIX) += tests/test-vmstate$(EXESUF)
check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
--
1.8.5.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH v3 3/3] tests: correctly skip qtest on non-POSIX hosts
2014-03-28 9:55 [Qemu-devel] [PATCH v3 0/3] tests: mingw32 make check fixes Stefan Hajnoczi
2014-03-28 9:55 ` [Qemu-devel] [PATCH v3 1/3] tests: Remove unsupported tests for MinGW Stefan Hajnoczi
2014-03-28 9:55 ` [Qemu-devel] [PATCH v3 2/3] tests: skip POSIX-only tests on Windows Stefan Hajnoczi
@ 2014-03-28 9:55 ` Stefan Hajnoczi
2014-03-31 7:26 ` [Qemu-devel] [PATCH v3 0/3] tests: mingw32 make check fixes Stefan Hajnoczi
3 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2014-03-28 9:55 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Andreas Faerber, Stefan Hajnoczi, sw
qtest test cases only work on POSIX hosts. The following line only
defines dependencies for qtest binaries on POSIX hosts:
check-qtest-$(CONFIG_POSIX)=$(foreach TARGET,$(TARGETS),$(check-qtest-$(TARGET)-y))
But the QTEST_TARGETS definition earlier in the Makefile fails to check
CONFIG_POSIX. This causes make targets to be generated for qtest test
cases even though we don't know how to build the binaries.
The following error message is printed when trying to run gtester on a
binary that was never built:
GLib-WARNING **: Failed to execute test binary: tests/endianness-test.exe: Failed to execute child process "tests/endianness-test.exe" (No such file or directory)
This patch makes QTEST_TARGETS empty on non-POSIX hosts. This prevents
the targets from being generated.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
tests/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/Makefile b/tests/Makefile
index ef286e7..0e3eb44 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -277,8 +277,10 @@ tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_hel
# QTest rules
TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS)))
+ifeq ($(CONFIG_POSIX),y)
QTEST_TARGETS=$(foreach TARGET,$(TARGETS), $(if $(check-qtest-$(TARGET)-y), $(TARGET),))
-check-qtest-$(CONFIG_POSIX)=$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y))
+check-qtest-y=$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y))
+endif
qtest-obj-y = tests/libqtest.o libqemuutil.a libqemustub.a
$(check-qtest-y): $(qtest-obj-y)
--
1.8.5.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH v3 2/3] tests: skip POSIX-only tests on Windows
2014-03-28 9:55 ` [Qemu-devel] [PATCH v3 2/3] tests: skip POSIX-only tests on Windows Stefan Hajnoczi
@ 2014-03-28 18:21 ` Stefan Weil
0 siblings, 0 replies; 8+ messages in thread
From: Stefan Weil @ 2014-03-28 18:21 UTC (permalink / raw)
To: Stefan Hajnoczi, qemu-devel; +Cc: Paolo Bonzini, Andreas Faerber
Am 28.03.2014 10:55, schrieb Stefan Hajnoczi:
> test-rfifolock and test-vmstate only build on POSIX hosts. Exclude them
> if building for Windows.
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> tests/Makefile | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/Makefile b/tests/Makefile
> index 2d021fb..ef286e7 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -35,7 +35,7 @@ check-unit-y += tests/test-visitor-serialization$(EXESUF)
> check-unit-y += tests/test-iov$(EXESUF)
> gcov-files-test-iov-y = util/iov.c
> check-unit-y += tests/test-aio$(EXESUF)
> -check-unit-y += tests/test-rfifolock$(EXESUF)
> +check-unit-$(CONFIG_POSIX) += tests/test-rfifolock$(EXESUF)
> check-unit-y += tests/test-throttle$(EXESUF)
> gcov-files-test-aio-$(CONFIG_WIN32) = aio-win32.c
> gcov-files-test-aio-$(CONFIG_POSIX) = aio-posix.c
> @@ -59,7 +59,7 @@ check-unit-y += tests/test-bitops$(EXESUF)
> check-unit-y += tests/test-qdev-global-props$(EXESUF)
> check-unit-y += tests/check-qom-interface$(EXESUF)
> gcov-files-check-qom-interface-y = qom/object.c
> -check-unit-y += tests/test-vmstate$(EXESUF)
> +check-unit-$(CONFIG_POSIX) += tests/test-vmstate$(EXESUF)
>
> check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
Thanks.
Reviewed-by: Stefan Weil <sw@weilnetz.de>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH v3 0/3] tests: mingw32 make check fixes
2014-03-28 9:55 [Qemu-devel] [PATCH v3 0/3] tests: mingw32 make check fixes Stefan Hajnoczi
` (2 preceding siblings ...)
2014-03-28 9:55 ` [Qemu-devel] [PATCH v3 3/3] tests: correctly skip qtest on non-POSIX hosts Stefan Hajnoczi
@ 2014-03-31 7:26 ` Stefan Hajnoczi
2014-03-31 8:04 ` Andreas Färber
3 siblings, 1 reply; 8+ messages in thread
From: Stefan Hajnoczi @ 2014-03-31 7:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Andreas Faerber, sw
On Fri, Mar 28, 2014 at 10:55:51AM +0100, Stefan Hajnoczi wrote:
> v3:
> * Add Stefan Weil's test-aio fix patch [Stefan Weil]
> * Patch 3 commit description s/The causes targets/This causes make targets/ [Stefan Weil]
>
> v2:
> * Use ifeq instead of using *-n [Andreas]
>
> make check is broken on mingw32 builds because we the CONFIG_POSIX checks are
> outdated. This series fixes them.
>
> It should make the buildbot happy again for mingw32 where we fail make check:
> http://buildbot.b1-systems.de/qemu/builders
>
> Stefan Hajnoczi (2):
> tests: skip POSIX-only tests on Windows
> tests: correctly skip qtest on non-POSIX hosts
>
> Stefan Weil (1):
> tests: Remove unsupported tests for MinGW
>
> tests/Makefile | 8 +++++---
> tests/test-aio.c | 16 ++++++++++++++++
> 2 files changed, 21 insertions(+), 3 deletions(-)
Andreas: Can you take this series or should I send a pull request?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH v3 0/3] tests: mingw32 make check fixes
2014-03-31 7:26 ` [Qemu-devel] [PATCH v3 0/3] tests: mingw32 make check fixes Stefan Hajnoczi
@ 2014-03-31 8:04 ` Andreas Färber
2014-03-31 20:25 ` Andreas Färber
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Färber @ 2014-03-31 8:04 UTC (permalink / raw)
To: Stefan Hajnoczi, qemu-devel; +Cc: Paolo Bonzini, sw
Am 31.03.2014 09:26, schrieb Stefan Hajnoczi:
> On Fri, Mar 28, 2014 at 10:55:51AM +0100, Stefan Hajnoczi wrote:
>> v3:
>> * Add Stefan Weil's test-aio fix patch [Stefan Weil]
>> * Patch 3 commit description s/The causes targets/This causes make targets/ [Stefan Weil]
>>
>> v2:
>> * Use ifeq instead of using *-n [Andreas]
>>
>> make check is broken on mingw32 builds because we the CONFIG_POSIX checks are
>> outdated. This series fixes them.
>>
>> It should make the buildbot happy again for mingw32 where we fail make check:
>> http://buildbot.b1-systems.de/qemu/builders
>>
>> Stefan Hajnoczi (2):
>> tests: skip POSIX-only tests on Windows
>> tests: correctly skip qtest on non-POSIX hosts
>>
>> Stefan Weil (1):
>> tests: Remove unsupported tests for MinGW
>>
>> tests/Makefile | 8 +++++---
>> tests/test-aio.c | 16 ++++++++++++++++
>> 2 files changed, 21 insertions(+), 3 deletions(-)
>
> Andreas: Can you take this series or should I send a pull request?
I still have v2 on qom-next; I'll exchange them later in the day.
Cheers,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH v3 0/3] tests: mingw32 make check fixes
2014-03-31 8:04 ` Andreas Färber
@ 2014-03-31 20:25 ` Andreas Färber
0 siblings, 0 replies; 8+ messages in thread
From: Andreas Färber @ 2014-03-31 20:25 UTC (permalink / raw)
To: Stefan Hajnoczi, qemu-devel; +Cc: Paolo Bonzini, sw
Am 31.03.2014 10:04, schrieb Andreas Färber:
> Am 31.03.2014 09:26, schrieb Stefan Hajnoczi:
>> On Fri, Mar 28, 2014 at 10:55:51AM +0100, Stefan Hajnoczi wrote:
>>> v3:
>>> * Add Stefan Weil's test-aio fix patch [Stefan Weil]
>>> * Patch 3 commit description s/The causes targets/This causes make targets/ [Stefan Weil]
>>>
>>> v2:
>>> * Use ifeq instead of using *-n [Andreas]
>>>
>>> make check is broken on mingw32 builds because we the CONFIG_POSIX checks are
>>> outdated. This series fixes them.
>>>
>>> It should make the buildbot happy again for mingw32 where we fail make check:
>>> http://buildbot.b1-systems.de/qemu/builders
>>>
>>> Stefan Hajnoczi (2):
>>> tests: skip POSIX-only tests on Windows
>>> tests: correctly skip qtest on non-POSIX hosts
>>>
>>> Stefan Weil (1):
>>> tests: Remove unsupported tests for MinGW
>>>
>>> tests/Makefile | 8 +++++---
>>> tests/test-aio.c | 16 ++++++++++++++++
>>> 2 files changed, 21 insertions(+), 3 deletions(-)
>>
>> Andreas: Can you take this series or should I send a pull request?
>
> I still have v2 on qom-next; I'll exchange them later in the day.
Done: https://github.com/afaerber/qemu-cpu/commits/qom-next
Thanks,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-03-31 20:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-28 9:55 [Qemu-devel] [PATCH v3 0/3] tests: mingw32 make check fixes Stefan Hajnoczi
2014-03-28 9:55 ` [Qemu-devel] [PATCH v3 1/3] tests: Remove unsupported tests for MinGW Stefan Hajnoczi
2014-03-28 9:55 ` [Qemu-devel] [PATCH v3 2/3] tests: skip POSIX-only tests on Windows Stefan Hajnoczi
2014-03-28 18:21 ` Stefan Weil
2014-03-28 9:55 ` [Qemu-devel] [PATCH v3 3/3] tests: correctly skip qtest on non-POSIX hosts Stefan Hajnoczi
2014-03-31 7:26 ` [Qemu-devel] [PATCH v3 0/3] tests: mingw32 make check fixes Stefan Hajnoczi
2014-03-31 8:04 ` Andreas Färber
2014-03-31 20:25 ` Andreas Färber
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).