Skip to content

Commit 9b6fe79

Browse files
committed
Testsuite: use separate SCSI controller for RAID-1 UEFI testcase
"make testraid -- --uefi" fails. Install and first boot succeed normally under UEFI, but the test then simulates a failed RAID-1 member by wiping the primary disk and rebooting off the surviving mirror disk. That reboot never reaches a login prompt. OVMF only honors QEMU's per-device "bootindex" when disks sit behind separate PCI controllers; sharing one virtio-scsi-pci controller via SCSI LUN makes it always boot LUN 0 regardless of bootindex.
1 parent aeb3483 commit 9b6fe79

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

scripts/check-qemu-install

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,14 @@ def get_qemu_cmd(name, enable_uefi, disk_img, raid=None, iso_img=None, tpm=False
302302
-device scsi-hd,bus=scsi0.0,drive=drive-hd1,id=hd1,bootindex=1'
303303

304304
if raid:
305-
cmd += f' -drive format={disk_format},file={raid},if=none,media=disk,id=drive-hd2,readonly=off' \
306-
f' -device scsi-hd,bus=scsi0.0,drive=drive-hd2,id=hd2,bootindex=2'
305+
# RAID member disks each get their own virtio-scsi-pci controller.
306+
# OVMF only appears to honor QEMU's per-device "bootindex" when disks
307+
# sit behind separate PCI controllers - sharing one controller via
308+
# SCSI LUN makes it always boot LUN 0 regardless of bootinex, which
309+
# breaks the RAID-failure simulation's boot-priority swap under UEFI.
310+
cmd += f' -device virtio-scsi-pci,id=scsi1' \
311+
f' -drive format={disk_format},file={raid},if=none,media=disk,id=drive-hd2,readonly=off' \
312+
f' -device scsi-hd,bus=scsi1.0,drive=drive-hd2,id=hd2,bootindex=2'
307313

308314
if tpm:
309315
cmd += f' -chardev socket,id=chrtpm,path={tpm_sock}' \

0 commit comments

Comments
 (0)