1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
target/riscv64 qemu-iotests 040 failed
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:
1. change directory to QEMU source tree root
2. ./configure --prefix=~/temp --target-list=riscv64-softmmu
3. make
4. cd build/tests/qemu-iotests/
5. ./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](https://gitlab.com/qemu-project/qemu/-/blob/master/tests/qemu-iotests/testenv.py#L239) 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!
Additional information:
[zlog.riscv.xz](/uploads/cbbad7c5c256d2b49d220aa6425e2b17/zlog.riscv.xz)
|