bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

test-strerror_r fails on GNU/Hurd


From: Bernhard Voelker
Subject: test-strerror_r fails on GNU/Hurd
Date: Thu, 30 Dec 2021 18:32:31 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1

Someone reported an unrelated problem for GNU findutils on GNU/Hurd, and in the
process of fixing it, I ran into the following problem of 'test-strerror_r':

Reproducer:

- Prepare a GNU/Hurd VM in VirtualBox:
  - Download Debian/GNU/Hurd image:
    see https://www.gnu.org/software/hurd/hurd/running/debian.html
  - Convert to VDI format usable by VirtualBox:
    see https://www.gnu.org/software/hurd/hurd/running/virtualbox.html
  - Create a VirtualBox Vm with the above image; start it.
    I'll use 'hurd' as hostname in PS1 in the following.

- On my regular Linux box (openSUSE:Tumbleweed):
  - Using gnulib commit: 5209414e95ed830b8b687ae71be8911ef0969e3e
  - Create testdir:
      $ gnulib-tool --create-testdir --with-tests --dir=/tmp/gl-perror  
strerror perror
  - Transfer testdir to GNU/Hurd VM:
      $ rsync -Haxi /tmp/gl-perror hurd:

- Back on the GNU/Hurd VM:
  $ hurd:~$ cd gl-perror && ./configure && make && make check
    ...
    PASS: test-strerror
    ./../build-aux/test-driver: line 117: 21337 Aborted                 (core 
dumped) "$@" >> "$log_file" 2>&1
    FAIL: test-strerror_r

The error in the test-suite.log shows:

  FAIL: test-strerror_r
  =====================

  test-strerror_r.c:112: assertion 'ret == ERANGE || ret == EINVAL' failed
  FAIL test-strerror_r (exit status: 134)

I added a printf for RET:

  $ hurd:~/gl-perror/gltests$ diff -u0 test-strerror_r.c-ORIG test-strerror_r.c
  --- test-strerror_r.c-ORIG      2021-11-27 08:51:22.000000000 +0000
  +++ test-strerror_r.c   2021-12-30 16:48:50.000000000 +0000
  @@ -112 +112 @@
  -              ASSERT (ret == ERANGE || ret == EINVAL);
  +              { printf("ret: %ld\n", ret); ASSERT (ret == ERANGE || ret == 
EINVAL); }

and repeated (after `make test-strerror_r`):

  $ hurd:~/gl-perror/gltests$ ./test-strerror_r
  ret: 1073741858
  ret: 1073741858
  ret: 0
  test-strerror_r.c:112: assertion 'ret == ERANGE || ret == EINVAL' failed
  Aborted

On my openSUSE system, I'm getting 2x "ret: 34" followed by 15x "ret: 22".

FWIW: the Debian on GNU/Hurd image is 32-bit:

  $ hurd:~/gl-perror/gltests$ uname -a
  GNU debian 0.9 GNU-Mach 1.8+git20210809-486/Hurd-0.9 i686-AT386 GNU

  $ hurd:~/gl-perror/gltests$ file ./test-strerror_r
  ./test-strerror_r: ELF 32-bit LSB pie executable, Intel 80386, version 1 
(SYSV), dynamically linked, interpreter \
  /lib/ld.so, BuildID[sha1]=75220036102930bc280d307333e8d101f0cdff3e, for 
GNU/Hurd 0.0.0, with debug_info, not stripped

PFA the 'config.h' from Debian/GNU/Hurd.
A difference to the 'config.h' on openSUSE seems to be thread support.

  $ diff -u0 config.h-hurd config.h-opensuse
  --- /config.h-hurd    2021-12-30 17:28:51.000000000 +0100
  +++ config.h-opensuse 2021-12-30 18:07:01.012269305 +0100
  @@ -314 +314 @@
  -/* #undef HAVE_FREE_POSIX */
  +#define HAVE_FREE_POSIX 1
  @@ -394 +394 @@
  -/* #undef HAVE_PTHREAD_SIGMASK */
  +#define HAVE_PTHREAD_SIGMASK 1
  @@ -535 +535 @@
  -/* #undef HAVE_THREADS_H */
  +#define HAVE_THREADS_H 1
  @@ -695 +695 @@
  -/* #undef USE_POSIX_THREADS_FROM_LIBC */
  +#define USE_POSIX_THREADS_FROM_LIBC 1
  @@ -699 +699 @@
  -#define USE_POSIX_THREADS_WEAK 1
  +/* #undef USE_POSIX_THREADS_WEAK */
  @@ -810 +810 @@
  -#define _FILE_OFFSET_BITS 64
  +/* #undef _FILE_OFFSET_BITS */

Any idea?  Is this a test failure?

Have a nice day,
Berny

Attachment: config.h.gz
Description: application/gzip


reply via email to

[Prev in Thread] Current Thread [Next in Thread]