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)
commit3f48b137d88e710b67b2bcc01aa3d77b4db610c4
tree6fbb86249e30aee608e4ac150eb363a60cbacda3
parent0f7e5ee62f4c24ca9db58351c86653cc3ee0bd0e
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