From: Luca Boccassi Date: Fri, 4 Jul 2025 00:18:47 +0000 (+0100) Subject: test: do not fail if scsi_debug module not available X-Git-Tag: v258-rc1~168^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6be8bf2c638ac93c982c95230ed33a408236a4e;p=thirdparty%2Fsystemd.git test: do not fail if scsi_debug module not available On Debian it's only built on amd64 kernels, so skip test cases if it cannot be loaded --- diff --git a/test/units/TEST-17-UDEV.sanity-check.sh b/test/units/TEST-17-UDEV.sanity-check.sh index 7b95722f7a8..98a277a47eb 100755 --- a/test/units/TEST-17-UDEV.sanity-check.sh +++ b/test/units/TEST-17-UDEV.sanity-check.sh @@ -190,8 +190,8 @@ udevadm test-builtin "factory_reset status" "$loopdev" # systemd-hwdb update is extremely slow when combined with sanitizers and run # in a VM without acceleration, so let's just skip the one particular test # if we detect this combination -if ! [[ -v ASAN_OPTIONS && "$(systemd-detect-virt -v)" == "qemu" ]]; then - modprobe scsi_debug +# scsi_debug is not available in all architectures/kernels combinations +if ! [[ -v ASAN_OPTIONS && "$(systemd-detect-virt -v)" == "qemu" ]] && modprobe scsi_debug; then scsidev=$(readlink -f /sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/[0-9]*) mkdir -p /etc/udev/hwdb.d cat >/etc/udev/hwdb.d/99-test.hwdb </dev/null; do sleep 1; done' dev=/dev/$(ls /sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/*:*/block 2>/dev/null) if [[ ! -b "$dev" ]]; then