From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WT9Kr-0001cg-Ja for qemu-devel@nongnu.org; Thu, 27 Mar 2014 08:23:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WT9Kk-0002H5-9X for qemu-devel@nongnu.org; Thu, 27 Mar 2014 08:23:05 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55266 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WT9Kj-0002G8-S0 for qemu-devel@nongnu.org; Thu, 27 Mar 2014 08:22:58 -0400 Message-ID: <5334181E.1000902@suse.de> Date: Thu, 27 Mar 2014 13:22:54 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1395918686-27043-1-git-send-email-stefanha@redhat.com> <1395918686-27043-3-git-send-email-stefanha@redhat.com> In-Reply-To: <1395918686-27043-3-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/2] tests: correctly skip qtest on non-POSIX hosts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org 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: >=20 > check-qtest-$(CONFIG_POSIX)=3D$(foreach TARGET,$(TARGETS),$(check-qte= st-$(TARGET)-y)) >=20 > 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. >=20 > The following error message is printed when trying to run gtester on a > binary that was never built: >=20 > GLib-WARNING **: Failed to execute test binary: tests/endianness-test= .exe: Failed to execute child process "tests/endianness-test.exe" (No suc= h file or directory) >=20 > This patch makes QTEST_TARGETS empty on non-POSIX hosts. This prevents > the targets from being generated. >=20 > Signed-off-by: Stefan Hajnoczi > --- > tests/Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > 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): test= s/qemu-iotests/socket_scm_hel > # QTest rules > =20 > TARGETS=3D$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS))) > -QTEST_TARGETS=3D$(foreach TARGET,$(TARGETS), $(if $(check-qtest-$(TARG= ET)-y), $(TARGET),)) > +QTEST_TARGETS=3D$(foreach TARGET,$(TARGETS), \ > + $(if $(check-qtest-$(TARGET)-$(CONFIG_POSIX)), $(TARGE= T),)) 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)=3D$(foreach TARGET,$(TARGETS), $(check-qte= st-$(TARGET)-y)) > =20 > qtest-obj-y =3D tests/libqtest.o libqemuutil.a libqemustub.a --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg