The test suite for libosmocore fails on big-endian architectures

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Neels Hofmeyr nhofmeyr at sysmocom.de
Wed Dec 9 16:19:51 UTC 2015


On Wed, Dec 09, 2015 at 03:30:25AM -0500, Jaroslav Skarvada wrote:
> Hi,
> 
> thanks, I encountered the same in Fedora on ppc machines.
> Unfortunately, the patch even with '#if OSMO_IS_LITTLE_ENDIAN == 1'

Has the status changed with the patch? According to
 https://buildd.debian.org/status/fetch.php?pkg=libosmocore&arch=powerpc&ver=0.9.0-3&stamp=1449648141
from
 https://buildd.debian.org/status/package.php?p=libosmocore
the test suite has succeeded on powerpc. Does that mean the problem is
resolved?  (Previously, the test smscb failed, now it says "smscb ok")

If not, I could try it, too; asking my fellow geeky neighbor for a BE
machine...


As a side note, even though the above "#if" should work, to me it looks
unusual to explicitly write "== 1". It suffices to remove the "def" from
"#ifdef":

  #if OSMO_IS_LITTLE_ENDIAN
  ...
  #endif

which is skipped when OSMO_IS_LITTLE_ENDIAN == 0 and is run when
OSMO_IS_LITTLE_ENDIAN != 0, more like your typical int-as-boolean logic,
and would also work as expected if OSMO_IS_LITTLE_ENDIAN were 2 ;)

~Neels

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20151209/a2810b89/attachment.bin>


More information about the OpenBSC mailing list