diff options
| author | HyeongJun An <sammiee5311@gmail.com> | 2026-10-20 19:18:36 +0900 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-10-21 11:36:10 +0200 |
| commit | 317f2ddb6662fca8954e381a1bc632667872c4a3 (patch) | |
| tree | 8298cd1c3a08f30ba3eb30adfb255d0aa5171a67 /scripts/Makefile.thinlto | |
| parent | ecefaa2dc097e07c51231e6831c406d1fdb17557 (diff) | |
| download | linux-317f2ddb6662fca8954e381a1bc632667872c4a3.tar.gz linux-317f2ddb6662fca8954e381a1bc632667872c4a3.zip | |
selftests: ALSA: pcmtest: Check the frame count of each transfer
The tests keep the result of snd_pcm_writei(), snd_pcm_readi() and
their non-interleaved forms in a size_t. A size_t is never negative, so
ASSERT_GE(res, 0) always passes.
The capture tests still catch a failed read when they compare the data.
But the playback tests do not. The driver sets pc_test to 1 when it saw
no corrupted data, and that is also true when it saw no data at all. So
a playback test passes even when every write fails.
Store the result as snd_pcm_sframes_t and check that the whole request
was transferred. The calls block, so a short count means an error.
Fixes: 10b98a4db11a ("selftests: ALSA: Add test for the 'pcmtest' driver")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: HyeongJun An <sammiee5311@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/6f16e2a01f18c0ea069164bab31999182ff6d49e.1792390197.git.sammiee5311@gmail.com
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
