From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: Cleber Rosa <crosa@redhat.com>,
passt-dev@passt.top, David Gibson <dgibson@redhat.com>
Subject: Re: [PATCH/RFC] test: run static checkers with Avocado and JSON definitions
Date: Tue, 9 Jul 2024 09:57:25 +1000 [thread overview]
Message-ID: <Zox85YFlPBxYCn1R@zatzit> (raw)
In-Reply-To: <20240708120032.421cc67a@elisabeth>
[-- Attachment #1: Type: text/plain, Size: 2909 bytes --]
On Mon, Jul 08, 2024 at 12:00:32PM +0200, Stefano Brivio wrote:
> Not a review, just two remarks:
>
> On Fri, 5 Jul 2024 21:35:28 +1000
> David Gibson <david@gibson.dropbear.id.au> wrote:
>
> > > [...]
> >
> > So, you can run the tests either with run_avocado, or running Avocado
> > directly?
> >
> > > 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.
> >
> > 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.
>
> 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
>
> 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.
>
> > > [...]
> > >
> > > +++ 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"
> > > + ]
> > > + }
> > > +]
> >
> > 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 :/,
>
> 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.
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-07-08 23:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-29 12:13 [PATCH/RFC] test: run static checkers with Avocado and JSON definitions Cleber Rosa
2024-07-05 11:35 ` David Gibson
2024-07-08 10:00 ` Stefano Brivio
2024-07-08 23:57 ` David Gibson [this message]
2024-07-15 4:15 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zox85YFlPBxYCn1R@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=crosa@redhat.com \
--cc=dgibson@redhat.com \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).