From 3242c61757773b78ce214e47e21eead3348cb533 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Tue, 6 Oct 2026 11:13:05 +0300 Subject: [PATCH] mpd: match the version in the binary for the CI tests mpd 0.24 aborts in main() when /proc/self/status reports more than one thread, before it even parses the command line (src/Main.cxx). qemu-user always reports several, so "mpd --version" cannot run on the emulated CI targets and the generic version check fails there. Add test-version.sh matching the version string compiled into the binary, and drop the two unusable "mpd --version" calls from test.sh, whose failures it silently ignored anyway. Signed-off-by: Alexandru Ardelean --- sound/mpd/test-version.sh | 20 ++++++++++++++++++++ sound/mpd/test.sh | 8 ++------ 2 files changed, 22 insertions(+), 6 deletions(-) create mode 100755 sound/mpd/test-version.sh diff --git a/sound/mpd/test-version.sh b/sound/mpd/test-version.sh new file mode 100755 index 0000000000..c6f90488a8 --- /dev/null +++ b/sound/mpd/test-version.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# shellcheck shell=busybox + +# mpd 0.24 refuses to start when /proc/self/status reports more than one +# thread before main() runs, which it does under qemu-user, so the binary +# cannot be asked for its version on the emulated CI targets. Match the +# version string compiled into it instead. +case "$1" in +mpd-full | mpd-mini) + grep -aqF "$2" /usr/bin/mpd + ;; +mpd-avahi-service) + exit 0 + ;; +*) + echo "Untested package: $1" >&2 + exit 1 + ;; +esac diff --git a/sound/mpd/test.sh b/sound/mpd/test.sh index 4e0c413362..03f03b1df3 100644 --- a/sound/mpd/test.sh +++ b/sound/mpd/test.sh @@ -1,12 +1,8 @@ #!/bin/sh _mpd_test() { - # Version check - mpd --version | grep -F "$2" - - # Confirm the binary reports at least one supported output plugin; - # "null" is always compiled in and safe for testing. - mpd --version | grep -i "null" + # Running mpd is not possible on the emulated CI targets, see + # test-version.sh; only the init script's shell logic is tested here. # Test playlist_directory parsing logic from the init script: # explicit value