Skip to content

selftests: ALSA: pcmtest: Test error injection and pause

HyeongJun An linux-kselftest linux-sound lkml 1 version Applied

Status from this message: Applied to for-next branch now. Thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3selftests: ALSA: pcmtest: Move the capture data check into a helpertools/testing/selftests/alsa/test-pcmtest-driver.c+20 -90 replies
2/3selftests: ALSA: pcmtest: Test errors from the PCM callbackstools/testing/selftests/alsa/test-pcmtest-driver.c+89 -00 replies
3/3selftests: ALSA: pcmtest: Test pausing a capture streamtools/testing/selftests/alsa/test-pcmtest-driver.c+49 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] selftests: ALSA: pcmtest: Test error injection and pause

The pcmtest driver can return errors from its PCM callbacks and supports pause, but the selftest covers neither. This series adds tests for both.

Patch 1 moves the capture data check into a helper, so patch 3 can reuse it. Patch 2 tests each inject_*_err parameter. Patch 3 tests pausing a capture stream.

Tested on x86_64 with the sound/for-next driver, built for a 6.17 host. All 10 tests pass in three runs. To check that the pause test catches real bugs, I loaded two broken drivers. One keeps running on PAUSE_PUSH. The other restarts the data on PAUSE_RELEASE. Only capture_pause fails on each.

HyeongJun An (3):
selftests: ALSA: pcmtest: Move the capture data check into a helper
selftests: ALSA: pcmtest: Test errors from the PCM callbacks
selftests: ALSA: pcmtest: Test pausing a capture stream

 .../selftests/alsa/test-pcmtest-driver.c      | 167 +++++++++++++++++-
 1 file changed, 158 insertions(+), 9 deletions(-)
Signature · 1 line
2.43.0