[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ckldghyavb6fj2mxfcw5spsr3v2rlyj2br64tnvwl5waz3i6id@zbxu7ipjtlwd>
Date: Mon, 7 Aug 2023 08:54:08 +0200
From: Maxime Ripard <mripard@...nel.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Brendan Higgins <brendan.higgins@...ux.dev>,
David Gow <davidgow@...gle.com>,
linux-kselftest@...r.kernel.org, kunit-dev@...glegroups.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 0/3] drivers: base: Add tests showing devm handling
inconsistencies
Hi,
On Fri, Aug 04, 2023 at 05:01:50PM +0200, Greg Kroah-Hartman wrote:
> On Mon, Jul 31, 2023 at 09:28:47AM +0200, Greg Kroah-Hartman wrote:
> > On Mon, Jul 31, 2023 at 08:34:03AM +0200, Maxime Ripard wrote:
> > > On Thu, Jul 20, 2023 at 02:45:06PM +0200, Maxime Ripard wrote:
> > > > Hi,
> > > >
> > > > This follows the discussion here:
> > > > https://lore.kernel.org/linux-kselftest/20230324123157.bbwvfq4gsxnlnfwb@houat/
> > > >
> > > > This shows a couple of inconsistencies with regard to how device-managed
> > > > resources are cleaned up. Basically, devm resources will only be cleaned up
> > > > if the device is attached to a bus and bound to a driver. Failing any of
> > > > these cases, a call to device_unregister will not end up in the devm
> > > > resources being released.
> > > >
> > > > We had to work around it in DRM to provide helpers to create a device for
> > > > kunit tests, but the current discussion around creating similar, generic,
> > > > helpers for kunit resumed interest in fixing this.
> > > >
> > > > This can be tested using the command:
> > > > ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/base/test/
> > > >
> > > > I added the fix David suggested back in that discussion which does fix
> > > > the tests. The SoB is missing, since David didn't provide it back then.
> > > >
> > > > Let me know what you think,
> > > > Maxime
> > > >
> > > > Signed-off-by: Maxime Ripard <mripard@...nel.org>
> > >
> > > Ping?
> >
> > It's in my review queue, still trying to catch up...
>
> I didn't make it here this week, sorry.
np, I just don't want that patch to disappear into the ether :)
> I kind of worry about encoding the current "odd" functionality in a
> test as being the correct thing, but will look at it closer next week.
I don't think I'm doing that? The tests we've added are all how we think
it should behave, the broken ones being skipped to avoid any failures.
The last patch drops the kunit_skip() to make sure that it's tested
going forward.
So we shouldn't encode the odd behaviour anywhere in this series, unless
I got you wrong?
Maxime
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists