qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] tests: mingw32 make check fixes
@ 2014-03-27 11:11 Stefan Hajnoczi
  2014-03-27 11:11 ` [Qemu-devel] [PATCH 1/2] tests: skip POSIX-only tests on Windows Stefan Hajnoczi
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2014-03-27 11:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Andreas Faerber, Stefan Hajnoczi, Stefan Weil

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

 tests/Makefile | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

-- 
1.8.5.3

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

* [Qemu-devel] [PATCH 1/2] tests: skip POSIX-only tests on Windows
  2014-03-27 11:11 [Qemu-devel] [PATCH 0/2] tests: mingw32 make check fixes Stefan Hajnoczi
@ 2014-03-27 11:11 ` Stefan Hajnoczi
  2014-03-27 11:53   ` Paolo Bonzini
  2014-03-27 11:11 ` [Qemu-devel] [PATCH 2/2] tests: correctly skip qtest on non-POSIX hosts Stefan Hajnoczi
  2014-03-27 11:14 ` [Qemu-devel] [PATCH 0/2] tests: mingw32 make check fixes Stefan Hajnoczi
  2 siblings, 1 reply; 9+ messages in thread
From: Stefan Hajnoczi @ 2014-03-27 11:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Andreas Faerber, Stefan Hajnoczi, Stefan Weil

test-aio, 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 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile
index 2d021fb..803c8e6 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -34,8 +34,8 @@ gcov-files-test-coroutine-y = coroutine-$(CONFIG_COROUTINE_BACKEND).c
 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-aio$(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] 9+ messages in thread

* [Qemu-devel] [PATCH 2/2] tests: correctly skip qtest on non-POSIX hosts
  2014-03-27 11:11 [Qemu-devel] [PATCH 0/2] tests: mingw32 make check fixes Stefan Hajnoczi
  2014-03-27 11:11 ` [Qemu-devel] [PATCH 1/2] tests: skip POSIX-only tests on Windows Stefan Hajnoczi
@ 2014-03-27 11:11 ` Stefan Hajnoczi
  2014-03-27 12:22   ` Andreas Färber
  2014-03-27 11:14 ` [Qemu-devel] [PATCH 0/2] tests: mingw32 make check fixes Stefan Hajnoczi
  2 siblings, 1 reply; 9+ messages in thread
From: Stefan Hajnoczi @ 2014-03-27 11:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Andreas Faerber, Stefan Hajnoczi, Stefan Weil

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.  The causes 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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/Makefile b/tests/Makefile
index 803c8e6..e1960c1 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -277,7 +277,8 @@ tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_hel
 # QTest rules
 
 TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS)))
-QTEST_TARGETS=$(foreach TARGET,$(TARGETS), $(if $(check-qtest-$(TARGET)-y), $(TARGET),))
+QTEST_TARGETS=$(foreach TARGET,$(TARGETS), \
+                $(if $(check-qtest-$(TARGET)-$(CONFIG_POSIX)), $(TARGET),))
 check-qtest-$(CONFIG_POSIX)=$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y))
 
 qtest-obj-y = tests/libqtest.o libqemuutil.a libqemustub.a
-- 
1.8.5.3

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

* Re: [Qemu-devel] [PATCH 0/2] tests: mingw32 make check fixes
  2014-03-27 11:11 [Qemu-devel] [PATCH 0/2] tests: mingw32 make check fixes Stefan Hajnoczi
  2014-03-27 11:11 ` [Qemu-devel] [PATCH 1/2] tests: skip POSIX-only tests on Windows Stefan Hajnoczi
  2014-03-27 11:11 ` [Qemu-devel] [PATCH 2/2] tests: correctly skip qtest on non-POSIX hosts Stefan Hajnoczi
@ 2014-03-27 11:14 ` Stefan Hajnoczi
  2 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2014-03-27 11:14 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Paolo Bonzini, Stefan Weil, qemu-devel, Andreas Faerber

On Thu, Mar 27, 2014 at 12:11 PM, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> 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
>
>  tests/Makefile | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)

Forgot to mark this for-2.0.

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

* Re: [Qemu-devel] [PATCH 1/2] tests: skip POSIX-only tests on Windows
  2014-03-27 11:11 ` [Qemu-devel] [PATCH 1/2] tests: skip POSIX-only tests on Windows Stefan Hajnoczi
@ 2014-03-27 11:53   ` Paolo Bonzini
  2014-03-27 14:01     ` Stefan Hajnoczi
  2014-03-27 21:21     ` Stefan Weil
  0 siblings, 2 replies; 9+ messages in thread
From: Paolo Bonzini @ 2014-03-27 11:53 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel; +Cc: Stefan Weil, Andreas Faerber

Il 27/03/2014 12:11, Stefan Hajnoczi ha scritto:
> test-aio, test-rfifolock, and test-vmstate only build on POSIX hosts.

test-aio should build on Win32.  Can be fixed in 2.1 though.

Paolo

> Exclude them if building for Windows.
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  tests/Makefile | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/Makefile b/tests/Makefile
> index 2d021fb..803c8e6 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -34,8 +34,8 @@ gcov-files-test-coroutine-y = coroutine-$(CONFIG_COROUTINE_BACKEND).c
>  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-aio$(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
>
>

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

* Re: [Qemu-devel] [PATCH 2/2] tests: correctly skip qtest on non-POSIX hosts
  2014-03-27 11:11 ` [Qemu-devel] [PATCH 2/2] tests: correctly skip qtest on non-POSIX hosts Stefan Hajnoczi
@ 2014-03-27 12:22   ` Andreas Färber
  0 siblings, 0 replies; 9+ messages in thread
From: Andreas Färber @ 2014-03-27 12:22 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel; +Cc: Paolo Bonzini, Stefan Weil

Am 27.03.2014 12:11, schrieb Stefan Hajnoczi:
> 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.  The causes 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 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/Makefile b/tests/Makefile
> index 803c8e6..e1960c1 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -277,7 +277,8 @@ tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_hel
>  # QTest rules
>  
>  TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS)))
> -QTEST_TARGETS=$(foreach TARGET,$(TARGETS), $(if $(check-qtest-$(TARGET)-y), $(TARGET),))
> +QTEST_TARGETS=$(foreach TARGET,$(TARGETS), \
> +                $(if $(check-qtest-$(TARGET)-$(CONFIG_POSIX)), $(TARGET),))

This strikes me as wrong. Essentially this is working around the fact
that tests get added to -y although they should've been added for
$(CONFIG_POSIX) only. I have a patch pending that adds a virtio-9p
qtest, which is conditional on having the three ugly conditions evaluate
to y, and otherwise will evaluate to -n. So this new query would
actually find a non-empty -n variable on !CONFIG_POSIX and would still
add the target to QTEST_TARGETS.

My suggestion would be to simply put this line into ifeq
($(CONFIG_POSIX),y) to keep the logic simple and safe.

Regards,
Andreas

>  check-qtest-$(CONFIG_POSIX)=$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y))
>  
>  qtest-obj-y = tests/libqtest.o libqemuutil.a libqemustub.a

-- 
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] 9+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] tests: skip POSIX-only tests on Windows
  2014-03-27 11:53   ` Paolo Bonzini
@ 2014-03-27 14:01     ` Stefan Hajnoczi
  2014-03-27 14:07       ` Andreas Färber
  2014-03-27 21:21     ` Stefan Weil
  1 sibling, 1 reply; 9+ messages in thread
From: Stefan Hajnoczi @ 2014-03-27 14:01 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi, Andreas Faerber

On Thu, Mar 27, 2014 at 12:53 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 27/03/2014 12:11, Stefan Hajnoczi ha scritto:
>
>> test-aio, test-rfifolock, and test-vmstate only build on POSIX hosts.
>
>
> test-aio should build on Win32.  Can be fixed in 2.1 though.

Yes, we may be able to make the tests support Windows.  test-aio was
broken due to qemu_pipe() usage.

If anyone wants to make the tests build on Windows for 2.1, great.

Stefan

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

* Re: [Qemu-devel] [PATCH 1/2] tests: skip POSIX-only tests on Windows
  2014-03-27 14:01     ` Stefan Hajnoczi
@ 2014-03-27 14:07       ` Andreas Färber
  0 siblings, 0 replies; 9+ messages in thread
From: Andreas Färber @ 2014-03-27 14:07 UTC (permalink / raw)
  To: Stefan Hajnoczi, Paolo Bonzini; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi

Am 27.03.2014 15:01, schrieb Stefan Hajnoczi:
> On Thu, Mar 27, 2014 at 12:53 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> Il 27/03/2014 12:11, Stefan Hajnoczi ha scritto:
>>
>>> test-aio, test-rfifolock, and test-vmstate only build on POSIX hosts.
>>
>>
>> test-aio should build on Win32.  Can be fixed in 2.1 though.
> 
> Yes, we may be able to make the tests support Windows.  test-aio was
> broken due to qemu_pipe() usage.
> 
> If anyone wants to make the tests build on Windows for 2.1, great.

...or 2.0 for that matter, but unless that happens I intend to queue
this patch. :)

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] 9+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] tests: skip POSIX-only tests on Windows
  2014-03-27 11:53   ` Paolo Bonzini
  2014-03-27 14:01     ` Stefan Hajnoczi
@ 2014-03-27 21:21     ` Stefan Weil
  1 sibling, 0 replies; 9+ messages in thread
From: Stefan Weil @ 2014-03-27 21:21 UTC (permalink / raw)
  To: Paolo Bonzini, Stefan Hajnoczi, qemu-devel; +Cc: Andreas Faerber

Am 27.03.2014 12:53, schrieb Paolo Bonzini:
> Il 27/03/2014 12:11, Stefan Hajnoczi ha scritto:
>> test-aio, test-rfifolock, and test-vmstate only build on POSIX hosts.
> 
> test-aio should build on Win32.  Can be fixed in 2.1 though.
> 
> Paolo
> 

The modifications for tests-aio.c are trivial: conditionally remove
test_timer_schedule, test_source_timer_schedule and all related code.

Here is a patch which does this:

http://repo.or.cz/w/qemu/ar7.git/commit/1df736569169f20ae27a62ecd786a61fbd43d7cd

Regards
Stefan

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

end of thread, other threads:[~2014-03-27 21:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-27 11:11 [Qemu-devel] [PATCH 0/2] tests: mingw32 make check fixes Stefan Hajnoczi
2014-03-27 11:11 ` [Qemu-devel] [PATCH 1/2] tests: skip POSIX-only tests on Windows Stefan Hajnoczi
2014-03-27 11:53   ` Paolo Bonzini
2014-03-27 14:01     ` Stefan Hajnoczi
2014-03-27 14:07       ` Andreas Färber
2014-03-27 21:21     ` Stefan Weil
2014-03-27 11:11 ` [Qemu-devel] [PATCH 2/2] tests: correctly skip qtest on non-POSIX hosts Stefan Hajnoczi
2014-03-27 12:22   ` Andreas Färber
2014-03-27 11:14 ` [Qemu-devel] [PATCH 0/2] tests: mingw32 make check fixes Stefan Hajnoczi

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