diff options
| author | Rodrigo Alencar <rodrigo.alencar@analog.com> | 2026-07-29 09:25:34 +0100 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-09-23 02:53:57 +0100 |
| commit | b9f9044be76f8494ff48bbf438ecc5b15e7bd3d4 (patch) | |
| tree | 8d15c8bbf389de7c3a02d5583068fa3753dbad1d /include | |
| parent | 457dd51f3a3558fb60f6401dd1d33d5d449ea449 (diff) | |
| download | linux-next-b9f9044be76f8494ff48bbf438ecc5b15e7bd3d4.tar.gz linux-next-b9f9044be76f8494ff48bbf438ecc5b15e7bd3d4.zip | |
iio: test: add kunit tests for channel prefix naming generation
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 <rodrigo.alencar@analog.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
