Hi ,

I am running libc-testsuite  linking it statically with musl libraries

Here is my gcc  version: 

gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)

I noticed that setjmp test constantly fails for me with the following error message:

setjmp.c:51: sigismember(&set, 10)==0 failed: siglongjmp failed to restore mask
setjmp test failed, 1 error(s)

However if I comment out all the rest functions calls from testsuite.c file , setjmp alone surprisingly passes as if its failure is somehow connected to other tests. Specifically memstream is the one that affects success/failure of setjmp.

Please see attached output of strace -v -s 512 -F -f -o out_fail.txt ./testsuite ( a failing case when only  memstream and setjmp  are present in testsuite.c file ) and strace -v -s 512 -F -f -o out.txt ./testsuite ( a success case when only setjmp  is present in  testsuite.c file).

Any ideas why the failure happens ?

Thanks,
Tim.