summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorHonghui Jiang <jiang_hh2019@163.com>2026-08-14 11:14:18 +0800
committerMark Brown <broonie@kernel.org>2026-08-14 16:48:52 +0100
commit9b81a87c5244bc139357460a262d4536226ba41d (patch)
tree32f0c4bfd3480eac7b01107c68f63f31a3efad91 /tools/perf/scripts/python
parentaf6aaacd42f74e2139391f9853d770d61ac430ce (diff)
spi: Add KUnit coverage for DMA mapping error paths
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. Signed-off-by: Honghui Jiang <jiang_hh2019@163.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260814031419.43378-5-jiang_hh2019@163.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions