]> git.baikalelectronics.ru Git - kernel.git/commit
kselftest: alsa: Add test case for writing invalid values
authorMark Brown <broonie@kernel.org>
Tue, 25 Jan 2022 16:28:24 +0000 (16:28 +0000)
committerTakashi Iwai <tiwai@suse.de>
Wed, 26 Jan 2022 14:59:49 +0000 (15:59 +0100)
commit04de0324e74805eab67a074318623f0a2bee994b
tree8bba147d7d57d7ef2febced6c5c8f0ded728f3b2
parent3421fbd2a96548ccefd8d43b2a641701d2058a27
kselftest: alsa: Add test case for writing invalid values

Attempt to write various invalid values for control types we know about and
check that something sensible happens. The ABI isn't quite as clearly
defined as one might like, rather than generating an error when an invalid
value is written many devices will silently rewrite the value into one that
is valid for the control. The exact value chosen is not predictable so in
the case the write succeeds we just check that the value we read back is
one that is valid for the control.

Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220125162824.3816659-1-broonie@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
tools/testing/selftests/alsa/mixer-test.c