On Wed, 22 Jul 2026 16:50:16 +0100
Rodrigo Alencar via B4 Relay <[email protected]> 
wrote:

> From: Rodrigo Alencar <[email protected]>
> 
> Add a KUnit test suite covering __iio_chan_prefix_emit(), the helper
> that builds IIO sysfs attribute name prefixes from an iio_chan_spec.
> The suite groups cases by the enum iio_shared_by mode it exercises:
> 
>   - IIO_SHARED_BY_ALL: produces an empty prefix.
>   - IIO_SHARED_BY_DIR: emits direction only ("in" / "out").
>   - IIO_SHARED_BY_TYPE: emits "<dir>_<type>" and the differential
>     "<dir>_<type>-<type>" variant.
>   - IIO_SEPARATE: covers the full matrix of indexed, differential,
>     modified, output and extend_name combinations, plus the two
>     documented error paths (differential without indexed, differential
>     with modifier).
> 
> A final case exercises the seq_buf overflow path by passing an
> undersized buffer and expects -EOVERFLOW.
> 
> Also, an entry is created under MAINTAINERS dedicated to tests for IIO
> core helpers.
> 
> Signed-off-by: Rodrigo Alencar <[email protected]>
https://sashiko.dev/#/patchset/20260722-ad9910-iio-driver-v9-0-459d1df5ac56%40analog.com

Calls out missing MODULE_LICENSE()

If nothing else comes up I'll take the SPDX tag as expressing your preferences
and add the missing macro.  Please do shout if you'd prefer something else!

Please check the reset of sashiko though.  I'm not sure on the firmware
related ones (new I think?) and have to much of a backlog to go digging
today.

I might comment on some of the others as I take a fresh look

Jonathan



> diff --git a/drivers/iio/test/iio-test-channel-prefix.c 
> b/drivers/iio/test/iio-test-channel-prefix.c
> new file mode 100644
> index 000000000000..d049e4222c40
> --- /dev/null
> +++ b/drivers/iio/test/iio-test-channel-prefix.c
> @@ -0,0 +1,304 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Unit tests for IIO channel prefix generation.
> + */

...

> +MODULE_IMPORT_NS("EXPORTED_FOR_KUNIT_TESTING");
> 


Reply via email to