From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zelpj-0006BM-EJ for qemu-devel@nongnu.org; Wed, 23 Sep 2015 11:19:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zelpg-0006Kq-8L for qemu-devel@nongnu.org; Wed, 23 Sep 2015 11:19:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zelpg-0006Kj-05 for qemu-devel@nongnu.org; Wed, 23 Sep 2015 11:19:44 -0400 References: <1442872682-6523-1-git-send-email-eblake@redhat.com> <1442872682-6523-2-git-send-email-eblake@redhat.com> <5602B686.4010209@redhat.com> <8737y5yxy9.fsf@blackfin.pond.sub.org> From: Eric Blake Message-ID: <5602C30A.3090109@redhat.com> Date: Wed, 23 Sep 2015 09:19:38 -0600 MIME-Version: 1.0 In-Reply-To: <8737y5yxy9.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cT5bUCigbkfbLHwc4XS85GDnSVwhbH7TR" Subject: Re: [Qemu-devel] [PATCH v5 01/46] qapi: Sort qapi-schema tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: marcandre.lureau@redhat.com, DirtY.iCE.hu@gmail.com, qemu-devel@nongnu.org, ehabkost@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --cT5bUCigbkfbLHwc4XS85GDnSVwhbH7TR Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/23/2015 09:09 AM, Markus Armbruster wrote: > Eric Blake writes: >=20 >> On 09/21/2015 03:57 PM, Eric Blake wrote: >>> Recent changes to qapi have provided quite a bit of churn in >>> the makefile, because we are inconsistent on what order test >>> names appear in, and on whether to re-wrap the list of tests or >>> just add arbitrary line lengths. Writing the list in a sorted >>> fashion, one test per line, will make future patches easier >>> to see what tests are being added or removed by a patch. >>> >>> Signed-off-by: Eric Blake >>> --- >>> tests/Makefile | 160 ++++++++++++++++++++++++++++++++++++++++-------= ---------- >>> 1 file changed, 114 insertions(+), 46 deletions(-) >>> >> >>> +qapi-schema +=3D alternate-array.json >>> +qapi-schema +=3D alternate-base.json >> >> Hmm, I just realized we require GNU make, and that we already use >> $(wildcard) when building up other tests. Would it be worth writing >> this patch to merely use $(wildcard qapi-tests/*.json)? Then further >> additions (and removals) of .json files would automatically be picked = up >> without requiring Makefile tweaking. >=20 > I really dislike picking up source files with $(wildcard), because it > can also pick up random junk. I agree that it is dangerous (the automake manual specifically recommends against wildcarding for this reason, even when done without relying on GNU $(wildcard) syntax). It was more a question of "since we are already doing it, should we do it more?" Looking closer, the existing uses of $(wildcard) in tests/Makefile are for including .d files (those are generated on the fly, and while still prone to accidentally including leftover garbage files, such extra inclusions tend to have no negative impact to make dependency tracking for the targets we still care about), and for the SYSEMU_TARGET_LIST (again something that relies on the just-generated default-configs/*.mak magic). Whereas choosing which tests to run does cause problems if bogus tests are added. >=20 > Something like $(shell git ls-files tests/qapi-schema/*.json) avoids > random junk, but doesn't work when you build a tarball. Then it sounds like my approach of keeping a verbose list is still best after all, and at most I should update the commit message to say _why_ I specifically chose not to use $(wildcard) here. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --cT5bUCigbkfbLHwc4XS85GDnSVwhbH7TR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWAsMKAAoJEKeha0olJ0NqOywH/inTSsJZyVYAyF5HngRiGupP C15FH7Wwgylp/kkOCIo8h3a3Uy2qnHi5I4kovOvr8isdGuPIz2dv3/FJkgBCgN4H 3UhTCNI9hsHKLV4f15ohkEW7r1qAU5zyGOFmCReXc1Jk0pRT2lyNDdmmOtok/Wcq FY6KtpcARPQc6H55FfWdHkoCGvdZkeCqS15RBjC1eOsJZlheP5xXGW912u2FCrLt wJYiDpZZCx+KDYkwK/8Z26Baei6T8ldy8jCiCOCKp6lqaDJF3iagOA4yO4IXNk5U 62vU8D2v+O5LaUEHKeil3aF6rIj6+kImdJ+0Pwe6nP3btLa9LtkfnFzCfUdHMP8= =gKn/ -----END PGP SIGNATURE----- --cT5bUCigbkfbLHwc4XS85GDnSVwhbH7TR--