mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-08 12:41:29 +00:00
virbuf: improve testsuite reporting
I had some temporary test failures while working on virbuf improvements in later patches, with output that looked like: Expected [<] Actual [ <] which is pretty hard to figure out. Adding an Offset designation made it much easier to find which particular '<' was at the wrong indentation, to fix the right part of the code. * tests/testutils.c (virtTestDifference): Make it easier to diagnose test failures.
This commit is contained in:
parent
5c09b81be7
commit
ef696300e6
@ -363,7 +363,7 @@ int virtTestDifference(FILE *stream,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Show the trimmed differences */
|
/* Show the trimmed differences */
|
||||||
fprintf(stream, "\nExpect [");
|
fprintf(stream, "\nOffset %d\nExpect [", (int) (expectStart - expect));
|
||||||
if ((expectEnd - expectStart + 1) &&
|
if ((expectEnd - expectStart + 1) &&
|
||||||
fwrite(expectStart, (expectEnd-expectStart+1), 1, stream) != 1)
|
fwrite(expectStart, (expectEnd-expectStart+1), 1, stream) != 1)
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user