Re: [libvirt] [PATCHv4 07/21] tests: virstoragetest: Fix output when hitting errors
On 06/13/14 05:51, Eric Blake wrote: On 06/11/2014 05:45 AM, Peter Krempa wrote: When the test is failing but the debug output isn't enabled the resulting line would look ugly like and would not contain the actual difference. TEST: virstoragetest .chain member 1!chain member 1!chain member 1! Store the member index in the actual checked string to hide this problem --- tests/virstoragetest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) I know I'm going pretty slow through my review of the series, but didn't I already ACK this one? At any rate, this one's safe to put in now if it is easy to rebase (and I still have my own patch to this file coming up soon when I rework chain lookup, so I'm trying to miminize conflict churn). Yeah, it was ACKed but needed to be rebased as the previous patch in this series creates a conflict. I've rebased it now and pushed. Thanks. Peter signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCHv4 07/21] tests: virstoragetest: Fix output when hitting errors
On 06/11/2014 05:45 AM, Peter Krempa wrote: When the test is failing but the debug output isn't enabled the resulting line would look ugly like and would not contain the actual difference. TEST: virstoragetest .chain member 1!chain member 1!chain member 1! Store the member index in the actual checked string to hide this problem --- tests/virstoragetest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) I know I'm going pretty slow through my review of the series, but didn't I already ACK this one? At any rate, this one's safe to put in now if it is easy to rebase (and I still have my own patch to this file coming up soon when I rework chain lookup, so I'm trying to miminize conflict churn). -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCHv4 07/21] tests: virstoragetest: Fix output when hitting errors
When the test is failing but the debug output isn't enabled the resulting line would look ugly like and would not contain the actual difference. TEST: virstoragetest .chain member 1!chain member 1!chain member 1! Store the member index in the actual checked string to hide this problem --- tests/virstoragetest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index b7383c0..6068612 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -313,6 +313,7 @@ struct testChainData static const char testStorageChainFormat[] = +chain member: %zu\n path:%s\n backingStoreRaw: %s\n capacity: %lld\n @@ -383,7 +384,7 @@ testStorageChain(const void *args) expRelDir = isAbs ? data-files[i]-relDirAbs : data-files[i]-relDirRel; if (virAsprintf(expect, -testStorageChainFormat, +testStorageChainFormat, i, NULLSTR(data-files[i]-path), NULLSTR(data-files[i]-expBackingStoreRaw), data-files[i]-expCapacity, @@ -393,7 +394,7 @@ testStorageChain(const void *args) data-files[i]-type, data-files[i]-format) 0 || virAsprintf(actual, -testStorageChainFormat, +testStorageChainFormat, i, NULLSTR(elt-path), NULLSTR(elt-backingStoreRaw), elt-capacity, @@ -407,7 +408,6 @@ testStorageChain(const void *args) goto cleanup; } if (STRNEQ(expect, actual)) { -fprintf(stderr, chain member %zu, i); virtTestDifference(stderr, expect, actual); VIR_FREE(expect); VIR_FREE(actual); -- 1.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list