Re: [libvirt PATCH v3 10/11] nodedev: Add testing for 'mdevctl stop'

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

 



On Tue, Jun 16, 2020 at 09:27:58AM -0500, Jonathon Jongsma wrote:
> Test that we run 'mdevctl' with the proper arguments when we destroy
> mediated devices with virNodeDeviceDestroy()
>
> Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
> ---
>  tests/nodedevmdevctldata/mdevctl-stop.argv |  1 +
>  tests/nodedevmdevctltest.c                 | 42 ++++++++++++++++++++++
>  2 files changed, 43 insertions(+)
>  create mode 100644 tests/nodedevmdevctldata/mdevctl-stop.argv
>
> diff --git a/tests/nodedevmdevctldata/mdevctl-stop.argv b/tests/nodedevmdevctldata/mdevctl-stop.argv
> new file mode 100644
> index 0000000000..3dbaab671b
> --- /dev/null
> +++ b/tests/nodedevmdevctldata/mdevctl-stop.argv
> @@ -0,0 +1 @@
> +$MDEVCTL_BINARY$ stop -u e2451f73-c95b-4124-b900-e008af37c576
> diff --git a/tests/nodedevmdevctltest.c b/tests/nodedevmdevctltest.c
> index 8d226e012b..dbaaa9756e 100644
> --- a/tests/nodedevmdevctltest.c
> +++ b/tests/nodedevmdevctltest.c
> @@ -110,6 +110,42 @@ testMdevctlStartHelper(const void *data)
>                              jsonfile);
>  }
>
> +static int
> +testMdevctlStop(const void *data)
> +{
> +    const char *uuid = data;
> +    virBuffer buf = VIR_BUFFER_INITIALIZER;
> +    const char *actualCmdline = NULL;
> +    int ret = -1;
> +    g_autoptr(virCommand) cmd = NULL;
> +

I'd drop this empty line, since the definition below is part of the block.

Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx>




[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