On Sat, Sep 09, 2023 at 12:08:22AM +0100, Mark Brown wrote:
On Fri, Sep 08, 2023 at 02:12:40PM -0400, Nícolas F. R. A. Prado wrote:
When no soundcards are available, it won't be possible to run any tests. Currently, when this happens, in both pcm-test and mixer-test, 0 tests are reported, and the pass exit code is returned. Instead, call ksft_exit_skip() so that the whole test plan is marked as skipped in the KTAP output and it exits with the skip exit code.
Why?
To better reflect the actual test plan status. If 0 tests were run, it doesn't really make sense to say that the test plan passed, rather it was skipped since nothing was run. So with this change, if there's a regression that prevents the soundcard driver from even probing, the result won't be "pass", but "skip", and the reason 'No soundcard available' will be in the logs.
Thanks, Nícolas