failures on Raspberry Pi

Adhemerval Zanella adhemerval.zanella@linaro.org
Tue Feb 2 12:17:35 GMT 2021



On 01/02/2021 18:09, Paul Zimmermann wrote:
>        Florian,
> 
>>> I can provide more details if needed. For the tests with "timed out", is there
>>> a way to increase the default timeout threshold?
>>
>> There is TIMEOUTFACTOR for that.
> 
> thank you, with TIMEOUTFACTOR=1000 I still get 3 failures:
> 
> FAIL: elf/tst-glibc-hwcaps-prepend-cache
> FAIL: localedata/sort-test
> FAIL: misc/tst-sysvshm-linux
> 
> $ cat elf/tst-glibc-hwcaps-prepend-cache.out
> tst-glibc-hwcaps-prepend-cache.c:109: numeric comparison failure
>    left: 2 (0x2); from: marker1 ()
>   right: 3 (0x3); from: 3
> error: tst-glibc-hwcaps-prepend-cache.c:118: not true: dlopen (SONAME, RTLD_NOW) == NULL
> error: 2 test failures
> running post-clean rsync

I think this is the missing ld.so.cache for cross-compiling which
should be fixed by a50a080f6b0f958eb30d7520212f25f946ed7f8f.

> 
> $ grep FAIL localedata/sort-test.out
> cmn_TW.UTF-8 xfrm-test FAIL

I am not sure about this one.

> 
> $ cat misc/tst-sysvshm-linux.out
> ../sysdeps/unix/sysv/linux/tst-sysvshm-linux.c:155: numeric comparison failure
>    left: 4278190079 (0xfeffffff); from: ipcinfo.shmmax
>   right: 2147483647 (0x7fffffff); from: tipcinfo.shmmax
> error: 1 test failures

I noticed it on some 32-bit architectures running on 32-bit kernels.  The issue 
is shmctl (IPC_INFO) clamps shmmax on for:

  1. Compat symbols with IPC_64, i.e, 32-bit binaries running on 64-bit kernels.

1246 static int copy_compat_shminfo_to_user(void __user *buf, struct shminfo64 *in,
1247                                         int version)
1248 {
1249         if (in->shmmax > INT_MAX)
1250                 in->shmmax = INT_MAX;

  2. Default symbol with IPC_OLD and glibc always use IPC_64 now. It means that
     32-bit binaries running on 32-bit kernels will not see shmmax being clamped
     anymore.

 801 static inline unsigned long copy_shminfo_to_user(void __user *buf, struct shminfo64 *in, int version)
 802 {
 803         switch (version) {
 804         case IPC_64:
 805                 return copy_to_user(buf, in, sizeof(*in));
 806         case IPC_OLD:
 807             {
 808                 struct shminfo out;
 809 
 810                 if (in->shmmax > INT_MAX)
 811                         out.shmmax = INT_MAX;
 812                 else
 813                         out.shmmax = (int)in->shmmax;

It means that we will need to check if whether the kernel will use the compat
symbols to properly handle on tst-sysvshm-linux.  I am more inclined in just
remove the shmmax tests and add a comment why it is complicated to do a proper
check.

> 
> Are those expected?
> 
> Paul
> 


More information about the Libc-alpha mailing list