On Wed, 09/28 01:31, Gonglei (Arei) wrote:
> # ./tests/virtio-net-test
> **
> ERROR:tests/libqtest.c:561:qtest_get_arch: assertion failed: (qemu != NULL)
> Aborted (core dumped)
> 
> # ./tests/virtio-blk-test
> **
> ERROR:tests/libqtest.c:561:qtest_get_arch: assertion failed: (qemu != NULL)
> Aborted (core dumped)
> 
> But they work after I set the environment variable to specify architecture:
>  
> # QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 ./tests/virtio-net-test
> /x86_64/virtio/net/pci/basic: OK
> /x86_64/virtio/net/pci/rx_stop_cont: OK
> /x86_64/virtio/net/pci/hotplug: OK
> 
> # QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 ./tests/virtio-blk-test
> /x86_64/virtio/blk/pci/basic: OK
> /x86_64/virtio/blk/pci/indirect: OK
> /x86_64/virtio/blk/pci/config: OK
> /x86_64/virtio/blk/pci/msix: OK
> /x86_64/virtio/blk/pci/idx: OK
> /x86_64/virtio/blk/pci/hotplug: OK
> 
> So, Maybe we should add check if the environment relied on is set
> before executing specific operations in this kind of tests. Right?

Or make a guess based on $(realpath $0]) (in this case, print the found path to
avoid testing against wrong binary by mistake).

Fam

Reply via email to