From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id x/SEFc2UDGK/JQAAWB0awg (envelope-from ) for ; Wed, 16 Feb 2022 01:08:13 -0500 Received: by simark.ca (Postfix, from userid 112) id 475571F3C9; Wed, 16 Feb 2022 01:08:13 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id AAF4D1EA69 for ; Wed, 16 Feb 2022 01:08:12 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 35DF13857C4E for ; Wed, 16 Feb 2022 06:08:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 35DF13857C4E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1644991691; bh=xQ5fkb24m5lax5VDJjqrUnMAek/65ya32vFURSSp9Mc=; h=To:In-Reply-To:Subject:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=nMzMicTAQS7Jb71007iVkPA22MYDhrZ/oXHxgmJJLMKXeO+s3FV4Mc7zTXLItfxTz yrdkQCzC/WNb0gNZ+HKOBrPLNuQiRcMLLDGolpJYfoVJkDS+1C7IT94bpYyfth5yXL ZSIs4nrwXyiIsxc+fmsu2qT3uGvf8wds4LmgkFKw= Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by sourceware.org (Postfix) with ESMTPS id 3BD223858D3C for ; Wed, 16 Feb 2022 06:07:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3BD223858D3C To: Mike Frysinger In-Reply-To: (message from Mike Frysinger on Wed, 16 Feb 2022 00:25:07 -0500) Subject: Re: [PATCH 04/12] sim/testsuite/cris/c: Use -sim3 but only for newlib targets MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT References: <20220214225824.AC90A20439@pchp3.se.axis.com> <20220214230255.DC76120439@pchp3.se.axis.com> Message-ID: <20220216060745.ADD9A2040B@pchp3.se.axis.com> Date: Wed, 16 Feb 2022 07:07:45 +0100 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: , From: Hans-Peter Nilsson via Gdb-patches Reply-To: Hans-Peter Nilsson Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > Date: Wed, 16 Feb 2022 00:25:07 -0500 > From: 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=--target_board=cris-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. > > > > 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. > > > > 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. > > > > 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). > > i'm trying to get away from needing dejagnu boards at all. it brings nothing > to the table when it comes to testing the sim itself. 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*. > 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 targeting > and the test framework can run the simulator with the right settings. > > one can now do: > $ ./configure --enable-targets=all > $ make check-sim > > and every architecture will be built & tested. no need for multiple build > dirs for diff targets or sep runs with diff runtestflags. 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. > 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. 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!) > i even have a poc locally that deletes the dejagnu framework entirely and > 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. > -mike Ouch. I haven't found the "automake test harness" to be of use for serious testing. brgds, H-P