[pulseaudio] 01/02: Fix test suite failure on alpha. Patch from Michael Cree. Closes: #798248

Felipe Sateler fsateler at moszumanska.debian.org
Thu Sep 10 23:46:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

fsateler pushed a commit to branch master
in repository pulseaudio.

commit 2bf953b4ea17fcc7d1ad90a9670270e83fa3cbe0
Author: Felipe Sateler <fsateler at debian.org>
Date:   Thu Sep 10 20:44:36 2015 -0300

    Fix test suite failure on alpha. Patch from Michael Cree.  Closes: #798248
---
 debian/changelog                                   |  7 ++++
 .../0001-Fix-test-suite-failure-on-Alpha.patch     | 40 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 48 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e4b67b4..2b51d7d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+pulseaudio (6.99.1-2) UNRELEASED; urgency=medium
+
+  * Fix test suite failure on alpha. Patch from Michael Cree. 
+    Closes: #798248
+
+ -- Felipe Sateler <fsateler at debian.org>  Thu, 10 Sep 2015 20:44:12 -0300
+
 pulseaudio (6.99.1-1) experimental; urgency=medium
 
   * New upstream release candidate
diff --git a/debian/patches/0001-Fix-test-suite-failure-on-Alpha.patch b/debian/patches/0001-Fix-test-suite-failure-on-Alpha.patch
new file mode 100644
index 0000000..db8f286
--- /dev/null
+++ b/debian/patches/0001-Fix-test-suite-failure-on-Alpha.patch
@@ -0,0 +1,40 @@
+From: Michael Cree <mcree at orcon.net.nz>
+Date: Thu, 10 Sep 2015 20:40:54 -0300
+Subject: Fix test-suite failure on Alpha
+
+Pulseaudio fails to build on the Alpha architecture due to a failure
+in the volume-test of the test suite. The failure in volume-test occurs
+because it is compiled with -ffast-math which implies
+-ffinite-math-only of which the gcc manual states that it optimizes
+for floating-point arithmetic with the assumption that arguments and
+results are not NaNs or +/-infinity, and futher notes that it may
+result in incorrect output.
+
+On the Alpha platform that is somewhat an understatement as the use of
+non-finite floating-point arithmetic with -ffinite-math-only results in
+a floating-point exception and the termination of the program.
+
+The volume-test converts volumes into decibels (so a zero volume
+becomes a negative infinity) and proceeds to add two volumes (in
+decibels), thus does arithmetic with non-finite floating point numbers
+despite being compiled with -ffast-math!
+---
+ src/tests/volume-test.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/tests/volume-test.c b/src/tests/volume-test.c
+index bd0b01c..76b8206 100644
+--- a/src/tests/volume-test.c
++++ b/src/tests/volume-test.c
+@@ -114,7 +114,10 @@ START_TEST (volume_test) {
+             double q, qq;
+ 
+             p = pa_sw_volume_multiply(v, w);
+-            qq = db + db2;
++	    if (isfinite(db) && isfinite(db2))
++		qq = db + db2;
++	    else
++		qq = -INFINITY;
+             p2 = pa_sw_volume_from_dB(qq);
+             q = l*t;
+             p1 = pa_sw_volume_from_linear(q);
diff --git a/debian/patches/series b/debian/patches/series
index e69de29..389856c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Fix-test-suite-failure-on-Alpha.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-pulseaudio/pulseaudio.git



More information about the pkg-pulseaudio-devel mailing list