target/riscv64 qemu-iotests 040 failed
Host environment
- Operating system: Debian GNU/Linux bookworm/sid
- OS/kernel version: Linux devol 5.16.0-3-amd64 #1 SMP PREEMPT Debian 5.16.11-1 (2022-02-25) x86_64 GNU/Linux
- Architecture: x86
Emulated/Virtualized environment
- Architecture: riscv64
- QEMU flavor: qemu-system-riscv64
- QEMU version: QEMU emulator version 6.2.50 (v6.2.0-2128-g9d662a6b-dirty)
Description of problem
I cross-compiled a riscv64 QEMU flavor based on the most updated code, then make check. Some qemu-iotests failed, 040 041 127 256 267. I mainly focused on test 040 and tried to find out what happened.
Steps to reproduce
- change directory to QEMU source tree root
- ./configure --prefix=~/temp --target-list=riscv64-softmmu
- make
- cd build/tests/qemu-iotests/
- ./check -qcow2 040
Then a lot of error messages(please see attachment). The following log might hint the root cause I thought:
+ Command: /home/qemu/qemu/build/tests/qemu-iotests/../../qemu-system-riscv64 -display none -vga none -chardev socket,id=mon,path=/tmp/tmpwhnx3jq0/qemu-28363-monitor.sock -mon chardev=mon,mode=control -qtest unix:path=/tmp/tmpwhnx3jq0/qemu-28363-qtest.sock -accel qtest -nodefaults -display none -accel qtest -drive if=none,id=drive0,file=/home/qemu/qemu/build/tests/qemu-iotests/scratch/test.img,format=qcow2,cache=writeback,aio=threads,node-name=top,backing.node-name=mid,backing.backing.node-name=base -device virtio-scsi -device scsi-hd,id=scsi0,drive=drive0
+ Output: [I 1646574338.669217] OPENED
+qemu-system-riscv64: -device virtio-scsi: No 'PCI' bus found for device 'virtio-scsi-pci'
The command had no '-machine' argument. For riscv64 target, 'spike' will be the default machine. Maybe 'spike' have no PCI bus? Then I tried to change it to 'virt' machine but failed, nothing new happen.
QEMU_DEFAULT_MACHINE=virt ./check -qcow2 040
QEMU_OPTIONS="-machine virt" ./check -qcow2 040
Last, I modified testenv.py and added one line in machine-map, all tests passed!
('riscv64', 'virt'),
Is there any way to easy the issue or do I miss something? Thank you!