On Mon, Dec 06, 2021 at 10:27:26AM -0600, Pierre-Louis Bossart wrote: > > This is added as a kselftest since unlike other ALSA test programs it does > > not require either physical setup of the device or interactive monitoring > what did you mean by 'not require physical setup of the device'? You don't need for example a loopback cable plugging in. > > +// This test will iterate over all cards detected in the system, exercising > would it make sense to test only specific cards? People doing automated > tests might have a USB device for capture of analog loopbacks, or > injection of specific streams for capture, and usually care about > testing such devices - which do need manual setups and wiring btw. It's not really idiomatic for kselftest to require any per system configuration by default - half the thing is that you can just run it and it should do as much as it can sensibly on the system. You could definitely add some command line options for development or manual usage though. > > + snd_ctl_elem_info_get_step64(ctl->info)) { > > + ksft_print_msg("%s value %lld invalid for step %lld minimum %lld\n", > > + ctl->name, int64_val, > > + snd_ctl_elem_info_get_step64(ctl->info), > > + snd_ctl_elem_info_get_min64(ctl->info)); > > + err = -1; > > + } > > + break; > > + > > + default: > > + /* No tests for other types */ > these types include ENUMERATED, BYTES and IEC958, but see below for > ENUMERATED... These are tests that the information returned when we query the card status is coherent, we're not doing any validation at present that the enumeration's return value was sensible. > > + case SND_CTL_ELEM_TYPE_ENUMERATED: > > ... here you are handling ENUMERATED types? > This is a different test, that we can write all valid values.
Attachment:
signature.asc
Description: PGP signature