[PATCH 3/8] kunit: Add test managed platform_device/driver APIs

Stephen Boyd sboyd at kernel.org
Thu Mar 9 15:31:15 PST 2023


Quoting Maxime Ripard (2023-03-03 06:35:28)
> On Fri, Mar 03, 2023 at 03:15:31PM +0800, David Gow wrote:
> > 
> > DRM has a similar thing already (albeit with a root_device, which is
> > more common with KUnit tests generally):
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/drm/drm_kunit_helpers.h
> > 
> > But that's reasonably drm-specific, so it makes sense that it lives
> > with DRM stuff. platform_device is a bit more generic.
> 
> I'd be very happy to get something from the core to address the same
> thing.
> 
> I think the main thing we needed that isn't covered by this patch is we
> wanted the device to be bound to its driver, so with probe being called
> before calling the test (see 57a84a97bbda).
> 

Can you clarify? This patch makes a poor attempt at waiting for the
platform driver to bind, but in reality it may not be bound by the time
the driver register function returns.



More information about the linux-um mailing list