mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Honghui Jiang <jiang_hh2019@163.com>
Cc: Mark Brown <broonie@kernel.org>,
	Andy Shevchenko <andy@kernel.org>,
	Serge Semin <fancer.lancer@gmail.com>,
	Brendan Higgins <brendan.higgins@linux.dev>,
	David Gow <david@davidgow.net>, Rae Moar <raemoar63@gmail.com>,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com
Subject: Re: [PATCH v2 4/4] spi: Add KUnit coverage for DMA mapping error paths
Date: Fri, 14 Aug 2026 15:27:13 +0300	[thread overview]
Message-ID: <an8JaNLIy4je-tiG@ashevche-desk.local> (raw)
In-Reply-To: <20260814031419.43378-5-jiang_hh2019@163.com>

On Fri, Aug 14, 2026 at 11:14:18AM +0800, Honghui Jiang wrote:
> Add KUnit tests for the __spi_map_msg() error paths. The tests verify
> that a later TX or RX mapping failure clears the mapping state of
> earlier transfers and leaves cur_{tx,rx}_dma_dev identifying the
> current mapping device.
> 
> A zero-length transfer causes sg_alloc_table() to return -EINVAL,
> providing deterministic failure injection without test hooks.
> Additional cases cover successful map/unmap and a message which
> requires no mapping.
> 
> Build the DMA suite as a separate translation unit, exposing the two
> internal mapping helpers only for KUnit through the local internal
> header. Enable SPI in the default and all-tests KUnit configurations so
> the suite is exercised there.

...

> +++ b/tools/testing/kunit/configs/default.config
> @@ -1,3 +1,4 @@
>  CONFIG_KUNIT=y
>  CONFIG_KUNIT_EXAMPLE_TEST=y
>  CONFIG_KUNIT_ALL_TESTS=y
> +CONFIG_SPI=y

This is a stray change.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-08-14 12:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14  3:14 [PATCH v2 0/4] spi: Fix DMA mapping ownership on partial map failure Honghui Jiang
2026-08-14  3:14 ` [PATCH v2 1/4] " Honghui Jiang
2026-08-14  3:14 ` [PATCH v2 2/4] spi: Move __spi_unmap_msg() before __spi_map_msg() Honghui Jiang
2026-08-14  3:14 ` [PATCH v2 3/4] spi: Clear current DMA devices when unmapping a message Honghui Jiang
2026-08-14  3:14 ` [PATCH v2 4/4] spi: Add KUnit coverage for DMA mapping error paths Honghui Jiang
2026-08-14 12:27   ` Andy Shevchenko [this message]
2026-08-14 12:49     ` Mark Brown
2026-08-14 17:38       ` Honghui  Jiang
2026-08-14 17:41         ` Mark Brown
2026-08-15  2:32         ` David Gow
2026-08-14 12:28 ` [PATCH v2 0/4] spi: Fix DMA mapping ownership on partial map failure Andy Shevchenko
2026-08-14 15:49 ` Mark Brown

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=an8JaNLIy4je-tiG@ashevche-desk.local \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=andy@kernel.org \
    --cc=brendan.higgins@linux.dev \
    --cc=broonie@kernel.org \
    --cc=david@davidgow.net \
    --cc=fancer.lancer@gmail.com \
    --cc=jiang_hh2019@163.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=raemoar63@gmail.com \
    /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

all inboxes | Powered by JetHome®