[SCM] drumgizmo/master: Add patch to fix testsuite failures
jcowgill at users.alioth.debian.org
jcowgill at users.alioth.debian.org
Fri Oct 13 11:12:55 UTC 2017
The following commit has been merged in the master branch:
commit 286388e9f7ebe5c15c86b12f62a1026d98297e3e
Author: James Cowgill <jcowgill at debian.org>
Date: Fri Oct 13 09:37:00 2017 +0100
Add patch to fix testsuite failures
diff --git a/debian/patches/0003-testsuite.patch b/debian/patches/0003-testsuite.patch
new file mode 100644
index 0000000..cc1206a
--- /dev/null
+++ b/debian/patches/0003-testsuite.patch
@@ -0,0 +1,74 @@
+Description: Fix testsuite failures on various architectures
+ plugingui/image.cc: Fix imagecachetest on big-endian systems. The original
+ code used memcpy which is incorrect on big-endian systems.
+ .
+ src/atomic.h: Fix enginetest on architectures without 64-bit lock free atomics
+ (like 32-bit mips). The code assumed that all atomics except for std::string
+ were lock free which is not true in all architectures.
+ .
+ test/atomictest.cc: Disable podAtomicsAreLockFree because atomics may
+ legitimately not be lock free on some architectures.
+ .
+ test/memcheckertest.cc: Disable tests which rely on the amount of free memory.
+ These tests may fail spuriously if the build system has low free memory (where
+ free does not include swap, buffers, etc).
+Author: James Cowgill <jcowgill at debian.org>
+Bug-Debian: https://bugs.debian.org/872586
+Forwarded: no
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/plugingui/image.cc
++++ b/plugingui/image.cc
+@@ -86,10 +86,16 @@ void Image::setError()
+
+ std::uint32_t iw, ih;
+
+- std::memcpy(&iw, ptr, sizeof(uint32_t));
++ iw = (uint32_t) ptr[0] |
++ (uint32_t) ptr[1] << 8 |
++ (uint32_t) ptr[2] << 16 |
++ (uint32_t) ptr[3] << 24;
+ ptr += sizeof(uint32_t);
+
+- std::memcpy(&ih, ptr, sizeof(uint32_t));
++ ih = (uint32_t) ptr[0] |
++ (uint32_t) ptr[1] << 8 |
++ (uint32_t) ptr[2] << 16 |
++ (uint32_t) ptr[3] << 24;
+ ptr += sizeof(uint32_t);
+
+ _width = iw;
+--- a/src/atomic.h
++++ b/src/atomic.h
+@@ -151,8 +151,6 @@ public:
+ SettingRef(Atomic<T>& value)
+ : value(value)
+ {
+- // string isn't lock free either
+- assert((std::is_same<T, std::string>::value || value.is_lock_free()));
+ }
+
+ bool hasChanged()
+--- a/test/atomictest.cc
++++ b/test/atomictest.cc
+@@ -40,7 +40,6 @@ class AtomicTest
+ CPPUNIT_TEST(nonPodAtomicCanBeValueInitialized);
+ CPPUNIT_TEST(podAtomicCanBeValueAssigned);
+ CPPUNIT_TEST(nonPodAtomicCanBeValueAssigned);
+- CPPUNIT_TEST(podAtomicsAreLockFree);
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+--- a/test/memcheckertest.cc
++++ b/test/memcheckertest.cc
+@@ -48,10 +48,7 @@ class MemCheckerTest
+ , public MemChecker
+ {
+ CPPUNIT_TEST_SUITE(MemCheckerTest);
+- CPPUNIT_TEST(small_drumkit);
+- CPPUNIT_TEST(huge_drumkit);
+ CPPUNIT_TEST(correct_size);
+- CPPUNIT_TEST(check_free_ram);
+ CPPUNIT_TEST_SUITE_END();
+ private:
+ Settings settings;
diff --git a/debian/patches/series b/debian/patches/series
index 71a4f64..1e44b99 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
0001-alsa-kFreeBSD.patch
0002-disable-lv2-test.patch
+0003-testsuite.patch
--
drumgizmo packaging
More information about the pkg-multimedia-commits
mailing list