linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Maxime Ripard <mripard@kernel.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Brendan Higgins <brendan.higgins@linux.dev>,
	David Gow <davidgow@google.com>,
	linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/3] drivers: base: Add tests showing devm handling inconsistencies
Date: Fri, 4 Aug 2023 17:01:50 +0200	[thread overview]
Message-ID: <2023080416-suspend-cattail-f048@gregkh> (raw)
In-Reply-To: <2023073131-glimmer-both-05b6@gregkh>

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@kernel.org>
> > 
> > Ping?
> 
> It's in my review queue, still trying to catch up...

I didn't make it here this week, sorry.  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.

thanks,

greg k-h

  reply	other threads:[~2023-08-04 15:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20 12:45 [PATCH v3 0/3] drivers: base: Add tests showing devm handling inconsistencies Maxime Ripard
2023-07-20 12:45 ` [PATCH v3 1/3] drivers: base: Add basic devm tests for root devices Maxime Ripard
2023-07-20 12:45 ` [PATCH v3 2/3] drivers: base: Add basic devm tests for platform devices Maxime Ripard
2023-07-20 12:45 ` [PATCH v3 3/3] drivers: base: Free devm resources when unregistering a device Maxime Ripard
2023-07-31  6:34 ` [PATCH v3 0/3] drivers: base: Add tests showing devm handling inconsistencies Maxime Ripard
2023-07-31  7:28   ` Greg Kroah-Hartman
2023-08-04 15:01     ` Greg Kroah-Hartman [this message]
2023-08-07  6:54       ` Maxime Ripard
2023-08-12 11:07         ` Greg Kroah-Hartman

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=2023080416-suspend-cattail-f048@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=brendan.higgins@linux.dev \
    --cc=davidgow@google.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=rafael@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).