[libvirt] [PATCH] tests: fix use of fixedcontent variable

Eric Blake eblake at redhat.com
Mon Sep 19 18:56:37 UTC 2016


On 09/19/2016 12:50 PM, Laine Stump wrote:
> Commit 8563560026d192c2cf047b550ffd468692245ed6 switched from
> hardcoded use of strcontent to hardcoded use of fixedcontent
> (fixedcontent is *sometimes* a copy of strcontent with a \n
> appended). This was a problem because sometimes fixedcontent is *not*
> a copy of strcontent, but is instead NULL, leading to the regenerated
> test case output being a 0 length file.
> 
> This patch creates a new const char *cmpcontent initialized to
> strcontent, but changed to fixedcontent if/when fixedcontent is
> created, then always uses cmpcontent instead of (str|fixed)content.
> ---
>  tests/testutils.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

ACK


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160919/69a8647e/attachment-0001.sig>


More information about the libvir-list mailing list