diff mbox

[1/2] tests: skip POSIX-only tests on Windows

Message ID 1395918686-27043-2-git-send-email-stefanha@redhat.com
State New
Headers show

Commit Message

Stefan Hajnoczi March 27, 2014, 11:11 a.m. UTC
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(-)

Comments

Paolo Bonzini March 27, 2014, 11:53 a.m. UTC | #1
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
>
>
Stefan Hajnoczi March 27, 2014, 2:01 p.m. UTC | #2
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
Andreas Färber March 27, 2014, 2:07 p.m. UTC | #3
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
Stefan Weil March 27, 2014, 9:21 p.m. UTC | #4
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
diff mbox

Patch

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