test: fix testsuite-17.10.sh

Make sure /etc/udev/hwdb.d/ exists before creating a file inside it.

Fixes: 95cf8cae77 ("test: add coverage test for udevadm")
This commit is contained in:
Dmitry V. Levin
2023-03-16 03:59:01 +09:00
committed by Yu Watanabe
parent 0e5b4d767a
commit f5b28e6bd8
+1
View File
@@ -137,6 +137,7 @@ udevadm test-builtin uaccess /dev/null
if ! [[ -v ASAN_OPTIONS && "$(systemd-detect-virt -v)" == "qemu" ]]; then
modprobe scsi_debug
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 <<EOF
scsi:*
ID_TEST=test