Bug ID 920930
Summary kmod test-array failure on ppc64 because qsort do not sort array
Classification openSUSE
Product openSUSE Factory
Version 201502*
Hardware PowerPC-64
OS openSUSE 13.2
Status NEW
Severity Normal
Priority P5 - None
Component Basesystem
Assignee bnc-team-screening@forge.provo.novell.com
Reporter normand@linux.vnet.ibm.com
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

kmod test-array failure on ppc/ppc64 because qsort do not sort array

https://build.opensuse.org/package/show/openSUSE:Factory:PowerPC/kmod
initial reported problems
    === flag_fail:
    [   34s] FAIL: testsuite/test-array
    [   34s] FAIL: testsuite/test-depmod <= tracked by bnc#897845
    ===

After investigation identify a simple code snippet in attached tstqsort.c
that has similar behaviour as above test-array.
The printf in source shows that the qsort call do not sort the array.

I did the trial with a opensuse 13.2 (glibc-2.19-16.4.1.ppc64)
and tumbleweed (glibc-2.21-1.1.ppc64) and the failure is the same on both.

I did gdb source debug of qsort and compared the failing ppc64 case 
with non failing ppc64le case.
The two differs by the (*cmp) __strcmp_power8 function in stdlib/msort.c
that return <= 0 for BE and >0 for LE.
===
          if ((*cmp) (b1, b2, arg) <= 0)
            {
              *(uint64_t *) tmp = *(uint64_t *) b1;
              b1 += sizeof (uint64_t);
              --n1;
            }
          else
            {
              *(uint64_t *) tmp = *(uint64_t *) b2;
              b2 += sizeof (uint64_t);
              --n2;
            }
===

I am wondering if problem could be either a missing patch in glibc for
opensuse, or different options in spec between ppc64 and ppc64le.
https://build.opensuse.org/package/show/openSUSE:Factory:PowerPC/glibc


You are receiving this mail because: