kselftest/alsa - mixer-test: Don't fail tests if we can't restore default
authorMark Brown <broonie@kernel.org>
Mon, 6 Mar 2023 14:20:03 +0000 (14:20 +0000)
committerTakashi Iwai <tiwai@suse.de>
Wed, 8 Mar 2023 05:34:29 +0000 (06:34 +0100)
commit7c79b10bea7a9dc1b74e2dbf4a35c19455371662
tree06075c69cb29c30ec6573ea3739fa98626f6f0dc
parentfe15c26ee26efa11741a7b632e9f23b01aca4cc6
kselftest/alsa - mixer-test: Don't fail tests if we can't restore default

If a control has an invalid default value then we might fail to set it
when restoring the default value after our write tests, for example due to
correctly implemented range checks in put() operations. Currently this
causes us to report the tests we were running as failed even when the
operation we were trying to test is successful, making it look like there
are problems where none really exist. Stop doing this, only reporting any
issues during the actual test.

We already have validation for the initial readback being in spec and for
writing the default value back so failed tests will be reported for these
controls, and we log an error on the operation that failed when we write so
there will be a diagnostic warning the user that there is a problem.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230224-alsa-mixer-test-restore-invalid-v1-1-454f0f1f2c4b@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
tools/testing/selftests/alsa/mixer-test.c