From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zekgh-000441-5v for qemu-devel@nongnu.org; Wed, 23 Sep 2015 10:06:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zekgd-0002fr-Rm for qemu-devel@nongnu.org; Wed, 23 Sep 2015 10:06:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zekgd-0002fS-Cu for qemu-devel@nongnu.org; Wed, 23 Sep 2015 10:06:19 -0400 From: Markus Armbruster References: <1442577640-11612-1-git-send-email-armbru@redhat.com> <1442577640-11612-8-git-send-email-armbru@redhat.com> <55FC093B.7000507@suse.de> <87io77st3f.fsf@blackfin.pond.sub.org> <55FC2DB8.30604@suse.de> Date: Wed, 23 Sep 2015 15:57:39 +0200 In-Reply-To: <55FC2DB8.30604@suse.de> ("Andreas =?utf-8?Q?F=C3=A4rber=22's?= message of "Fri, 18 Sep 2015 17:28:56 +0200") Message-ID: <87vbb15jcc.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 7/7] tests: Simplify how qom-test is run List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= Cc: qemu-devel@nongnu.org, stefanha@redhat.com, ehabkost@redhat.com Andreas F=C3=A4rber writes: > Am 18.09.2015 um 16:24 schrieb Markus Armbruster: >> Andreas F=C3=A4rber writes: >>> Am 18.09.2015 um 14:00 schrieb Markus Armbruster: >>>> Add it to check-qtest-generic-y instead of check-qtest-$(target)-y for >>>> every target. >>>> >>>> Signed-off-by: Markus Armbruster >>>> --- >>>> tests/Makefile | 5 +---- >>>> 1 file changed, 1 insertion(+), 4 deletions(-) >>>> >>>> diff --git a/tests/Makefile b/tests/Makefile >>>> index 4559045..28c5f93 100644 >>>> --- a/tests/Makefile >>>> +++ b/tests/Makefile >>>> @@ -219,10 +219,7 @@ gcov-files-ppc64-y +=3D ppc64-softmmu/hw/ppc/spap= r_pci.c >>>> check-qtest-microblazeel-y =3D $(check-qtest-microblaze-y) >>>> check-qtest-xtensaeb-y =3D $(check-qtest-xtensa-y) >>>>=20=20 >>>> -# qom-test works for all sysemu architectures: >>>> -$(foreach target,$(SYSEMU_TARGET_LIST), \ >>>> - $(if $(findstring tests/qom-test$(EXESUF), >>>> $(check-qtest-$(target)-y)),, \ >>>> - $(eval check-qtest-$(target)-y +=3D tests/qom-test$(EXESUF)))) >>>> +check-qtest-generic-y +=3D tests/qom-test$(EXESUF) >>> >>> Does this -generic- have the same filtering code to avoid running the >>> tests twice for x86_64, aarch64, ppc64, etc.? Please don't regress. >>=20 >> I'm dense today. Can you explain the filtering code to me? > > For practical purpose,s x86_64 adds all tests from i386, that included > qom-test then. If we now add it for x86_64 too, it got executed twice, > which the above $(if ...) fixes by not adding it for x86_64 if it's > already in. Just checking whether -generic- has equivalent filtering or > other code somewhere else? The code in master works only sometimes. Here's the explanation copied from my revised patch's commit message: We want to run qom-test for every architecture, without having to manually add it to every architecture's list of tests. Commit 3687d53 accomplished this by adding it to every architecture's list automatically. =20=20=20=20 However, some architectures inherit their tests from others, like this: =20=20=20=20 check-qtest-x86_64-y =3D $(check-qtest-i386-y) check-qtest-microblazeel-y =3D $(check-qtest-microblaze-y) check-qtest-xtensaeb-y =3D $(check-qtest-xtensa-y) =20=20=20=20 For such architectures, we ended up running the (slow!) test twice. Commit 2b8419c attempted to avoid this by adding the test only when it's not already present. Works only as long as we consider adding the test to the architectures on the left hand side *after* the ones on the right hand side: x86_64 after i386, microblazeel after microblaze, xtensaeb after xtensa. =20=20=20=20 Turns out we consider them in $(SYSEMU_TARGET_LIST) order. Defined as =20=20=20=20 SYSEMU_TARGET_LIST :=3D $(subst -softmmu.mak,,$(notdir \ $(wildcard $(SRC_PATH)/default-configs/*-softmmu.mak))) =20=20=20=20 On my machine, this results in the oder xtensa, x86_64, microblazeel, microblaze, i386. Consequently, qom-test runs twice for microblazeel and x86_64. =20=20=20=20 After my patch v2 (to be sent soon), it runs exactly once per target.