linux/tools/testing/selftests/alsa
Malaya Kumar Rout c845febafd selftests/alsa: Fix format specifier and function mismatch in mixer-test
In the ctl_value_index_valid() function, when validating 64-bit integer
controls (SND_CTL_ELEM_TYPE_INTEGER64), the error message for maximum
value validation has two bugs:

1. Uses snd_ctl_elem_info_get_max() instead of the 64-bit variant
   snd_ctl_elem_info_get_max64()
2. Uses %ld format specifier instead of %lld for long long type

This is inconsistent with the minimum value validation (line 335-339)
which correctly uses get_min64() and %lld. The mismatch can cause:
- Incorrect maximum values being reported on some architectures
- Undefined behavior due to format specifier mismatch
- Potential crashes when printing the error message

Fix by using snd_ctl_elem_info_get_max64() and %lld format specifier
to match the data type and be consistent with the minimum value check.

Signed-off-by: Malaya Kumar Rout <malayarout91@gmail.com>
Link: https://patch.msgid.link/20260705171038.171966-1-malayarout91@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-07-06 10:24:05 +02:00
..
conf.d kselftest/alsa: pcm - move more configuration to configuration files 2023-01-02 15:07:35 +01:00
.gitignore selftests/alsa: Add a few missing gitignore files 2024-11-24 10:31:13 +01:00
alsa-local.h kselftest/alsa: pcm-test: Report cards declared in config but missing 2023-09-20 18:10:50 +02:00
conf.c Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
global-timer.c selftests: ALSA: Cover userspace-driven timers with test 2024-08-18 09:55:55 +02:00
Makefile selftests/alsa: Fix circular dependency involving global-timer 2024-12-20 10:00:41 +01:00
mixer-test.c selftests/alsa: Fix format specifier and function mismatch in mixer-test 2026-07-06 10:24:05 +02:00
pcm-test.c selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
pcm-test.conf kselftest/alsa: pcm - Add more coverage by default 2023-01-02 15:08:24 +01:00
test-pcmtest-driver.c selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
utimer-test.c selftests: ALSA: Skip utimer test when CONFIG_SND_UTIMER is not enabled 2026-03-27 14:40:18 +01:00