linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kent Gibson <warthog618@gmail.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>
Subject: Re: [libgpiod][PATCH] tools: port the test-suite to using gpio-sim
Date: Sat, 19 Feb 2022 08:37:12 +0800	[thread overview]
Message-ID: <20220219003712.GA12202@sol> (raw)
In-Reply-To: <CAMRc=Md4_Q5q6WxTCy_bCSwdXLri1WTcC+Gi=ANQM5u9J0SXuQ@mail.gmail.com>

On Fri, Feb 18, 2022 at 10:22:49AM +0100, Bartosz Golaszewski wrote:
> On Thu, Feb 17, 2022 at 2:50 AM Kent Gibson <warthog618@gmail.com> wrote:
> >
> > On Wed, Feb 16, 2022 at 04:05:12PM +0100, Bartosz Golaszewski wrote:
> > > This makes the gpio-tools tests use the gpio-sim kernel module instead
> > > of the old gpio-mockup.
> > >
> >
> > I have a problem with unconditionally switching the tests to gpiosim as
> > that restricts building and running libgpiod tests to kernel v5.17 or
> > later.
> > That is fine for v2, but v1 is effectively legacy and so tests should
> > still build and run on legacy kernels.
> >
> 
> v1 is going to be supported for an indefinite period of time in the
> v1.6.x branch. The master branch is moving forward though. I'm
> applying changes that can go into v2 already to master and the big API
> change is still WIP so it's kept in the next/libgpiod-2.0 branch.
> 
> Only master will get this patch, not v1.6.x - it keeps using
> gpio-mockup because users depend on it - for instance
> meta-openembedded has a ptest package running the libgpiod tests based
> on gpio-mockup.

Oh, ok.  I was thinking [libgpiod] patches applied to the v1 branch and
[libgpiod v2] applied to v2. And that any common improvements, so
[libgpiod] patches that don't conflict with v2, would also be applied to v2.

That still makes sense to me, btw, as otherwise you get patches like this
where is it unclear if it is meant for master or v1.6.x.
Or is there another prefix for legacy?

> 
> > What is the benefit of the switch (other than exercising gpiosim)?
> >
> 
> So this conversion is pretty much one-to-one for now but just like the
> core C tests - gpio-sim will enable us to drop using gpioset when
> testing gpioget for instance (we can use hogs but I need to add this).
> We can also have gaps in line names etc.
> 

Fair enough.  I'm tempted to argue whether those improvements would actually
improve overall test coverage, but it certainly is more flexible and nicer
to use than mockup.
And I notice the tests also run faster as they doesn't have to do the mockup
module loading.  Yay.

Cheers,
Kent.

      reply	other threads:[~2022-02-19  0:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-16 15:05 [libgpiod][PATCH] tools: port the test-suite to using gpio-sim Bartosz Golaszewski
2022-02-17  1:50 ` Kent Gibson
2022-02-18  9:22   ` Bartosz Golaszewski
2022-02-19  0:37     ` Kent Gibson [this message]

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=20220219003712.GA12202@sol \
    --to=warthog618@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    /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.
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 NNTP newsgroup(s).