Control: tags -1 patch Hi,
On 07/11/17 14:39, Adrian Bunk wrote: > Source: python-lz4 > Version: 0.10.1+dfsg1-0.1 > Severity: serious > > https://buildd.debian.org/status/package.php?p=python-lz4&suite=sid > > ... > dh_auto_test -a -O--parallel -O--buildsystem=pybuild > I: pybuild base:184: cd > /<<BUILDDIR>>/python-lz4-0.10.1+dfsg1/.pybuild/pythonX.Y_2.7/build; python2.7 > -m nose tests > ..............................................F..... > ====================================================================== > FAIL: test_get_frame_info (test_frame.TestLZ4Frame) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/<<BUILDDIR>>/python-lz4-0.10.1+dfsg1/.pybuild/pythonX.Y_2.7/build/tests/test_frame.py", > line 200, in test_get_frame_info > "contentSize":len(input_data) > AssertionError: {'blockMode': 1, 'blockSizeID': 4, 'contentSize': 0, > 'frameType': 0, 'contentChe [truncated]... != {'blockMode': 1, 'blockSizeID': > 4, 'contentSize': 112, 'frameType': 0, 'contentC [truncated]... > {'blockMode': 1, > 'blockSizeID': 4, > 'contentChecksumFlag': 0, > - 'contentSize': 0, > ? ^ > > + 'contentSize': 112, > ? ^^^ > > 'frameType': 0} The attached patch should fix this. contentSize is an "unsigned long long", but was passing the "int" format to Py_BuildValue so it chopped off the lower/upper (depending on endianness) part of the number. James
--- a/lz4/frame/_frame.c +++ b/lz4/frame/_frame.c @@ -630,7 +630,7 @@ get_frame_info (PyObject * Py_UNUSED (se return NULL; } - return Py_BuildValue ("{s:i,s:i,s:i,s:i,s:i}", + return Py_BuildValue ("{s:i,s:i,s:i,s:i,s:K}", "blockSizeID", frame_info.blockSizeID, "blockMode", frame_info.blockMode, "contentChecksumFlag", frame_info.contentChecksumFlag,
signature.asc
Description: OpenPGP digital signature