[libvirt] [PATCHv3] command: improve behavior on no output
Eric Blake
eblake at redhat.com
Tue Dec 7 22:34:14 UTC 2010
On 12/07/2010 03:17 PM, Matthias Bolte wrote:
>> + if (!outbuf || *outbuf) {
>> + puts("output string not allocated");
>
> The error message doesn't fit to the *outbuf != \0 test.
Fixed by squashing this in:
diff --git i/tests/commandtest.c w/tests/commandtest.c
index 9dea6f3..e956205 100644
--- i/tests/commandtest.c
+++ w/tests/commandtest.c
@@ -633,7 +633,7 @@ static int test17(const void *unused ATTRIBUTE_UNUSED)
}
if (!outbuf || *outbuf) {
- puts("output string not allocated");
+ puts("output buffer is not an allocated empty string");
goto cleanup;
}
VIR_FREE(outbuf);
@@ -655,7 +655,7 @@ static int test17(const void *unused ATTRIBUTE_UNUSED)
}
if (!outbuf || *outbuf || !errbuf || *errbuf) {
- puts("output strings not allocated");
+ puts("output buffers are not allocated empty strings");
goto cleanup;
}
>
> Also what about the case when running /bin/true prints to {std|err}out
> for some reason? :)
Then you deserve a 'make check' failure, to force you to figure out why
your system is hosed. :)
>
> ACK.
Thanks for the review; pushing soon.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101207/5d1c6404/attachment-0001.sig>
More information about the libvir-list
mailing list