From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 65FDC3858D37 for ; Wed, 16 Feb 2022 07:34:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 65FDC3858D37 Received: by smtp.gentoo.org (Postfix, from userid 559) id D3EAE342E37; Wed, 16 Feb 2022 07:34:33 +0000 (UTC) Date: Wed, 16 Feb 2022 02:34:31 -0500 From: Mike Frysinger To: Hans-Peter Nilsson Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 04/12] sim/testsuite/cris/c: Use -sim3 but only for newlib targets Message-ID: Mail-Followup-To: Hans-Peter Nilsson , gdb-patches@sourceware.org References: <20220214225824.AC90A20439@pchp3.se.axis.com> <20220214230255.DC76120439@pchp3.se.axis.com> <20220216060745.ADD9A2040B@pchp3.se.axis.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="onlMgBxsMS9xH7l3" Content-Disposition: inline In-Reply-To: <20220216060745.ADD9A2040B@pchp3.se.axis.com> X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2022 07:34:35 -0000 --onlMgBxsMS9xH7l3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 16 Feb 2022 07:07, Hans-Peter Nilsson wrote: > Date: Wed, 16 Feb 2022 00:25:07 -0500 Mike Frysinger > > On 15 Feb 2022 00:02, Hans-Peter Nilsson via Gdb-patches wrote: > > > Commit a39487c6685f "sim: cris: use -sim with C tests for cris-elf > > > targets" caused " -sim" to be appended to CFLAGS_FOR_TARGET for > > > cris*-*-elf, where testing had until then relied on > > > "RUNTESTFLAGS=3D--target_board=3Dcris-sim" being passed when running = "make > > > check-sim", adding the right options. While "-sim" happens to work, > > > the baseboard-file cris-sim.exp uses "-sim3" so for consistency use > > > that instead. > > >=20 > > > Then commit b42f20d2ac72 "sim: testsuite: drop most specific istarget > > > checks" caused " -sim" to be appended for *all* targets, which just > > > doesn't work. For example, for crisv32-linux-gnu, that's not a > > > recognized option and will cause a dejagnu error and further testing > > > in c.exp will be aborted. > > >=20 > > > While cris-sim.exp appends "-static" for *-linux-gnu, further changes > > > in the test-suite have caused "linux"-specific tests to break, so that > > > part will be tended to separately. > > >=20 > > > But, save and restore CFLAGS_FOR_TARGET around the modification and > > > use where needed, to not have the CRIS-specific modification affect a > > > continuing test-run (possibly for other targets). > >=20 > > i'm trying to get away from needing dejagnu boards at all. it brings n= othing > > to the table when it comes to testing the sim itself. >=20 > I know you're of that opinion, but I'll say this once again (it > was decades ago last time): you're wrong. This leads you to > discarding half of dejagnu and working *against* it rather than > *with it*. i think you're overstating what it has to offer to the sim. it can be usef= ul for people to define targets to run programs against (e.g. defining differe= nt sim or hardware or remote systems), but none of that matters here. we have full control over the sim runtime and do not care about any of the other aspects like running against real hardware. > > ideally we should have > > a single sim binary that supports all targets simultaneously, and it's = only > > runtime options (or dynamic probing) that selects between them. that's= why > > #progos was introduced -- so tests could declare which env they're targ= eting > > and the test framework can run the simulator with the right settings. > >=20 > > one can now do: > > $ ./configure --enable-targets=3Dall > > $ make check-sim > >=20 > > and every architecture will be built & tested. no need for multiple bu= ild > > dirs for diff targets or sep runs with diff runtestflags. >=20 > Right, I figured that's your preferred setup. You can certainly > make dejagnu baseboards work in this scenario: just call *each* > of the one one that fits when testing *each* simulator, and > clear the slate in-between. this requires people to get their baseboards into dejagnu, and for a dejagnu release to be made, and for these settings to be kept in sync. releases are way too slow on the dejagnu front. people also tend to write their baseboards for their own setup they're using which doesn't generalize. `make check` should work out of the box for all targets & sim functionality for everyone. if they have to fumble about with runtestflags or any other dejagnu settings, then the testsuite is doing it wrong. if gas & ld ever get multitarget support, we'd have an even easier time with all the xxx_FOR_TARGET_xxx settings. again, i'm speaking only about the sim here. something like gcc going thro= ugh dejagnu baseboards for the sim or real hardware makes sense. > > at some point i also want to delete all the custom compile+run logic in= the > > testsuite/cris/ tree. that's why i spent so much time pulling code out= and > > into the common one. >=20 > The baby went with the bath-water here. (Or IOW, if you pull > out *all* of the test-suites the testsuite will be really > simple!) the "baby" is the tests. i'm not talking about deleting the tests. there = is no reason cris should be parsing or compiling or linking or running any tes= ts on its own. the functionality it wants is by no means unique to cris. > > i even have a poc locally that deletes the dejagnu framework entirely a= nd > > switches to Automake test harness, but i haven't quite figured out how = to > > cleanly handle the all_machs multiplex logic in Automake. i eventually > > pulled out individual cleanups and merged them so at least `make check` > > works in a multi-target build, and isn't nearly as slow as it was. >=20 > Ouch. I haven't found the "automake test harness" to be of use > for serious testing. i'm not a fan of a framework that can't fathom a system with more than 1 cp= u. -mike --onlMgBxsMS9xH7l3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmIMqQcACgkQQWM7n+g3 9YHXZA//RIWi1cniVuntOEMS1NsCST3adFB55aEDAGDmLURm/5UjqYNAb2Llwn4c IQuf3UkNuS47tLJaOwubIYABFEERrq1wxfgTQSe8N+3MNfqW04UZSToR1rFRs+b4 4mjRGVn2UWyhcOM2KfYHjTFxop6GlWaHJBJNJKf0O/SwRPSQ4solXtEaLkndpodj 6eMLDcDw05mUtuKAZtbaDTbHcM7NYaCYgtzb/VnJlR5isFsVO7B0hGqYWoJ7FIIT b/2nSNNdPLKyZKI3yxcMtRuJFdlbntM3XsOI9FbPlBG+YQTUcL+SoMN19FuZ/gGT yeO7TbexIdkTp1xFES1pDpwWOdhM0+UIvCOQGJp2xpgHXIKmiNiYG9/OvUkiho69 CVmn3tUFr5B4JvttYSvscWqi+zCUoYC+hyUjFb0W+gWkWOJHjUACCSsZ0Dpx9Gb5 I5fJ+ByVN1BagaNOVcS6Z3Rv71ay+1cUV8vij7DlB/g4in7q+/Prq2KQ2oMvZ47C 4HhV9ah8KjMJzfOPKjpof/t8piVyPkU5M3fyghPRa89Sv/+bAYZDY3X4Tqz0c85l HUbKlC/VcVneRvWOhW4xzTuG/tuLmjo9ix9TahQIzDzPZ0eD++5lIqOK+uiS99Ly PGNFcCMxQKQV1RMupQmzKI04XCviHvYYICAoASE1wVopQJoeJ8g= =aCzl -----END PGP SIGNATURE----- --onlMgBxsMS9xH7l3--