A couple of comments...

1. The idmap code implements a collection used to trace the use of
generic ids ( unsigned int ).  It's only usage within ofono is within
the gprs code for the purpose of tracking context ids.

2. The code uses bit arrays overlaid onto unsigned longs.  The bits are
set/cleared using a bit shit operator ( << ).  From what I can tell this
operation only supports 32-bits, and wraps when given a value that
exceeds 32 bits.

3. On standard 64-bit architectures, the bit-shift operator wraps as
described above.  On ppc64le, it returns 0 past 32-bits.   This is what
causes the failure of the idmap_alloc_next() operation when it's
expected to wrap from the maximum idmap value to the minimum ( if
available ).

4. I'm working on creating a pull-request which will adjust the unit
test to use a smaller idmap, and to exclude the wrap case ( ie. from
256->1 ).


** Changed in: ofono (Ubuntu)
       Status: Confirmed => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1271284

Title:
  [powerpc] Unit tests don't run

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ofono/+bug/1271284/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to