Inspired by your fake-devices-wrapper in ubuntu-drivers-common in Ubuntu I am trying to generate fake PCI devices to pass to a virtual machine (QEMU) to test automatic detection of drivers for installation. Although to do this I need to get the output of lspci to pass the host address to the vfio-pci driver in qemu.
The problem is that I get the following when trying to run lspci with the wrapper script (w/ the aticard device for example):
lspci: sysfs_scan: Couldn't parse entry name aticard
This happens with all of the devices and I haven't figured out a way to make sysfs_scan happy.
I enabled extra logging with UMOCKDEV_DEBUG=all and an extra line is printed:
testbed wrapped opendir(/sys/bus/pci/devices) -> /tmp/umockdev.DDN3K2/sys/bus/pci/devices
which is correct. I suspect there's something I missing with the setup of the test devices, but I'm not sure how to investigate further.
Any hints on how to debug this further (or tips for mocking devices in a VM) would be greatly appreciated.
Inspired by your
fake-devices-wrapperin ubuntu-drivers-common in Ubuntu I am trying to generate fake PCI devices to pass to a virtual machine (QEMU) to test automatic detection of drivers for installation. Although to do this I need to get the output oflspcito pass the host address to thevfio-pcidriver in qemu.The problem is that I get the following when trying to run
lspciwith the wrapper script (w/ the aticard device for example):This happens with all of the devices and I haven't figured out a way to make sysfs_scan happy.
I enabled extra logging with
UMOCKDEV_DEBUG=alland an extra line is printed:which is correct. I suspect there's something I missing with the setup of the test devices, but I'm not sure how to investigate further.
Any hints on how to debug this further (or tips for mocking devices in a VM) would be greatly appreciated.