From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id A44365A004F for ; Tue, 09 Jul 2024 01:57:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1720483048; bh=r7+l11c6tc3D8TSJGSaJfETNvJrUL5gOUcWtZ0WK2MM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oHbkq4B+kKKerKiYfPq2fuyltQQvmIR5WlJMCJ/rDwOXUmk0Z1kVTb9eJKeEDXRN6 2uqlANe1LXib5vInpj9RYOIcGNARME0OhuHtNEm0OHIXaumceYC6AjRnnfRtERXDzb lpnIHqrecMgnbFaXiu1iz9E+dnrgxu5JyDnVf0xh3N7jMZgUHhA/5DF4HTaqb/26br HcPCba5ClxWEZlLAM5POw12wfxlL7Rsqlz0YQCqzA3xO9EABgqRDpxLMEPjc+U+j4g YmU94IblXX9hCGVuRlw8P53e9GUWKARbo6fuXRIrM9DL4fgE83oqHUBCibGAgEHp2W 4bUtJz/fi3q8Q== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4WJ1JS6YYyz4xPf; Tue, 9 Jul 2024 09:57:28 +1000 (AEST) Date: Tue, 9 Jul 2024 09:57:25 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH/RFC] test: run static checkers with Avocado and JSON definitions Message-ID: References: <20240629121342.3284907-1-crosa@redhat.com> <20240708120032.421cc67a@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VuprnwCXPVluYbA3" Content-Disposition: inline In-Reply-To: <20240708120032.421cc67a@elisabeth> Message-ID-Hash: 54LHXXFGYUTPFT6TSHCDTPCKSSAWHRQ3 X-Message-ID-Hash: 54LHXXFGYUTPFT6TSHCDTPCKSSAWHRQ3 X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Cleber Rosa , passt-dev@passt.top, David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --VuprnwCXPVluYbA3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 08, 2024 at 12:00:32PM +0200, Stefano Brivio wrote: > Not a review, just two remarks: >=20 > On Fri, 5 Jul 2024 21:35:28 +1000 > David Gibson wrote: >=20 > > > [...] > >=20 > > So, you can run the tests either with run_avocado, or running Avocado > > directly? > >=20 > > > The installation of Avocado itself is left to users, given that the > > > details on how to install it (virtual environments and specific > > > tooling) can be a very different and long discussion. =20 > >=20 > > Right... if the required Avocado version was already packaged in > > latest Fedora and/or Debian, I'd have no qualms about that. It looks > > like you require a very new one though, which makes me a little > > nervous about requiring that complex installation. I guess if it's > > pip installable that helps. Though if I recall on Debian even that > > requires some venv setup. Eventually I think we'll want a README for > > Avocado installation, or better yet make targets that will install it > > automatically in a local venv. >=20 > I plan to try this out on Debian and report back -- I didn't have time > yet. Indeed, it would help to have all the dependencies packaged because > it would be really beneficial if we could run the upstream tests also as > automated package testing, e.g. for Debian it's autopkgtest: > https://wiki.debian.org/ContinuousIntegration/autopkgtest >=20 > The current test suite has all the dependencies packaged on (at least) > Debian and Fedora, minus neper (https://github.com/google/neper), but > tests will be skipped if those tools are not available. >=20 > > > [...] > > > > > > +++ b/test/avocado/static_checkers.json > > > @@ -0,0 +1,16 @@ > > > +[ > > > + { > > > + "kind": "exec-test", > > > + "uri": "make", > > > + "args": [ > > > + "clang-tidy" > > > + ] > > > + }, > > > + { > > > + "kind": "exec-test", > > > + "uri": "make", > > > + "args": [ > > > + "cppcheck" > > > + ] > > > + } > > > +] =20 > >=20 > > Looks pretty reasonable to me, at least for these simple cases. It > > would be nice to have comments, but IIUC that's one of the things > > notably missing from json :/, >=20 > You could use HJSON (https://hjson.github.io/), or a subset of it, for > example with just comments. We're using it like that in seitan, because > that's what Parson supports, example: > https://seitan.rocks/seitan/tree/demo/routes.hjson Yeah, there are bunch of json variants and extensions that allow for comments. Which is kind of the problem: there are a bunch of them, making the choice non-obvious. --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --VuprnwCXPVluYbA3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmaMfNcACgkQzQJF27ox 2GeHAA/+JsAaKOt0oGLyV0Hk1A3p11wr15jVHu9tlt214FlvfRfkMW/BCXiobm6C RwbnW96Df0t4c6dS03xjYdqMEHpUG06LdIiZfDTZCmZd0IACFXrNsBvmDtmu69Ue CHrqykE5R63EAGsLAqYe46kBNdhvjrTLh/tp8379Umzthxvg29SC3dX0KZzFaQ25 /Ks37zfGE96B/43MQ6+BrfCGU2fTIQF2Mb1iKPGG68667tjLNA/XN8PfLEpCPBuI h/dUI42Tjz0ewclWkiVJM+6e438b5zlM7eAKCrNMv0hKoFwV5xPcRiKru+TFXaaz fb+WRYVDKsjsPL8Bp2QJpYt5gRZOyPtzOJD10VGZKes80lSun9ZxHh3LDxYdWTiH h9SfnWSeifkooEYltA+yd4aUJ+QbzyXS6Ih5MlRDP26yIUJIwXsTIatXj/6fHy/L KWq2B1wBQiFPSV7zolDVEfBWnSo+yOTX4LDinlQhbJk099DSqHhMjlOsPtpbslGV wAU1YTXsqYkzS0I8PIbJs+u0kRwDyM3LCWAd8RR5ylRJZhYlKdfOfyOwDnLl9pCl 0OSuBnYol0sAfmvX0Ua3AgTegPc+O5Al+1xPEQ+p+T3QHuTDMhqXsqfobQUtp78p NwhmiIu6IHqUqgUQFQHvR0nwqwFaeZN+TIYpHrrOy5JSZh4HlxA= =REPF -----END PGP SIGNATURE----- --VuprnwCXPVluYbA3--