linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Marc Zyngier <marc.zyngier@arm.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-gpio <linux-gpio@vger.kernel.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: Re: [PATCH 1/2] irq/irq_sim: provide irq_sim_fire_edge()
Date: Mon, 17 Dec 2018 13:59:05 +0100	[thread overview]
Message-ID: <20181217125905.fwbmipvmx4kahlge@pengutronix.de> (raw)
In-Reply-To: <CAMRc=MdaEPVTx6u0XsLJ8RFH2Kw+8DE1pJMe3H+e3KY2ycETaw@mail.gmail.com>

On Mon, Dec 17, 2018 at 11:32:45AM +0100, Bartosz Golaszewski wrote:
> śr., 5 gru 2018 o 13:38 Bartosz Golaszewski
> <bgolaszewski@baylibre.com> napisał(a):
> >
> > śr., 5 gru 2018 o 13:20 Linus Walleij <linus.walleij@linaro.org> napisał(a):
> > >
> > > On Mon, Dec 3, 2018 at 12:06 PM Uwe Kleine-König
> > > <u.kleine-koenig@pengutronix.de> wrote:
> > > > On Mon, Dec 03, 2018 at 11:57:26AM +0100, Bartosz Golaszewski wrote:
> > >
> > > > > It used to live in the gpio-mockup driver and I generalized it
> > > > > precisely because there was another driver - iio evgen - which was
> > > > > doing basically the same thing. While I don't know if there'll be more
> > > > > users (I'd guess it would be useful for testing purposes of other
> > > > > subsystems) having the same functionality implemented once is better
> > > > > than twice.
> > > >
> > > > The iio testing driver only needs the trigger and relies on an irq that
> > > > then calls the registerd handler. The iio driver doesn't need to tune
> > > > the edge sensitivity though and if your mockup driver just only calls
> > > > the fire routine if the configured sensitivity justifies that,
> > > > everything should work as expected.
> > >
> > > Simulating edges in the generic IRQ simulator codes seems
> > > generally useful to me, even if there is just one user now.
> > >
> > > Certainly for any kind of IRQ testing, it could be interesting to
> > > throw several low-to-high and high-to-low transitions
> > > on a driver and see how it reacts.
> > >
> > > But it is up to the irqchip maintainers to state whether they
> > > agree.
> > >
> >
> > All that would be great, but at this point I just want to fix broken
> > tests in user-space. After that we can think about how to
> > improve/approach simulating interrupts all we want.
> >
> > Marc: is my explanation for using an int instead of bool for
> > irq_sim_fire_edge() fine? Can Linus pick this up for fixes?
> >
> 
> Ping. We have only this week left to fix the regression - can we get
> your Ack Marc?

I don't understand the urge. The problem is that libgpiod's test is
failing. And that is because when userspace requested
IRQF_TRIGGER_FALLING the mockup driver also fires if the line rised and
with my change libgpiod now sees that and wonders about it. Apart from
the test failure both libgpiod and the gpio framework are entirely fine
(AFAICT).

The "fix" under discussion is to modify the mockup driver to only report
a falling irq if the output is set to 0. But it also fires if the value
is already 0 and is set to 0 again. So the problem isn't addressed
completely, but only enough to make libgpiod's test suite report
success.

In my eyes this is not how test-driven development works. Tests are
here to bring breakage into the light. That worked just fine here. And
now as a test fails, the goal is to fix the breakage, but not to change
just enough details to get the test to pass and then urge them through
because "we're already at -rc7 and userspace broke!"

And no, the right fix isn't hard. My concerns were expressed Tuesday
last week, and the problem wasn't important enough since then to fix the
patch set.

But maybe it's just me and the Linux development process changed since I
learned about it and today the demand on quality isn't that high any
more.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2018-12-17 12:59 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20 13:40 [PATCH 0/2] irq/irq_sim: provide a specialized variant of irq_sim_fire() Bartosz Golaszewski
2018-11-20 13:40 ` [PATCH 1/2] irq/irq_sim: provide irq_sim_fire_edge() Bartosz Golaszewski
2018-11-20 17:17   ` Uwe Kleine-König
2018-11-21 16:34     ` Bartosz Golaszewski
2018-11-21 19:15       ` Uwe Kleine-König
2018-11-23 15:59         ` Bartosz Golaszewski
2018-11-25 21:18           ` Uwe Kleine-König
2018-11-29 18:14             ` Bartosz Golaszewski
2018-11-30 22:26               ` Linus Walleij
2018-12-02 12:29                 ` Marc Zyngier
2018-12-02 17:00                   ` Bartosz Golaszewski
2018-12-02 21:56               ` Uwe Kleine-König
2018-12-02 22:20                 ` Bartosz Golaszewski
2018-12-03 10:23                   ` Bartosz Golaszewski
2018-12-03 10:49                     ` Uwe Kleine-König
2018-12-03 10:57                       ` Bartosz Golaszewski
2018-12-03 11:06                         ` Uwe Kleine-König
2018-12-05 12:19                           ` Linus Walleij
2018-12-05 12:38                             ` Bartosz Golaszewski
2018-12-05 12:55                               ` Linus Walleij
2018-12-17 10:32                               ` Bartosz Golaszewski
2018-12-17 12:59                                 ` Uwe Kleine-König [this message]
2018-12-17 13:59                                   ` Bartosz Golaszewski
2018-12-05 13:20                             ` Uwe Kleine-König
2018-12-14 14:07                               ` Linus Walleij
2018-12-17 11:19                                 ` Uwe Kleine-König
2018-11-20 13:40 ` [PATCH 2/2] gpio: mockup: use irq_sim_fire_edge() Bartosz Golaszewski
2018-12-03 11:09   ` Uwe Kleine-König
2018-12-11 14:15     ` Uwe Kleine-König
2018-12-11 15:38       ` Bartosz Golaszewski

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=20181217125905.fwbmipvmx4kahlge@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=bgolaszewski@baylibre.com \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=tglx@linutronix.de \
    /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).