Skip to content

Commit 6e19364

Browse files
authored
Merge pull request #1271 from c-po/smoketest-raid-uefi
Testsuite: T9217: use separate SCSI controller for RAID-1 UEFI testcase
2 parents d7af8ee + cc7e069 commit 6e19364

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 bootindex, 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)