| 4594d26f | 16-Jul-2024 |
Mark Brown <[email protected]> |
kselftest/alsa: Log the PCM ID in pcm-test
Drivers report a string with a name for each PCM, log it during startup of pcm-test as a diagnostic aid.
Signed-off-by: Mark Brown <[email protected]> Li
kselftest/alsa: Log the PCM ID in pcm-test
Drivers report a string with a name for each PCM, log it during startup of pcm-test as a diagnostic aid.
Signed-off-by: Mark Brown <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
show more ...
|
| b1a7b97a | 16-Jul-2024 |
Mark Brown <[email protected]> |
kselftest/alsa: Use card name rather than number in test names
Currently for the PCM and mixer tests we report test names which identify the card being tested with the card number. This ensures we h
kselftest/alsa: Use card name rather than number in test names
Currently for the PCM and mixer tests we report test names which identify the card being tested with the card number. This ensures we have unique names but since card numbers are dynamically assigned at runtime the names we end up with will often not be stable on systems with multiple cards especially where those cards are provided by separate modules loeaded at runtime. This makes it difficult for automated systems and UIs to relate test results between runs on affected platforms.
Address this by replacing our use of card numbers with card names which are more likely to be stable across runs. We use the card ID since it is guaranteed to be unique by default, unlike the long name. There is still some vulnerability to ordering issues if multiple cards with the same base ID are present in the system but have separate dependencies but not all drivers put distinguishing information in their long names.
Signed-off-by: Mark Brown <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
show more ...
|
| fd38dd6a | 07-Jan-2024 |
Mirsad Todorovac <[email protected]> |
kselftest/alsa - conf: Stringify the printed errno in sysfs_get()
GCC 13.2.0 reported the warning of the print format specifier:
conf.c: In function ‘sysfs_get’: conf.c:181:72: warning: format ‘%s’
kselftest/alsa - conf: Stringify the printed errno in sysfs_get()
GCC 13.2.0 reported the warning of the print format specifier:
conf.c: In function ‘sysfs_get’: conf.c:181:72: warning: format ‘%s’ expects argument of type ‘char *’, \ but argument 3 has type ‘int’ [-Wformat=] 181 | ksft_exit_fail_msg("sysfs: unable to read value '%s': %s\n", | ~^ | | | char * | %d
The fix passes strerror(errno) as it was intended, like in the sibling error exit message.
Fixes: aba51cd0949ae ("selftests: alsa - add PCM test") Cc: Mark Brown <[email protected]> Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Cc: Shuah Khan <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Mirsad Todorovac <[email protected]> Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
show more ...
|
| f77a255e | 07-Jan-2024 |
Mirsad Todorovac <[email protected]> |
kselftest/alsa - mixer-test: Fix the print format specifier warning
GCC 13.2.0 compiler issued the following warning:
mixer-test.c:350:80: warning: format ‘%ld’ expects argument of type ‘long int’,
kselftest/alsa - mixer-test: Fix the print format specifier warning
GCC 13.2.0 compiler issued the following warning:
mixer-test.c:350:80: warning: format ‘%ld’ expects argument of type ‘long int’, \ but argument 5 has type ‘unsigned int’ [-Wformat=] 350 | ksft_print_msg("%s.%d value %ld more than item count %ld\n", | ~~^ | | | long int | %d 351 | ctl->name, index, int_val, 352 | snd_ctl_elem_info_get_items(ctl->info)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | unsigned int
Fixing the format specifier in call to ksft_print_msg() according to the compiler suggestion silences the warning.
Fixes: 10f2f194663af ("kselftest: alsa: Validate values read from enumerations") Cc: Mark Brown <[email protected]> Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Cc: Shuah Khan <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Mirsad Todorovac <[email protected]> Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
show more ...
|
| 3f47c1eb | 07-Jan-2024 |
Mirsad Todorovac <[email protected]> |
kselftest/alsa - mixer-test: Fix the print format specifier warning
The GCC 13.2.0 compiler issued the following warning:
mixer-test.c: In function ‘ctl_value_index_valid’: mixer-test.c:322:79: war
kselftest/alsa - mixer-test: Fix the print format specifier warning
The GCC 13.2.0 compiler issued the following warning:
mixer-test.c: In function ‘ctl_value_index_valid’: mixer-test.c:322:79: warning: format ‘%lld’ expects argument of type ‘long long int’, \ but argument 5 has type ‘long int’ [-Wformat=] 322 | ksft_print_msg("%s.%d value %lld more than maximum %lld\n", | ~~~^ | | | long long int | %ld 323 | ctl->name, index, int64_val, 324 | snd_ctl_elem_info_get_max(ctl->info)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | long int
Fixing the format specifier as advised by the compiler suggestion removes the warning.
Fixes: 3f48b137d88e7 ("kselftest: alsa: Factor out check that values meet constraints") Cc: Mark Brown <[email protected]> Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Cc: Shuah Khan <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Mirsad Todorovac <[email protected]> Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
show more ...
|
| 7d43f51e | 20-Jun-2023 |
Nícolas F. R. A. Prado <[email protected]> |
kselftest/alsa: pcm-test: Decrease stream duration from 4 to 2 seconds
Currently test_pcm_time() streams audio on each PCM with each configuration for 4 seconds. This time can add up, and with the c
kselftest/alsa: pcm-test: Decrease stream duration from 4 to 2 seconds
Currently test_pcm_time() streams audio on each PCM with each configuration for 4 seconds. This time can add up, and with the current 45 second kselftest timeout, some machines like mt8192-asurada-spherion can't even run to completion. Lower the duration to 2 seconds to cut the test duration in half, without reducing the test coverage.
Signed-off-by: Nícolas F. R. A. Prado <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
show more ...
|
| 38bd221a | 23-Mar-2023 |
Mark Brown <[email protected]> |
kselftest/alsa - pcm-test: Don't include diagnostic message in test name
When reporting errors or skips we currently include the diagnostic message indicating why we're failing or skipping. This isn
kselftest/alsa - pcm-test: Don't include diagnostic message in test name
When reporting errors or skips we currently include the diagnostic message indicating why we're failing or skipping. This isn't ideal since KTAP defines the entire print as the test name, so if there's an error then test systems won't detect the test as being the same one as a passing test. Move the diagnostic to a separate ksft_print_msg() to avoid this issue, the test name part will always be the same for passes, fails and skips and the diagnostic information is still displayed.
Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
show more ...
|