Bug 64987

Summary: FTBFS for some architechtures: test-utils.c:115:test_utils_uint16: assertion failed
Product: libqmi Reporter: marius
Component: libqmiAssignee: Dan Williams <dcbw>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: medium CC: aleksander
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch

Description marius 2013-05-25 18:30:16 UTC
From downstream Debian bug report (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=709655):

"/libqmi-glib/utils/int8: OK
**
ERROR:test-utils.c:115:test_utils_uint16: assertion failed (GUINT16_FROM_LE (tmp) == values[i++]): (3920 == 20495)
make[4]: *** [check-local] Aborted

See the full buildd logs at:

https://buildd.debian.org/status/package.php?p=libqmi
http://buildd.debian-ports.org/status/package.php?p=libqmi&suite=sid
"
Comment 1 Aleksander Morgado 2013-05-28 12:10:36 UTC
I believe it's a bug in the tests themselves.

The LE/BE tests use both the same in_buffer[], and then an extra LE/BE conversion is done in the VAL_EQUAL macro, which I don't think it's right. Instead, there shouldn't be a VAL_EQUAL macro, just comparing the 'tmp' and values[i] integers should be enough, because both are already in Host-Endian. But of course, in this case, we would also need different in_buffer[] arrays in LE and BE tests.
Comment 2 Aleksander Morgado 2013-05-28 13:35:10 UTC
Created attachment 79896 [details] [review]
Patch

Patch to fix the issue.

Comments?
Comment 3 marius 2013-05-28 13:40:42 UTC
Are we able to reproduce/test this anyhow, without uploading a new version to Debian? Using e.g. Qemu or virtualbox?
Comment 4 Aleksander Morgado 2013-05-31 06:16:22 UTC
Patch pushed after testing ok in a mips BE system.
Comment 5 marius 2013-06-12 10:58:50 UTC
Verified that the build problem is solved in Debian: https://buildd.debian.org/status/package.php?p=libqmi

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.