public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
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: Mon, 8 Jul 2024 12:00:32 +0200	[thread overview]
Message-ID: <20240708120032.421cc67a@elisabeth> (raw)
In-Reply-To: <ZofagA3LNPzrQMnt@zatzit>

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

-- 
Stefano


  reply	other threads:[~2024-07-08 10:01 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 [this message]
2024-07-08 23:57     ` David Gibson
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=20240708120032.421cc67a@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=crosa@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=dgibson@redhat.com \
    --cc=passt-dev@passt.top \
    /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).