[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABVgOSmnf8XbS92f4=-ZX8Of6JUwCy7U2wz2-3udvByDKxXABg@mail.gmail.com>
Date: Thu, 14 Dec 2023 16:51:54 +0800
From: David Gow <davidgow@...gle.com>
To: Maxime Ripard <mripard@...nel.org>
Cc: Rae Moar <rmoar@...gle.com>,
Brendan Higgins <brendan.higgins@...ux.dev>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Matti Vaittinen <mazziesaccount@...il.com>,
Stephen Boyd <sboyd@...nel.org>,
Shuah Khan <skhan@...uxfoundation.org>,
Jonathan Corbet <corbet@....net>,
Kees Cook <keescook@...omium.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, linux-kselftest@...r.kernel.org,
kunit-dev@...glegroups.com, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org,
linux-sound@...r.kernel.org
Subject: Re: [PATCH v2 0/4] kunit: Add helpers for creating test-managed devices
On Wed, 13 Dec 2023 at 23:04, Maxime Ripard <mripard@...nel.org> wrote:
>
> Hi David,
>
> On Fri, Dec 08, 2023 at 06:09:28PM +0800, davidgow@...gle.com wrote:
> > KUnit tests often need to provide a struct device, and thus far have
> > mostly been using root_device_register() or platform devices to create
> > a 'fake device' for use with, e.g., code which uses device-managed
> > resources. This has several disadvantages, including not being designed
> > for test use, scattering files in sysfs, and requiring manual teardown
> > on test exit, which may not always be possible in case of failure.
> >
> > Instead, introduce a set of helper functions which allow devices
> > (internally a struct kunit_device) to be created and managed by KUnit --
> > i.e., they will be automatically unregistered on test exit. These
> > helpers can either use a user-provided struct device_driver, or have one
> > automatically created and managed by KUnit. In both cases, the device
> > lives on a new kunit_bus.
> >
> > This is a follow-up to a previous proposal here:
> > https://lore.kernel.org/linux-kselftest/20230325043104.3761770-1-davidgow@google.com/
> >
> > (The kunit_defer() function in the first patch there has since been
> > merged as the 'deferred actions' feature.)
> >
> > My intention is to take this whole series in via the kselftest/kunit
> > branch, but I'm equally okay with splitting up the later patches which
> > use this to go via the various subsystem trees in case there are merge
> > conflicts.
>
> Could you take (and apply eventually) that patch as part of your series?
> https://lore.kernel.org/linux-kselftest/20231205090405.153140-1-mripard@kernel.org/
>
Thanks -- I've included it in v3 (which fixes a few other issues), and
will take it along with the rest of the series:
https://lore.kernel.org/linux-kselftest/20231214-kunit_bus-v3-0-7e9a287d3048@google.com/T/
Cheers,
-- David
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4003 bytes)
Powered by blists - more mailing lists