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

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

 tests/Makefile | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

-- 
1.8.5.3

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

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

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

* [Qemu-devel] [PATCH v2 2/2] tests: correctly skip qtest on non-POSIX hosts
  2014-03-27 14:28 [Qemu-devel] [PATCH v2 0/2] tests: mingw32 make check fixes Stefan Hajnoczi
  2014-03-27 14:28 ` [Qemu-devel] [PATCH v2 1/2] tests: skip POSIX-only tests on Windows Stefan Hajnoczi
@ 2014-03-27 14:28 ` Stefan Hajnoczi
  2014-03-27 21:41   ` Stefan Weil
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Hajnoczi @ 2014-03-27 14:28 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.  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 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/Makefile b/tests/Makefile
index 803c8e6..679cfbc 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] 5+ messages in thread

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

Am 27.03.2014 15:28, schrieb Stefan Hajnoczi:
> 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

Hi Stefan,

can you add
http://repo.or.cz/w/qemu/ar7.git/patch/1df736569169f20ae27a62ecd786a61fbd43d7cd
to your series instead of removing test-aio for Windows?

For the rest:

Reviewed-by: Stefan Weil <sw@weilnetz.de>

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

* Re: [Qemu-devel] [PATCH v2 2/2] tests: correctly skip qtest on non-POSIX hosts
  2014-03-27 14:28 ` [Qemu-devel] [PATCH v2 2/2] tests: correctly skip qtest on non-POSIX hosts Stefan Hajnoczi
@ 2014-03-27 21:41   ` Stefan Weil
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Weil @ 2014-03-27 21:41 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel; +Cc: Paolo Bonzini, Andreas Faerber

Am 27.03.2014 15:28, 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

That causes targets ... ?

> 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 803c8e6..679cfbc 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))

I'd keep this line unmodified after the endif, but that's just my
personal style preference.

> +endif
>  
>  qtest-obj-y = tests/libqtest.o libqemuutil.a libqemustub.a
>  $(check-qtest-y): $(qtest-obj-y)
> 

My own patch also works because CONFIG_POSIX is undefined for Windows:
http://repo.or.cz/w/qemu/ar7.git/patch/fb8019dc75641ce7b35d40d4836663acb9c17b8b

Reviewed-by: Stefan Weil <sw@weilnetz.de>

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

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-27 14:28 [Qemu-devel] [PATCH v2 0/2] tests: mingw32 make check fixes Stefan Hajnoczi
2014-03-27 14:28 ` [Qemu-devel] [PATCH v2 1/2] tests: skip POSIX-only tests on Windows Stefan Hajnoczi
2014-03-27 21:29   ` Stefan Weil
2014-03-27 14:28 ` [Qemu-devel] [PATCH v2 2/2] tests: correctly skip qtest on non-POSIX hosts Stefan Hajnoczi
2014-03-27 21:41   ` Stefan Weil

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