• E
    tests: fix virpcitest with read-only srcdir · e821de2c
    Eric Blake 提交于
    'make distcheck' has been broken since commit 21685c95; basically,
    it emulates the case of a read-only $(srcdir) (such as building
    from a tarball exploded onto a CD-ROM), but we were creating our
    fake pci device as a symlink into $(srcdir) and failing when that
    requires opening the config file for writing:
    
     3) testVirPCIDeviceReset                                             ... libvirt:  error : Failed to open config space file '/sys/bus/pci/devices/0000:00:01.0/config': Permission denied
    
    Fix it by copying rather than symlinking.
    
    * tests/virpcimock.c (make_file): Add parameter to allow binary
    creation; adjust all callers.
    (pci_device_new_from_stub): Copy rather than symlink.
    Signed-off-by: NEric Blake <eblake@redhat.com>
    e821de2c
virpcimock.c 23.7 KB