]> xenbits.xensource.com Git - libvirt.git/commitdiff
virpcimock: Enable on macOS
authorRoman Bolshakov <r.bolshakov@yadro.com>
Tue, 3 Nov 2020 14:26:29 +0000 (17:26 +0300)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 4 Nov 2020 10:54:02 +0000 (11:54 +0100)
In general, it has little sense to use Linux pci mock on macOS but
virPCIDeviceAddressGetIOMMUGroupNum() is relying on the filesystem
layout mocked by virpcimock. And all tests that rely on correct
execution of virPCIDeviceAddressGetIOMMUGroupNum() fail.

The change fixes qemuhotplugtest, qemumemlocktest and qemuxml2xmltest.

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
tests/virpcimock.c

index 438cb7a6721935ed7d88d1acf5276b5b7b6d8185..5cd688c825538258e52295d67f78b9ecd4a49031 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <config.h>
 
-#if defined(__linux__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)
 # include "virmock.h"
 # include <unistd.h>
 # include <fcntl.h>