Re: [PATCH 5/6] conf: start testing contents of the new backing chain fields

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

 



On 04/09/14 06:35, Eric Blake wrote:
> The testsuite is absolutely essential to feeling comfortable
> about swapping the backing chain structure over to a new format.
> This patch tests the path settings, and demonstrates that the
> correct short name is being passed to the child.
> 
> * tests/virstoragetest.c (testStorageChain): Test path.
> (mymain): Update expected data.
> 
> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
> ---
>  tests/virstoragetest.c | 69 ++++++++++++++++++++++++++++++++++++++++----------
>  1 file changed, 56 insertions(+), 13 deletions(-)
> 
> diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
> index 093053a..9c2f815 100644
> --- a/tests/virstoragetest.c
> +++ b/tests/virstoragetest.c

> @@ -294,22 +297,28 @@ testStorageChain(const void *args)
> 
>          expBackingDirectory = abs ? data->files[i]->expBackingDirAbs
>              : data->files[i]->expBackingDirRel;
> +        expPath = abs ? data->files[i]->pathAbs
> +            : data->files[i]->pathRel;

This will need to be updated as in 2/6 due of the upstream changes.

>          if (virAsprintf(&expect,
> -                        "store:%s\nraw:%s\ndirectory:%s\nother:%d %d %lld %d",
> +                        "store:%s\nraw:%s\ndirectory:%s\nother:%d %d %lld %d\n"
> +                        "path:%s\n",
>                          NULLSTR(data->files[i]->expBackingStore),
>                          NULLSTR(data->files[i]->expBackingStoreRaw),
>                          NULLSTR(expBackingDirectory),
>                          data->files[i]->expBackingFormat,
>                          data->files[i]->expIsFile,
>                          data->files[i]->expCapacity,
> -                        data->files[i]->expEncrypted) < 0 ||
> +                        data->files[i]->expEncrypted,
> +                        NULLSTR(expPath)) < 0 ||
>              virAsprintf(&actual,
> -                        "store:%s\nraw:%s\ndirectory:%s\nother:%d %d %lld %d",
> +                        "store:%s\nraw:%s\ndirectory:%s\nother:%d %d %lld %d\n"
> +                        "path:%s\n",
>                          NULLSTR(elt->backingStore),
>                          NULLSTR(elt->backingStoreRaw),
>                          NULLSTR(elt->directory),
>                          elt->backingStoreFormat, elt->backingStoreIsFile,
> -                        elt->capacity, !!elt->encryption) < 0) {
> +                        elt->capacity, !!elt->encryption,
> +                        NULLSTR(elt->path)) < 0) {
>              VIR_FREE(expect);
>              VIR_FREE(actual);
>              goto cleanup;

ACK with build failure resolved.

Peter


Attachment: signature.asc
Description: OpenPGP digital signature

--
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]