Re: [PATCH 2/2] spi: Add KUnit coverage for DMA mapping error paths
Andy Shevchenko <[email protected]>
| Newsgroups | org.kernel.vger.linux-spi,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAHp75Vdhu9QC5D56ZDDYx_x6TqU+FR4KfZP_fdoBDxP7-YuaAw@mail.gmail.com> |
On Thu, Aug 6, 2026 at 12:57 AM Mark Brown <[email protected]> wrote: > On Wed, Aug 05, 2026 at 11:14:56PM +0800, Honghui Jiang wrote: ... > > postcore_initcall(spi_init); > > + > > +#ifdef CONFIG_SPI_KUNIT_TEST > > +#include "tests/spi_kunit.c" > > +#endif > > If this is just so we can peer into the internals it'd be better to add > a local header for internals and build as a separate translation unit > like normal rather than doing this sort of bodge. Yep, and we have kunit/visibility.h in case it is needed. > > diff --git a/drivers/spi/tests/spi_kunit.c b/drivers/spi/tests/spi_kunit.c > > Everywhere else we use - as a separator. I think for kunit tests there is a pattern which is xxx_kunit.c. -- With Best Regards, Andy Shevchenko