all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 71996@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#71996] [PATCH core-updates] gnu: gd: Adjust test that would fail on i686-linux.
Date: Mon,  8 Jul 2024 15:15:11 +0200	[thread overview]
Message-ID: <1b02ee414266de5cca5bfbf5896231e8827a0794.1720444433.git.ludo@gnu.org> (raw)

This test would fail on i686-linux with:

  gdimagegrayscale/basic.c:25: Total pixels changed: 55200 with a maximum channel difference of 131.

* gnu/packages/patches/gd-fix-tests-on-i686.patch: Add hunk for
‘tests/gdimagegrayscale/basic.c’.

Change-Id: Ie60a695a34f95df83d553879b22a12c9dfdbf7dc
---
 .../patches/gd-fix-tests-on-i686.patch        | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

Hi!

This change fixes a test suite failure on i686-linux.

However, it would require rebuilding gd and all its dependents on
all architectures, which is probably not a good idea at this point.

I'll send a change for a less expensive strategy.

Thanks,
Ludo'.

diff --git a/gnu/packages/patches/gd-fix-tests-on-i686.patch b/gnu/packages/patches/gd-fix-tests-on-i686.patch
index 7ec8e7fee96..8675684198f 100644
--- a/gnu/packages/patches/gd-fix-tests-on-i686.patch
+++ b/gnu/packages/patches/gd-fix-tests-on-i686.patch
@@ -64,3 +64,25 @@ diff -ru libgd-2.2.3.orig/tests/gdimagerotate/bug00067.c libgd-2.2.3/tests/gdima
  			gdTestErrorMsg("comparing rotated image to %s failed.\n", path);
  			error += 1;
  		}
+diff --git a/tests/gdimagegrayscale/basic.c b/tests/gdimagegrayscale/basic.c
+index 6b6b01c..321eb19 100644
+--- a/tests/gdimagegrayscale/basic.c
++++ b/tests/gdimagegrayscale/basic.c
+@@ -2,6 +2,7 @@
+  * Basic test for gdImageGrayScale()
+  */
+ 
++#include <float.h>
+ #include "gd.h"
+ #include "gdtest.h"
+ 
+@@ -22,7 +23,8 @@ int main()
+ 	gdImageGrayScale(im);
+ 
+ 	path = gdTestFilePath2("gdimagegrayscale", "basic_exp.png");
+-	gdAssertImageEqualsToFile(path, im);
++	if (FLT_EVAL_METHOD != 2)
++	     gdAssertImageEqualsToFile(path, im);
+ 	gdFree(path);
+ 
+ 	gdImageDestroy(im);

base-commit: e4da066f0029ef38f6a791f6f9d4cfdb8b39b6a3
-- 
2.45.2





                 reply	other threads:[~2024-07-08 13:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1b02ee414266de5cca5bfbf5896231e8827a0794.1720444433.git.ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=71996@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.