Re: [libvirt PATCH v2 14/15] tests: mock virPCIDevice(BindTo|UnbindFrom)Stub with nop functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 06, 2023 at 02:38:59 -0500, Laine Stump wrote:
> Only in qemuhotplug test, in order to not fail when running the
> test on macOS.
> 
> This is a temporary measure until I decice how best to make a mock
> environment that allows virPCIDeviceFindBestVariant() to succeed on
> non-Linux platforms (which is a bit nonsensical, since none of that
> code will ever run on non-Linux anyway).
> 
> Signed-off-by: Laine Stump <laine@xxxxxxxxxx>
> ---

[...]

> diff --git a/src/util/virpci.h b/src/util/virpci.h
> index faca6cf6f9..4fbace7f67 100644
> --- a/src/util/virpci.h
> +++ b/src/util/virpci.h
> @@ -131,6 +131,9 @@ int virPCIDeviceReset(virPCIDevice *dev,
>                        virPCIDeviceList *activeDevs,
>                        virPCIDeviceList *inactiveDevs);
>  
> +int virPCIDeviceUnbindFromStub(virPCIDevice *dev);
> +int virPCIDeviceBindToStub(virPCIDevice *dev);
> +

You need to use G_NO_INLINE with any function to be mocked

>  void virPCIDeviceSetManaged(virPCIDevice *dev,
>                              bool managed);
>  bool virPCIDeviceGetManaged(virPCIDevice *dev);

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux