[libvirt] [PATCH 3/4] qemuxml2argvtest: drop FLAG_EXPECT_ERROR
Peter Krempa
pkrempa at redhat.com
Wed Apr 13 10:43:20 UTC 2016
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160413/9bdd3887/attachment-0001.sig>
More information about the libvir-list
mailing list