Re: [PATCH 3/4] qemuxml2argvtest: drop FLAG_EXPECT_ERROR

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

 



On Wed, Apr 13, 2016 at 09:51:40 +0200, Ján Tomko wrote:
> It is only used for failed address allocation
> Since we already have FLAG_EXPECT_FAILURE, use that instead.
> ---
>  tests/qemuxml2argvtest.c | 31 +++++++++++--------------------
>  1 file changed, 11 insertions(+), 20 deletions(-)
> 
> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
> index 975e358..2a57176 100644
> --- a/tests/qemuxml2argvtest.c
> +++ b/tests/qemuxml2argvtest.c

> @@ -354,20 +353,15 @@ static int testCompareXMLToArgvFiles(const char *xml,
>      ret = 0;
>  
>   ok:
> -    if (ret == 0 &&
> -        ((flags & FLAG_EXPECT_ERROR) ||
> -         (flags & FLAG_EXPECT_FAILURE))) {
> +    if (ret == 0 && flags & FLAG_EXPECT_FAILURE) {
>          ret = -1;
>          VIR_TEST_DEBUG("Error expected but there wasn't any.\n");
>          goto out;
>      }
>      if (!virtTestOOMActive()) {
> -        if (flags & FLAG_EXPECT_ERROR) {
> +        if (flags & FLAG_EXPECT_FAILURE) {
>              if ((log = virtTestLogContentAndReset()))
>                  VIR_TEST_DEBUG("Got expected error: \n%s", log);
> -        } else if (flags & FLAG_EXPECT_FAILURE) {
> -            VIR_TEST_DEBUG("Got expected failure: %s\n",
> -                           virGetLastErrorMessage());

This is a semantic change in the format of error messages reported by
the test:

Current message:
541) QEMU XML-2-ARGV machine-aeskeywrap-off-cap                        ... Got expected failure: unsupported configuration: key wrap support is not available with this QEMU binary
OK

New format:
541) QEMU XML-2-ARGV machine-aeskeywrap-off-cap                        ... Got expected error: 
2016-04-13 10:35:46.726+0000: 263072: error : qemuBuildMachineCommandLine:6739 : unsupported configuration: key wrap support is not available with this QEMU binary
OK

I think I prefer the new one since it also carries the function name.

You need to mention that change in the commit message though.

ACK with ^^

Peter

Attachment: signature.asc
Description: 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]