Re: [PATCH 3/3] storage: remove qemu-img help scraping

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

 




On 04/17/2018 05:43 PM, Ján Tomko wrote:
> We have been checking whether qemu-img supports the -o compat
> option by scraping the -help output.
> 
> Since we require QEMU 1.5.0 now and this option was introduced in 1.1,
> assume we support it and ditch the help parsing code along with the
> extra qemu-img invocation.
> 
> Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
> ---
>  src/storage/storage_util.c     | 73 +++---------------------------------------
>  src/storage/storage_util.h     |  1 -
>  tests/storagevolxml2argvtest.c |  5 ++-
>  3 files changed, 6 insertions(+), 73 deletions(-)
> 

[...]

> diff --git a/tests/storagevolxml2argvtest.c b/tests/storagevolxml2argvtest.c
> index 68ee9c3d8..ca44ccd48 100644
> --- a/tests/storagevolxml2argvtest.c
> +++ b/tests/storagevolxml2argvtest.c
> @@ -40,7 +40,6 @@ testCompareXMLToArgvFiles(bool shouldFail,
>                            const char *inputvolxml,
>                            const char *cmdline,
>                            unsigned int flags,
> -                          int imgformat,
>                            unsigned long parse_flags)
>  {
>      char *actualCmdline = NULL;
> @@ -82,7 +81,7 @@ testCompareXMLToArgvFiles(bool shouldFail,
>  
>      cmd = virStorageBackendCreateQemuImgCmdFromVol(obj, vol,
>                                                     inputvol, flags,
> -                                                   create_tool, imgformat,
> +                                                   create_tool,
>                                                     NULL);
>      if (!cmd) {
>          if (shouldFail) {
> @@ -154,7 +153,7 @@ testCompareXMLToArgvHelper(const void *data)
>      result = testCompareXMLToArgvFiles(info->shouldFail, poolxml, volxml,
>                                         inputpoolxml, inputvolxml,
>                                         cmdline, info->flags,
> -                                       info->imgformat, info->parseflags);
> +                                       info->parseflags);
>  
>   cleanup:
>      VIR_FREE(poolxml);
> 

As long as you also remove FMT_OPTIONS and FMT_COMPAT and @imgformat
from testInfo, then

Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx>

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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