[Spice-devel] [vdagent-win PATCH] tests: Workaround a possible ImageMagick bug
Christophe Fergeau
cfergeau at redhat.com
Wed Oct 11 11:24:42 UTC 2017
On Wed, Oct 11, 2017 at 11:30:38AM +0100, Frediano Ziglio wrote:
> Some release of ImageMagick contains a bug in compare
> utility which uses uninitialized data.
> This currently happens on Fedora 25 and 26.
nack, this happens to fix it on a specific scenario, there is absolutely
no guarantee this is going to "work" everywhere.
Let's fix imagemagick instead. If that's a very big issue, we can
disable this test for problematic imagemagik versions.
Christophe
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> test-png | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/test-png b/test-png
> index ee9d86e..e942831 100755
> --- a/test-png
> +++ b/test-png
> @@ -18,7 +18,9 @@ verbose() {
> }
>
> compare_images() {
> - DIFF=$(compare -metric AE $1 $2 - 2>&1 > /dev/null || true)
> + # MALLOC_PERTURB_ is to workaround a bug in some compare versions
> + # which use some uninitialized data
> + DIFF=$(MALLOC_PERTURB_=255 compare -metric AE $1 $2 - 2>&1 > /dev/null || true)
> if [ "$DIFF" != "0" ]; then
> error "Images $1 and $2 are too different, diff $DIFF"
> fi
> --
> 2.13.6
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20171011/ea19559f/attachment.sig>
More information about the Spice-devel
mailing list