From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id C345F3857C7F; Wed, 6 Jan 2021 05:12:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C345F3857C7F Received: from vapier (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id 15691340F62; Wed, 6 Jan 2021 05:12:23 +0000 (UTC) Date: Wed, 6 Jan 2021 00:12:22 -0500 From: Mike Frysinger To: gdb@sourceware.org, binutils@sourceware.org Subject: testsuite layout conventions Message-ID: <20210106051222.GB7494@vapier> Mail-Followup-To: gdb@sourceware.org, binutils@sourceware.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SkvwRMAIpAhPCcCJ" Content-Disposition: inline X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2021 05:12:26 -0000 --SkvwRMAIpAhPCcCJ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline do we have docs/guidelines for testsuite/ dir layouts ? we seem to (inconsistently) use a lot of redundant layouts largely due to our use of dejagnu. dejagnu takes a tool-centric view of the world. this makes sense when you have a flat testsuite dir (e.g. if gas & binutils & ld & gdb all shared a testsuite/ dir), but i'm not sure it makes that much sense when they're all sep. i think dejagnu is the single reason for the layouts we have and it seems a bit unnecessary. when you set tool= in its site.exp, it will only search for dirs with prefixes under testsuite/. i.e. it applies the glob like testsuite/*/**. a quick survey of binutils/gdb/gcc dirs that have tests: * binutils / testsuite / binutils- / * gas / testsuite / gas / / * gdb / testsuite / gdb. / * gold / testsuite / * ld / testsuite / ld- / * libctf / testsuite / libctf- / * libiberty / testsuite / * sim / testsuite / sim / / * gcc / testsuite / . / * libatomic / testsuite / libatomic. / * libffi / testsuite / libffi. / * libgomp / testsuite / libgomp. / * libgo / testsuite / libgo. / * libitm / testsuite / libitm. / * libphobos / testsuite / libphobos. / * libstdc++-v3 / testsuite / libstdc++- / * libvtv / testsuite / libvtv. / the notable standouts are gold & libiberty. they don't use dejagnu while everyone else does. so i'll ignore them. libstdc++-v3 has additional test subdirs beyond the tool=libstdc++ prefix. not sure how that works exactly. so i'll ignore them. gcc is also a bit funky, but i guess that's what you get for such a large subdir. i don't think we want to use that as precedence :). for all the rest, you can see that we have three styles: ./ -/ // the odd thing is that it seems most projects don't actually set tool in their site.exp. libstdc++, gdb, and sim do. so i guess either the others ones used to, or they just adopted a similar naming convention at some point because others were ? i've just finished cleaning up the sim/testsuite/ tree. i'm left with sim/testsuite/sim//. i spend a lot of time in sim// and sim/testsuite/sim// comparing and trying to collapse common logic. the extra sim/ dir irks me ;). it ends up being easy to collapse by deleting 'set tool sim' from site.exp, then just doing: cd testsuite/ git mv sim/* ./ which leaves me with sim/testsuite//. based on the fact that no one seems to use dejagnu's tool setting anymore, and we don't seem to have general guidance, and every project is slightly different, changing sim to drop the "sim" tool prefix is fine. -mike --SkvwRMAIpAhPCcCJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAl/1RrYACgkQQWM7n+g3 9YEdLQ/+MSVNL8ZndlLYc7BnZ9qjKY7G4IDcQHD9aEW8DfQBjrhpsE7KPBLtfThG mThbWxxs4+/Xt24j6BS39iZKnHr8VpKoAZfWc5ycpD+PxYPqkhK2FJS4cZH7XGuV 9mug0SUHmZFiBimPvahk0CW2zjzatmV5lQsqejVuBY4H5olZftrEL4/6ftZasSJ4 G/shOR2sx4trFab86ZdfdUd+LgD1kjsmFUybC0MjDAo14EcgOHUapXxRJvMOK/PR qc7ADNL42ijIiY1Rnflk3gZLchhhOjC6sr2lYtqedBALw1elE4IR2t2E9p50vcAV DZRzkaPw6fNa4fjroFkYSFGnuvPpxcNJjze1zDCiPpz4Yi/lSWpxXitHzNTHggJi hxzL3b1z837GPwh9/YxcxvF+vgCLv/Pl2cIrxHWj36JhnNP4bg6fKWQ0ByfD06F1 XM9IkYsVqCjp7yw7JVLYXfHH77IZ7JTLNWrfEQWUuR5i0QAxh1LCcvkYEaCHAYXF KbF4ufJxSU9QIA8va41Go2WfhMYXVc9k0YxJZfI92sMxXzY0kElkoDelGtOpxD3J MVSky7t0ZmlEd61tOVekbtpJ1dwlIQiB4pScZl0U88Ga3x/bQ0IcJ6N8rwa9JSa8 GU1nS2Oo77vnWQE5exBqiwQi19BknHgTGaSntumT4MdARt9dOkI= =YuWs -----END PGP SIGNATURE----- --SkvwRMAIpAhPCcCJ--