From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YtLIB4OCDGILIwAAWB0awg (envelope-from ) for ; Tue, 15 Feb 2022 23:50:11 -0500 Received: by simark.ca (Postfix, from userid 112) id 0DDC01F3C9; Tue, 15 Feb 2022 23:50:11 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 19AE61EDF0 for ; Tue, 15 Feb 2022 23:50:10 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A031E3857C43 for ; Wed, 16 Feb 2022 04:50:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A031E3857C43 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1644987009; bh=/0HnVhXRwn5ONSVQOzKMg9rKKA8oBPx7oFTD4x/cFNQ=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=oGw0XgyxkTgS5GP40GNaGYi6C4T+Fc4i47e7sLd7+PxQawlYTBZ0dl4dOzltKWF4L EG0vHm/oiXHKQHXV88Sk7PAST6BZW9bY7WjsC61M6cUlRLPAz/WGcyxiJWN80Lnty6 1Ehf8dYPTR5T+nCD8h/j28w1Kj+NolCEqkUUl32g= Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id D063B3858D3C for ; Wed, 16 Feb 2022 04:49:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D063B3858D3C Received: by smtp.gentoo.org (Postfix, from userid 559) id DC68C3432CF; Wed, 16 Feb 2022 04:49:49 +0000 (UTC) Date: Tue, 15 Feb 2022 23:49:47 -0500 To: Hans-Peter Nilsson Subject: Re: [PATCH 06/12] sim/testsuite: Support "requires: simoption <--name-of-option>" Message-ID: Mail-Followup-To: Hans-Peter Nilsson , gdb-patches@sourceware.org References: <20220214225824.AC90A20439@pchp3.se.axis.com> <20220214230356.BA97820439@pchp3.se.axis.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BCU5DrZAvGY3Psp3" Content-Disposition: inline In-Reply-To: <20220214230356.BA97820439@pchp3.se.axis.com> 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: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" --BCU5DrZAvGY3Psp3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 15 Feb 2022 00:03, Hans-Peter Nilsson via Gdb-patches wrote: > Simulator features can be present or not, typically > depending on different-valued configure options, like > --enable-sim-hardware[=3Doff|=3Don]. To avoid failures in > test-suite-runs when testing such configurations, a new > predicate is needed, as neither "target", "progos" nor > "mach" fits cleanly. >=20 > The immediate need was to check for presence of a simulator > option, but rather than a specialized "requires-simoption:" > predicate I thought I'd handle the general (parametrized) > need, so here's a generic predicate machinery and a (first) > predicate to use together with it; checking whether a > particular option is supported, by looking at "run --help" > output. This was inspired by the check_effective_target_ > machinery in the gcc test-suite. i really don't want --help to be an API surface like this. it's the wrong layer for the job. we have a sim_config_print function which dumps configuration information. i'd be fine making that the surface to build off of. i don't think we print hardware there atm, but should be trivial to introduce. only other missing piece is that it's not obvious how to access it from the CLI. `run --version` doesn't include it. `run --do-command version` does though :x. i'd be amenable to improving this interface, either by a new option like --info-config or some other route. -mike --BCU5DrZAvGY3Psp3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmIMgmsACgkQQWM7n+g3 9YGXOw//VxJedLegjyfR3cs4Y7iv8H2Szk7zKQQICOVe5zzhGgsVlZa75K9/oKfz X+2cnVjjivacbL4+fyjMvDDGmBI0w61KN9n+xMLYqhOBc8t1bwLBd7SifRUbwklv R6QRNxJf5obyVQHHoAGG5C5TtwpVleqQW0oTNyHYHgXRDYPa3g3LQvVESKEzFMm6 vTxQ1xTfh5vl2WNLD4I3jVGW4UIB3ZIU9quvqRU97Z3B8o+pHQBhWkh19QE26ntS Nf+v+8Q+utD/VGG2eOHBkXV7vvPdmoNtLmrTDdcYLOAJzcFjRo461d3LIjlQ802O i1EnsY+8WAOxqPSFzlkwNsHg77b8zQG48kmYkaPCa+yuHvQQ8jPu4yL244uTLFtc ML3MrKcxDYe0emC2HTHGH44ulJmgVbv1JWOiG6tF7ZpAxZeUEptowAUi3OmwZg61 sk40WD9UK9GSLB1CSfQilNGhavtL22PxxHedfKss5SwI/qWjkZH64/p/n9N1FyhJ 6gxUbFaiO4i7p0h10o345z8Hs611d1vMfdc6/xWJx+S7kr/jVgZhP3i2HvHFf6tQ ZLlg+nsaSLZpA6Y1uJysJFrENNhEDJ3vlbS0xVXfVVnJsokAvIglSC3P4l1QJqnV By6DmVamZkM0Q1ObF9JvUMbCL2DC7PA9+v13X8PqWSRCpNoIDUo= =B2Bs -----END PGP SIGNATURE----- --BCU5DrZAvGY3Psp3--