test: specify the rootfs by label

otherwise the boot might fail when attaching multiple SATA devices to
the VM.
This commit is contained in:
Frantisek Sumsal 2021-09-13 18:14:05 +02:00
parent 9a89ab26d6
commit bac05644a7

View file

@ -410,7 +410,7 @@ run_qemu() {
fi
kernel_params+=(
"root=/dev/sda1"
"root=LABEL=systemd_boot"
"rw"
"raid=noautodetect"
"rd.luks=0"
@ -1120,9 +1120,9 @@ EOF
udevadm settle
local label=(-L systemd)
local label=(-L systemd_boot)
# mkfs.reiserfs doesn't know -L. so, use --label instead
[[ "$FSTYPE" == "reiserfs" ]] && label=(--label systemd)
[[ "$FSTYPE" == "reiserfs" ]] && label=(--label systemd_boot)
if ! mkfs -t "${FSTYPE}" "${label[@]}" "${LOOPDEV}p1" -q; then
dfatal "Failed to mkfs -t ${FSTYPE}"
exit 1