]> git.baikalelectronics.ru Git - kernel.git/commit
kselftest: alsa: Factor out check that values meet constraints
authorMark Brown <broonie@kernel.org>
Fri, 17 Dec 2021 13:02:12 +0000 (13:02 +0000)
committerTakashi Iwai <tiwai@suse.de>
Sat, 25 Dec 2021 08:13:12 +0000 (09:13 +0100)
commit2d900926a36cd48e0dcdcc1be69816b03d5389cc
tree6fbb86249e30aee608e4ac150eb363a60cbacda3
parent7189fd70f7f7af60c2d4d59eeba8b2e98ab8bc78
kselftest: alsa: Factor out check that values meet constraints

To simplify the code a bit and allow future reuse factor the checks that
values we read are valid out of test_ctl_get_value() into a separate
function which can be reused later. As part of this extend the test to
check all the values for the control, not just the first one.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20211217130213.3893415-2-broonie@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
tools/testing/selftests/alsa/mixer-test.c