[cpl] 01/01: Fix test failure on mips64el. Closes: #753089
Ole Streicher
olebole-guest at moszumanska.debian.org
Thu Jul 3 16:30:10 UTC 2014
This is an automated email from the git hooks/post-receive script.
olebole-guest pushed a commit to branch debian
in repository cpl.
commit da2b49d42d7ec9fc0b22270726597c81a07d6f6f
Author: Ole Streicher <debian at liska.ath.cx>
Date: Thu Jul 3 18:29:55 2014 +0200
Fix test failure on mips64el. Closes: #753089
---
debian/changelog | 6 ++++
debian/patches/fix-ftbs-mips64el.patch | 54 ++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 61 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 93a5bda..3202fb7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+cpl (6.4.2-4) UNRELEASED; urgency=medium
+
+ * Fix test failure on mips64el. Closes: #753089
+
+ -- Ole Streicher <debian at liska.ath.cx> Thu, 03 Jul 2014 18:28:14 +0200
+
cpl (6.4.2-3) unstable; urgency=low
* Workround FTBS on armhf: disable cpl_ffftw-test
diff --git a/debian/patches/fix-ftbs-mips64el.patch b/debian/patches/fix-ftbs-mips64el.patch
new file mode 100644
index 0000000..56d5f39
--- /dev/null
+++ b/debian/patches/fix-ftbs-mips64el.patch
@@ -0,0 +1,54 @@
+Author: Lars Kristian Lundin <llundin at eso.org>
+Description: Fix testing on mips64el
+Bug: #753089
+Url: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=753089#10
+--- a/cplcore/tests/cpl_matrix-test.c
++++ b/cplcore/tests/cpl_matrix-test.c
+@@ -200,6 +200,7 @@
+ FILE * stream;
+ const double * data;
+ cpl_boolean do_bench;
++ cpl_boolean did_fail;
+ cpl_error_code code;
+ const cpl_matrix * null; /* This one is expected to be NULL */
+
+@@ -1579,6 +1580,8 @@
+ cpl_msg_info("", "Try to solve increasingly large systems A^TAx=A^Tb, "
+ "with A(i,j) = 1/(2*n-(1+i+j)) and x(j) = 1");
+
++ k = 0;
++ did_fail = CPL_FALSE;
+ for (size = 1; size < nreps * nelem; size++) {
+ cpl_matrix * p2;
+ double error, residual;
+@@ -1595,6 +1598,12 @@
+ cpl_test_nonnull(product);
+
+ xsolv = cpl_matrix_solve_normal(matrix, product);
++ if (cpl_error_get_code()) {
++ cpl_test_error(CPL_ERROR_SINGULAR_MATRIX);
++ cpl_test_null(xsolv);
++ did_fail = CPL_TRUE;
++ break;
++ }
+ cpl_test_nonnull(xsolv);
+
+ x_min = cpl_matrix_get_min(xsolv);
+@@ -1631,7 +1640,17 @@
+ "x_min=%g, x_max=%g", size, x_min, x_max);
+ break;
+ }
++ k++;
++ }
+
++ if (did_fail) {
++ /* Solving stopped prematurely. Normally, we should stop when the system
++ is near-singular and so ill-conditioned that the solution has an
++ element where not even the most significant bit is correct. For this
++ final iteration we will allow the solver to alternatively fail (due a
++ singular matrix).
++ This should add support for Debian sbuild on mips64el */
++ cpl_test_leq(6, k);
+ }
+
+ cpl_msg_info("", "Compute the determinant of increasingly large "
diff --git a/debian/patches/series b/debian/patches/series
index 2dd308b..5015037 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@ disable_some_tests.patch
no_compiletime_cpucheck.patch
fix_required_versions.patch
serial-tests
+fix-ftbs-mips64el.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/cpl.git
More information about the debian-science-commits
mailing list