[Python-modules-team] Bug#856133: shiboken FTBFS on i386/armel/armhf: other_collector_external_operator test failed
Ivo De Decker
ivodd at debian.org
Thu Apr 13 15:55:54 UTC 2017
Hi,
On Sun, Mar 26, 2017 at 04:48:13PM +0200, Gilles Filippini wrote:
> The problem is that the *2 operation may causes an overflow when the results is > ULONG_MAX.
> To fix the test, either drop the *2, or store unsigned long long into Collector.items(). The easiest being the former, IMHO.
> Patch attached.
Thanks for the patch!
I prepared an NMU. Debdiff attached.
Cheers,
Ivo
-------------- next part --------------
diff -Nru shiboken-1.2.2/debian/changelog shiboken-1.2.2/debian/changelog
--- shiboken-1.2.2/debian/changelog 2016-07-09 16:34:52.000000000 +0200
+++ shiboken-1.2.2/debian/changelog 2017-04-13 17:22:45.000000000 +0200
@@ -1,3 +1,15 @@
+shiboken (1.2.2-3.1) unstable; urgency=medium
+
+ [ Ivo De Decker ]
+ * Non-maintainer upload.
+
+ [ Gilles Filippini ]
+ * New patch fix-collector_external_operator_test.patch to fix an
+ unsigned long overflow in testcase collector_external_operator_test.py
+ Fixes FTBFS (Closes: #856133)
+
+ -- Ivo De Decker <ivodd at debian.org> Thu, 13 Apr 2017 17:22:45 +0200
+
shiboken (1.2.2-3) unstable; urgency=medium
[ Ond?ej Nov? ]
diff -Nru shiboken-1.2.2/debian/patches/fix-collector_external_operator_test.patch shiboken-1.2.2/debian/patches/fix-collector_external_operator_test.patch
--- shiboken-1.2.2/debian/patches/fix-collector_external_operator_test.patch 1970-01-01 01:00:00.000000000 +0100
+++ shiboken-1.2.2/debian/patches/fix-collector_external_operator_test.patch 2017-04-13 17:22:45.000000000 +0200
@@ -0,0 +1,29 @@
+Description: don't *2 the object's identifier because this causes an
+ unsigned long overflow when the result is > ULONG_MAX
+Author: Gilles Filippini <pini at debian.org>
+Bug-Debian: http://bugs.debian.org/856133
+Index: shiboken-1.2.2/tests/libother/otherobjecttype.cpp
+===================================================================
+--- shiboken-1.2.2.orig/tests/libother/otherobjecttype.cpp
++++ shiboken-1.2.2/tests/libother/otherobjecttype.cpp
+@@ -25,6 +25,6 @@
+ Collector&
+ operator<<(Collector& collector, const OtherObjectType& obj)
+ {
+- collector << obj.identifier()*2;
++ collector << obj.identifier();
+ return collector;
+ }
+Index: shiboken-1.2.2/tests/otherbinding/collector_external_operator_test.py
+===================================================================
+--- shiboken-1.2.2.orig/tests/otherbinding/collector_external_operator_test.py
++++ shiboken-1.2.2/tests/otherbinding/collector_external_operator_test.py
+@@ -46,7 +46,7 @@ class CollectorOtherObjectType(unittest.
+ collector = Collector()
+ obj = OtherObjectType()
+ collector << obj
+- self.assertEqual(collector.items()[0], obj.identifier() * 2)
++ self.assertEqual(collector.items()[0], obj.identifier())
+
+ if __name__ == '__main__':
+ unittest.main()
diff -Nru shiboken-1.2.2/debian/patches/series shiboken-1.2.2/debian/patches/series
--- shiboken-1.2.2/debian/patches/series 2016-07-09 16:24:52.000000000 +0200
+++ shiboken-1.2.2/debian/patches/series 2017-04-13 17:22:45.000000000 +0200
@@ -6,3 +6,4 @@
fix_py3_expect.patch
pkg-config-depend-on-python.patch
0008-Cast-ifstream-to-bool-explicitely-to-work-with-GCC-6.patch
+fix-collector_external_operator_test.patch
More information about the Python-modules-team
mailing list