* [Qemu-devel] [PATCH] tests/Makefile: Run qom-test for every architecture
@ 2014-01-23 16:22 Peter Maydell
2014-02-04 9:16 ` Markus Armbruster
2014-03-31 8:10 ` Andreas Färber
0 siblings, 2 replies; 7+ messages in thread
From: Peter Maydell @ 2014-01-23 16:22 UTC (permalink / raw)
To: qemu-devel; +Cc: Markus Armbruster, Andreas Färber, patches
Rather than requiring every new architecture to remember to add a line
to the Makefile to say that qom-test will work on it, autogenerate
the list of supported architectures by looking at the files in
default-configs (as configure does), and add qom-test to the
test list for all of them automatically.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
Together with Markus' patch for running the test for all known
machines for the architecture, this will avoid the problem of
coverage being missed because of forgetting to update a whitelist.
tests/Makefile | 31 ++++++++-----------------------
1 file changed, 8 insertions(+), 23 deletions(-)
diff --git a/tests/Makefile b/tests/Makefile
index fd36eee..42a52ff 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,5 +1,9 @@
export SRC_PATH
+# Get the list of all supported sysemu targets
+SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
+ $(wildcard $(SRC_PATH)/default-configs/*-softmmu.mak)))
+
check-unit-y = tests/check-qdict$(EXESUF)
gcov-files-check-qdict-y = qobject/qdict.c
check-unit-y += tests/check-qfloat$(EXESUF)
@@ -71,7 +75,6 @@ check-qtest-i386-y += tests/acpi-test$(EXESUF)
check-qtest-i386-y += tests/rtc-test$(EXESUF)
check-qtest-i386-y += tests/i440fx-test$(EXESUF)
check-qtest-i386-y += tests/fw_cfg-test$(EXESUF)
-check-qtest-i386-y += tests/qom-test$(EXESUF)
check-qtest-i386-y += tests/blockdev-test$(EXESUF)
check-qtest-i386-y += tests/qdev-monitor-test$(EXESUF)
check-qtest-x86_64-y = $(check-qtest-i386-y)
@@ -80,44 +83,26 @@ gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y)
check-qtest-mips-y = tests/endianness-test$(EXESUF)
check-qtest-mips64-y = tests/endianness-test$(EXESUF)
check-qtest-mips64el-y = tests/endianness-test$(EXESUF)
-check-qtest-mips-y += tests/qom-test$(EXESUF)
-check-qtest-mipsel-y += tests/qom-test$(EXESUF)
-check-qtest-mips64-y += tests/qom-test$(EXESUF)
-check-qtest-mips64el-y += tests/qom-test$(EXESUF)
check-qtest-ppc-y = tests/endianness-test$(EXESUF)
check-qtest-ppc64-y = tests/endianness-test$(EXESUF)
check-qtest-sh4-y = tests/endianness-test$(EXESUF)
check-qtest-sh4eb-y = tests/endianness-test$(EXESUF)
-check-qtest-sh4-y += tests/qom-test$(EXESUF)
-check-qtest-sh4eb-y += tests/qom-test$(EXESUF)
check-qtest-sparc64-y = tests/endianness-test$(EXESUF)
#check-qtest-sparc-y = tests/m48t59-test$(EXESUF)
#check-qtest-sparc64-y += tests/m48t59-test$(EXESUF)
gcov-files-sparc-y += hw/m48t59.c
gcov-files-sparc64-y += hw/m48t59.c
-check-qtest-sparc-y += tests/qom-test$(EXESUF)
-check-qtest-sparc64-y += tests/qom-test$(EXESUF)
check-qtest-arm-y = tests/tmp105-test$(EXESUF)
gcov-files-arm-y += hw/tmp105.c
-check-qtest-arm-y += tests/qom-test$(EXESUF)
check-qtest-ppc-y += tests/boot-order-test$(EXESUF)
check-qtest-ppc64-y += tests/boot-order-test$(EXESUF)
-check-qtest-ppc-y += tests/qom-test$(EXESUF)
-check-qtest-ppc64-y += tests/qom-test$(EXESUF)
-check-qtest-ppcemb-y += tests/qom-test$(EXESUF)
-check-qtest-alpha-y += tests/qom-test$(EXESUF)
-check-qtest-cris-y += tests/qom-test$(EXESUF)
-check-qtest-lm32-y += tests/qom-test$(EXESUF)
-check-qtest-m68k-y += tests/qom-test$(EXESUF)
-check-qtest-microblaze-y += tests/qom-test$(EXESUF)
check-qtest-microblazeel-y = $(check-qtest-microblaze-y)
-check-qtest-moxie-y += tests/qom-test$(EXESUF)
-check-qtest-or32-y += tests/qom-test$(EXESUF)
-check-qtest-s390x-y += tests/qom-test$(EXESUF)
-check-qtest-unicore32-y += tests/qom-test$(EXESUF)
-check-qtest-xtensa-y += tests/qom-test$(EXESUF)
check-qtest-xtensaeb-y = $(check-qtest-xtensa-y)
+# qom-test works for all sysemu architectures:
+$(foreach target,$(SYSEMU_TARGET_LIST), \
+ $(eval check-qtest-$(target)-y += tests/qom-test$(EXESUF)))
+
check-qapi-schema-y := $(addprefix tests/qapi-schema/, \
comments.json empty.json funny-char.json indented-expr.json \
missing-colon.json missing-comma-list.json \
--
1.8.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] tests/Makefile: Run qom-test for every architecture
2014-01-23 16:22 [Qemu-devel] [PATCH] tests/Makefile: Run qom-test for every architecture Peter Maydell
@ 2014-02-04 9:16 ` Markus Armbruster
2014-02-05 14:00 ` Andreas Färber
2014-03-31 8:10 ` Andreas Färber
1 sibling, 1 reply; 7+ messages in thread
From: Markus Armbruster @ 2014-02-04 9:16 UTC (permalink / raw)
To: Peter Maydell; +Cc: patches, qemu-devel, Andreas Färber
Peter Maydell <peter.maydell@linaro.org> writes:
> Rather than requiring every new architecture to remember to add a line
> to the Makefile to say that qom-test will work on it, autogenerate
> the list of supported architectures by looking at the files in
> default-configs (as configure does), and add qom-test to the
> test list for all of them automatically.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Together with Markus' patch for running the test for all known
> machines for the architecture, this will avoid the problem of
> coverage being missed because of forgetting to update a whitelist.
I applied this on top of Andreas's rebase of my patch rebased to current
master. Applies cleanly and works fine.
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] tests/Makefile: Run qom-test for every architecture
2014-02-04 9:16 ` Markus Armbruster
@ 2014-02-05 14:00 ` Andreas Färber
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Färber @ 2014-02-05 14:00 UTC (permalink / raw)
To: Markus Armbruster, Peter Maydell; +Cc: qemu-devel, patches
Am 04.02.2014 10:16, schrieb Markus Armbruster:
> Peter Maydell <peter.maydell@linaro.org> writes:
>
>> Rather than requiring every new architecture to remember to add a line
>> to the Makefile to say that qom-test will work on it, autogenerate
>> the list of supported architectures by looking at the files in
>> default-configs (as configure does), and add qom-test to the
>> test list for all of them automatically.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>> Together with Markus' patch for running the test for all known
>> machines for the architecture, this will avoid the problem of
>> coverage being missed because of forgetting to update a whitelist.
>
> I applied this on top of Andreas's rebase of my patch rebased to current
> master. Applies cleanly and works fine.
>
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
Thanks for bringing this one up on my radar again, applied to qom-next
(won't do good without Markus' patch but no harm either):
https://github.com/afaerber/qemu-cpu/commits/qom-next
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] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] tests/Makefile: Run qom-test for every architecture
2014-01-23 16:22 [Qemu-devel] [PATCH] tests/Makefile: Run qom-test for every architecture Peter Maydell
2014-02-04 9:16 ` Markus Armbruster
@ 2014-03-31 8:10 ` Andreas Färber
2014-03-31 8:28 ` Peter Maydell
1 sibling, 1 reply; 7+ messages in thread
From: Andreas Färber @ 2014-03-31 8:10 UTC (permalink / raw)
To: Peter Maydell, qemu-devel; +Cc: Markus Armbruster, Stefan Hajnoczi, patches
Peter,
Am 23.01.2014 17:22, schrieb Peter Maydell:
> Rather than requiring every new architecture to remember to add a line
> to the Makefile to say that qom-test will work on it, autogenerate
> the list of supported architectures by looking at the files in
> default-configs (as configure does), and add qom-test to the
> test list for all of them automatically.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Together with Markus' patch for running the test for all known
> machines for the architecture, this will avoid the problem of
> coverage being missed because of forgetting to update a whitelist.
>
> tests/Makefile | 31 ++++++++-----------------------
> 1 file changed, 8 insertions(+), 23 deletions(-)
>
> diff --git a/tests/Makefile b/tests/Makefile
> index fd36eee..42a52ff 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -1,5 +1,9 @@
> export SRC_PATH
>
> +# Get the list of all supported sysemu targets
> +SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
> + $(wildcard $(SRC_PATH)/default-configs/*-softmmu.mak)))
> +
> check-unit-y = tests/check-qdict$(EXESUF)
> gcov-files-check-qdict-y = qobject/qdict.c
> check-unit-y += tests/check-qfloat$(EXESUF)
> @@ -71,7 +75,6 @@ check-qtest-i386-y += tests/acpi-test$(EXESUF)
> check-qtest-i386-y += tests/rtc-test$(EXESUF)
> check-qtest-i386-y += tests/i440fx-test$(EXESUF)
> check-qtest-i386-y += tests/fw_cfg-test$(EXESUF)
> -check-qtest-i386-y += tests/qom-test$(EXESUF)
> check-qtest-i386-y += tests/blockdev-test$(EXESUF)
> check-qtest-i386-y += tests/qdev-monitor-test$(EXESUF)
> check-qtest-x86_64-y = $(check-qtest-i386-y)
qom-test gets executed twice for x86_64 now.
Without having debugged this further yet, my guess is this last line is
causing qom-test to get added twice to check-qtest-x86_64-y, once
inherited from check-qtest-i386-y and then newly added like for any
other target. Could you please take a look how to fix?
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] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] tests/Makefile: Run qom-test for every architecture
2014-03-31 8:10 ` Andreas Färber
@ 2014-03-31 8:28 ` Peter Maydell
2014-03-31 8:33 ` Andreas Färber
0 siblings, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2014-03-31 8:28 UTC (permalink / raw)
To: Andreas Färber
Cc: Markus Armbruster, QEMU Developers, Stefan Hajnoczi,
Patch Tracking
On 31 March 2014 09:10, Andreas Färber <afaerber@suse.de> wrote:
> Am 23.01.2014 17:22, schrieb Peter Maydell:
>> +# Get the list of all supported sysemu targets
>> +SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
>> + $(wildcard $(SRC_PATH)/default-configs/*-softmmu.mak)))
>> +
>> check-unit-y = tests/check-qdict$(EXESUF)
>> gcov-files-check-qdict-y = qobject/qdict.c
>> check-unit-y += tests/check-qfloat$(EXESUF)
>> @@ -71,7 +75,6 @@ check-qtest-i386-y += tests/acpi-test$(EXESUF)
>> check-qtest-i386-y += tests/rtc-test$(EXESUF)
>> check-qtest-i386-y += tests/i440fx-test$(EXESUF)
>> check-qtest-i386-y += tests/fw_cfg-test$(EXESUF)
>> -check-qtest-i386-y += tests/qom-test$(EXESUF)
>> check-qtest-i386-y += tests/blockdev-test$(EXESUF)
>> check-qtest-i386-y += tests/qdev-monitor-test$(EXESUF)
>> check-qtest-x86_64-y = $(check-qtest-i386-y)
>
> qom-test gets executed twice for x86_64 now.
It doesn't for me:
TESTER check-qtest-sparc
GTESTER check-qtest-sparc64
GTESTER check-qtest-unicore32
GTESTER check-qtest-x86_64
blkdebug: Suspended request 'A'
blkdebug: Resuming request 'A'
[vmxnet3][WR][vmxnet3_peer_has_vnet_hdr]: Peer has no virtio
extension. Task offloads will be emulated.
GTESTER check-qtest-xtensa
GTESTER check-qtest-xtensaeb
> Without having debugged this further yet, my guess is this last line is
> causing qom-test to get added twice to check-qtest-x86_64-y, once
> inherited from check-qtest-i386-y and then newly added like for any
> other target.
When I was writing the patch I did think about whether this was
going to be a problem, but I realised that it would not, because the
check-qtest-*-y we're building up here are not lists of commands
to run, but lists of Makefile targets. Make will automatically only
run the target once even if it happens to be specified twice on the
RHS of a rule.
thanks
-- PMM
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] tests/Makefile: Run qom-test for every architecture
2014-03-31 8:28 ` Peter Maydell
@ 2014-03-31 8:33 ` Andreas Färber
2014-03-31 8:42 ` Peter Maydell
0 siblings, 1 reply; 7+ messages in thread
From: Andreas Färber @ 2014-03-31 8:33 UTC (permalink / raw)
To: Peter Maydell
Cc: Markus Armbruster, QEMU Developers, Stefan Hajnoczi,
Patch Tracking
Am 31.03.2014 10:28, schrieb Peter Maydell:
> On 31 March 2014 09:10, Andreas Färber <afaerber@suse.de> wrote:
>> Am 23.01.2014 17:22, schrieb Peter Maydell:
>>> +# Get the list of all supported sysemu targets
>>> +SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
>>> + $(wildcard $(SRC_PATH)/default-configs/*-softmmu.mak)))
>>> +
>>> check-unit-y = tests/check-qdict$(EXESUF)
>>> gcov-files-check-qdict-y = qobject/qdict.c
>>> check-unit-y += tests/check-qfloat$(EXESUF)
>>> @@ -71,7 +75,6 @@ check-qtest-i386-y += tests/acpi-test$(EXESUF)
>>> check-qtest-i386-y += tests/rtc-test$(EXESUF)
>>> check-qtest-i386-y += tests/i440fx-test$(EXESUF)
>>> check-qtest-i386-y += tests/fw_cfg-test$(EXESUF)
>>> -check-qtest-i386-y += tests/qom-test$(EXESUF)
>>> check-qtest-i386-y += tests/blockdev-test$(EXESUF)
>>> check-qtest-i386-y += tests/qdev-monitor-test$(EXESUF)
>>> check-qtest-x86_64-y = $(check-qtest-i386-y)
>>
>> qom-test gets executed twice for x86_64 now.
>
> It doesn't for me:
>
> TESTER check-qtest-sparc
> GTESTER check-qtest-sparc64
> GTESTER check-qtest-unicore32
> GTESTER check-qtest-x86_64
> blkdebug: Suspended request 'A'
> blkdebug: Resuming request 'A'
> [vmxnet3][WR][vmxnet3_peer_has_vnet_hdr]: Peer has no virtio
> extension. Task offloads will be emulated.
> GTESTER check-qtest-xtensa
> GTESTER check-qtest-xtensaeb
What does that prove? I said qom-test, not check-qtest-x86_64. :)
You need to run `make check-qtest-x86_64 V=1` to see it.
>> Without having debugged this further yet, my guess is this last line is
>> causing qom-test to get added twice to check-qtest-x86_64-y, once
>> inherited from check-qtest-i386-y and then newly added like for any
>> other target.
>
> When I was writing the patch I did think about whether this was
> going to be a problem, but I realised that it would not, because the
> check-qtest-*-y we're building up here are not lists of commands
> to run, but lists of Makefile targets. Make will automatically only
> run the target once even if it happens to be specified twice on the
> RHS of a rule.
I am not aware of a qom-test specific Makefile command - with growing
number of tests that would be really handy to have for testing a newly
added one quickly...
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] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] tests/Makefile: Run qom-test for every architecture
2014-03-31 8:33 ` Andreas Färber
@ 2014-03-31 8:42 ` Peter Maydell
0 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2014-03-31 8:42 UTC (permalink / raw)
To: Andreas Färber
Cc: Markus Armbruster, QEMU Developers, Stefan Hajnoczi,
Patch Tracking
On 31 March 2014 09:33, Andreas Färber <afaerber@suse.de> wrote:
> What does that prove? I said qom-test, not check-qtest-x86_64. :)
> You need to run `make check-qtest-x86_64 V=1` to see it.
Ah, gotcha. I guess we do need to stick some kind of uniqueness
filter in somewhere.
thanks
-- PMM
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-03-31 8:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-23 16:22 [Qemu-devel] [PATCH] tests/Makefile: Run qom-test for every architecture Peter Maydell
2014-02-04 9:16 ` Markus Armbruster
2014-02-05 14:00 ` Andreas Färber
2014-03-31 8:10 ` Andreas Färber
2014-03-31 8:28 ` Peter Maydell
2014-03-31 8:33 ` Andreas Färber
2014-03-31 8:42 ` Peter Maydell
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).