openrisc / or1k-glibc

glibc port for or1k
GNU General Public License v2.0
3 stars 7 forks source link

Sort out test case failures #7

Closed stffrdhrn closed 4 years ago

stffrdhrn commented 4 years ago

Current test summary

    439 FAIL
   4691 PASS
     32 UNRESOLVED
     35 UNSUPPORTED
     19 XFAIL

Details (Unknown)

FAIL: c++-types-check
FAIL: assert/tst-assert-c++
FAIL: assert/tst-assert-g++
FAIL: catgets/test-gencat
FAIL: conform/POSIX2008/signal.h/conform
FAIL: conform/POSIX2008/sys/wait.h/conform
FAIL: conform/UNIX98/signal.h/conform
FAIL: conform/UNIX98/sys/wait.h/conform
FAIL: conform/UNIX98/ucontext.h/conform
FAIL: conform/XOPEN2K/signal.h/conform
FAIL: conform/XOPEN2K/sys/wait.h/conform
FAIL: conform/XOPEN2K/ucontext.h/conform
FAIL: conform/XOPEN2K8/signal.h/conform
FAIL: conform/XOPEN2K8/sys/wait.h/conform
FAIL: conform/XPG42/signal.h/conform
FAIL: conform/XPG42/sys/wait.h/conform
FAIL: conform/XPG42/ucontext.h/conform
FAIL: debug/tst-backtrace2
FAIL: debug/tst-backtrace3
FAIL: debug/tst-backtrace4
FAIL: debug/tst-backtrace5
FAIL: debug/tst-backtrace6
FAIL: debug/tst-chk1
FAIL: debug/tst-chk2
FAIL: debug/tst-chk3
FAIL: debug/tst-chk4
FAIL: debug/tst-chk5
FAIL: debug/tst-chk6
FAIL: debug/tst-lfschk1
FAIL: debug/tst-lfschk2
FAIL: debug/tst-lfschk3
FAIL: debug/tst-lfschk4
FAIL: debug/tst-lfschk5
FAIL: debug/tst-lfschk6
FAIL: debug/tst-longjmp_chk2
FAIL: dirent/list
FAIL: dlfcn/bug-atexit3
FAIL: elf/check-abi-libc
FAIL: elf/check-execstack
FAIL: elf/check-localplt
FAIL: elf/check-textrel
FAIL: elf/tst-absolute-sym
FAIL: elf/tst-absolute-zero
FAIL: elf/tst-ptrguard1
FAIL: elf/tst-rtld-preload
FAIL: elf/tst-stackguard1
FAIL: elf/tst-unwind-main
FAIL: gmon/tst-gmon-gprof
FAIL: gmon/tst-gmon-pie-gprof
FAIL: gmon/tst-gmon-static-gprof
FAIL: iconv/tst-iconv-mt
FAIL: io/tst-lockf
FAIL: io/tst-open-tmpfile
FAIL: io/tst-statx
FAIL: libio/tst-vtables
FAIL: localedata/bug-setlocale1
FAIL: localedata/bug-setlocale1-static
FAIL: localedata/tst-fmon
FAIL: localedata/tst-numeric
FAIL: malloc/tst-dynarray-at-fail
FAIL: malloc/tst-dynarray-fail
FAIL: malloc/tst-malloc-stats-cancellation
FAIL: malloc/tst-malloc-thread-fail
FAIL: malloc/tst-malloc-usable-tunables
FAIL: malloc/tst-mallocfork2
FAIL: math/test-tgmath2
FAIL: misc/test-errno-linux
FAIL: misc/tst-clone2
FAIL: misc/tst-clone3
FAIL: misc/tst-gettid-kill
FAIL: misc/tst-memfd_create
FAIL: misc/tst-mlock2
FAIL: misc/tst-ttyname
FAIL: nptl/test-cond-printers
FAIL: nptl/test-condattr-printers
FAIL: nptl/test-mutex-printers
FAIL: nptl/test-mutexattr-printers
FAIL: nptl/test-rwlock-printers
FAIL: nptl/test-rwlockattr-printers
FAIL: nptl/tst-align-clone
FAIL: nptl/tst-audit-threads
FAIL: nptl/tst-basic3
FAIL: nptl/tst-basic4
FAIL: nptl/tst-call-once
FAIL: nptl/tst-cleanup0
FAIL: nptl/tst-cleanup0-cmp
FAIL: nptl/tst-cleanup1
FAIL: nptl/tst-cleanup3
FAIL: nptl/tst-cleanup4
FAIL: nptl/tst-cleanupx0
FAIL: nptl/tst-cleanupx1
FAIL: nptl/tst-cleanupx3
FAIL: nptl/tst-cleanupx4
FAIL: nptl/tst-cnd-basic
FAIL: nptl/tst-cnd-broadcast
FAIL: nptl/tst-cnd-timedwait
FAIL: nptl/tst-cond-except
FAIL: nptl/tst-cond22
FAIL: nptl/tst-cond24
FAIL: nptl/tst-cond25
FAIL: nptl/tst-cond7
FAIL: nptl/tst-cond8
FAIL: nptl/tst-create-detached
FAIL: nptl/tst-exec5
FAIL: nptl/tst-execstack
FAIL: nptl/tst-exit2
FAIL: nptl/tst-exit3
FAIL: nptl/tst-fini1
FAIL: nptl/tst-getpid1
FAIL: nptl/tst-initializers1
FAIL: nptl/tst-initializers1-c11
FAIL: nptl/tst-initializers1-c89
FAIL: nptl/tst-initializers1-c99
FAIL: nptl/tst-initializers1-gnu11
FAIL: nptl/tst-initializers1-gnu89
FAIL: nptl/tst-initializers1-gnu99
FAIL: nptl/tst-join1
FAIL: nptl/tst-join5
FAIL: nptl/tst-join6
FAIL: nptl/tst-join8
FAIL: nptl/tst-join9
FAIL: nptl/tst-key3
FAIL: nptl/tst-minstack-cancel
FAIL: nptl/tst-minstack-exit
FAIL: nptl/tst-minstack-throw
FAIL: nptl/tst-mtx-basic
FAIL: nptl/tst-mtx-timedlock
FAIL: nptl/tst-mtx-trylock
FAIL: nptl/tst-mutex8
FAIL: nptl/tst-mutexpi8
FAIL: nptl/tst-oddstacklimit
FAIL: nptl/tst-once3
FAIL: nptl/tst-once4
FAIL: nptl/tst-oncex3
FAIL: nptl/tst-oncex4
FAIL: nptl/tst-robust-fork
FAIL: nptl/tst-robust1
FAIL: nptl/tst-robust2
FAIL: nptl/tst-robust3
FAIL: nptl/tst-robust4
FAIL: nptl/tst-robust5
FAIL: nptl/tst-robust6
FAIL: nptl/tst-robust7
FAIL: nptl/tst-rwlock15
FAIL: nptl/tst-sem11
FAIL: nptl/tst-sem12
FAIL: nptl/tst-sem16
FAIL: nptl/tst-stack4
FAIL: nptl/tst-stackguard1
FAIL: nptl/tst-thrd-detach
FAIL: nptl/tst-thrd-sleep
FAIL: nptl/tst-thread-exit-clobber
FAIL: nptl/tst-thread_local1
FAIL: nptl/tst-tls3
FAIL: nptl/tst-tls3-malloc
FAIL: nptl/tst-tls5
FAIL: nptl/tst-tls6
FAIL: nptl/tst-tsd5
FAIL: nptl/tst-tss-basic
FAIL: nptl/tst-unwind-thread
FAIL: nss/tst-cancel-getpwuid_r
FAIL: posix/globtest
FAIL: posix/test-errno
FAIL: posix/tst-getopt-cancel
FAIL: posix/tst-glob_symlinks
FAIL: posix/tst-posix_spawn-setsid
FAIL: posix/tst-spawn2
FAIL: posix/tst-spawn4
FAIL: rt/tst-cpuclock2
FAIL: rt/tst-shm-cancel
FAIL: stdlib/bug-fmtmsg1
FAIL: stdlib/tst-quick_exit
FAIL: stdlib/tst-strtod-underflow
FAIL: stdlib/tst-thread-quick_exit
FAIL: support/tst-support_capture_subprocess
FAIL: support/tst-support_descriptors
FAIL: timezone/tst-tzset

mq_notify not implemented

FAIL: rt/tst-mqueue3
FAIL: rt/tst-mqueue5
FAIL: rt/tst-mqueue6
FAIL: rt/tst-mqueue8
FAIL: rt/tst-mqueue8x

libgcc_s.so.1 must be installed for pthread_cancel to work

FAIL: nptl/tst-cancel-self
FAIL: nptl/tst-cancel-self-cancelstate
FAIL: nptl/tst-cancel-self-canceltype
FAIL: nptl/tst-cancel-self-testcancel
FAIL: nptl/tst-cancel1
FAIL: nptl/tst-cancel10
FAIL: nptl/tst-cancel11
FAIL: nptl/tst-cancel12
FAIL: nptl/tst-cancel13
FAIL: nptl/tst-cancel14
FAIL: nptl/tst-cancel15
FAIL: nptl/tst-cancel16
FAIL: nptl/tst-cancel17
FAIL: nptl/tst-cancel18
FAIL: nptl/tst-cancel2
FAIL: nptl/tst-cancel20
FAIL: nptl/tst-cancel21
FAIL: nptl/tst-cancel22
FAIL: nptl/tst-cancel23
FAIL: nptl/tst-cancel24
FAIL: nptl/tst-cancel25
FAIL: nptl/tst-cancel3
FAIL: nptl/tst-cancel4
FAIL: nptl/tst-cancel4_1
FAIL: nptl/tst-cancel4_2
FAIL: nptl/tst-cancel5
FAIL: nptl/tst-cancel6
FAIL: nptl/tst-cancel7
FAIL: nptl/tst-cancel8
FAIL: nptl/tst-cancel9
FAIL: nptl/tst-cancelx10
FAIL: nptl/tst-cancelx11
FAIL: nptl/tst-cancelx12
FAIL: nptl/tst-cancelx13
FAIL: nptl/tst-cancelx14
FAIL: nptl/tst-cancelx15
FAIL: nptl/tst-cancelx16
FAIL: nptl/tst-cancelx17
FAIL: nptl/tst-cancelx18
FAIL: nptl/tst-cancelx2
FAIL: nptl/tst-cancelx20
FAIL: nptl/tst-cancelx21
FAIL: nptl/tst-cancelx3
FAIL: nptl/tst-cancelx4
FAIL: nptl/tst-cancelx5
FAIL: nptl/tst-cancelx6
FAIL: nptl/tst-cancelx7
FAIL: nptl/tst-cancelx8
FAIL: nptl/tst-cancelx9

Exception "Underflow" not set

FAIL: math/test-double-asinh
FAIL: math/test-double-cacos
FAIL: math/test-double-cacosh
FAIL: math/test-double-casin
FAIL: math/test-double-casinh
FAIL: math/test-double-catanh
FAIL: math/test-double-ccos
FAIL: math/test-double-ccosh
FAIL: math/test-double-cexp
FAIL: math/test-double-clog10
FAIL: math/test-double-csin
FAIL: math/test-double-csinh
FAIL: math/test-double-csqrt
FAIL: math/test-double-ctan
FAIL: math/test-double-ctanh
FAIL: math/test-double-exp10
FAIL: math/test-double-expm1
FAIL: math/test-double-finite-asinh
FAIL: math/test-double-finite-cacos
FAIL: math/test-double-finite-cacosh
FAIL: math/test-double-finite-casin
FAIL: math/test-double-finite-casinh
FAIL: math/test-double-finite-catanh
FAIL: math/test-double-finite-clog10
FAIL: math/test-double-finite-csqrt
FAIL: math/test-double-finite-ctan
FAIL: math/test-double-finite-ctanh
FAIL: math/test-double-finite-expm1
FAIL: math/test-double-finite-j0
FAIL: math/test-double-finite-sinh
FAIL: math/test-double-finite-tan
FAIL: math/test-double-finite-tanh
FAIL: math/test-double-finite-y0
FAIL: math/test-double-j0
FAIL: math/test-double-sinh
FAIL: math/test-double-tan
FAIL: math/test-double-tanh
FAIL: math/test-double-y0
FAIL: math/test-fenv-return
FAIL: math/test-float-ccos
FAIL: math/test-float-ccosh
FAIL: math/test-float-cexp
FAIL: math/test-float-clog10
FAIL: math/test-float-csin
FAIL: math/test-float-csinh
FAIL: math/test-float-erfc
FAIL: math/test-float-finite-clog10
FAIL: math/test-float-finite-erfc
FAIL: math/test-float32-ccos
FAIL: math/test-float32-ccosh
FAIL: math/test-float32-cexp
FAIL: math/test-float32-clog10
FAIL: math/test-float32-csin
FAIL: math/test-float32-csinh
FAIL: math/test-float32-erfc
FAIL: math/test-float32-finite-clog10
FAIL: math/test-float32-finite-erfc
FAIL: math/test-float32x-asinh
FAIL: math/test-float32x-cacos
FAIL: math/test-float32x-cacosh
FAIL: math/test-float32x-casin
FAIL: math/test-float32x-casinh
FAIL: math/test-float32x-catanh
FAIL: math/test-float32x-ccos
FAIL: math/test-float32x-ccosh
FAIL: math/test-float32x-cexp
FAIL: math/test-float32x-clog10
FAIL: math/test-float32x-csin
FAIL: math/test-float32x-csinh
FAIL: math/test-float32x-csqrt
FAIL: math/test-float32x-ctan
FAIL: math/test-float32x-ctanh
FAIL: math/test-float32x-exp10
FAIL: math/test-float32x-expm1
FAIL: math/test-float32x-finite-asinh
FAIL: math/test-float32x-finite-cacos
FAIL: math/test-float32x-finite-cacosh
FAIL: math/test-float32x-finite-casin
FAIL: math/test-float32x-finite-casinh
FAIL: math/test-float32x-finite-catanh
FAIL: math/test-float32x-finite-clog10
FAIL: math/test-float32x-finite-csqrt
FAIL: math/test-float32x-finite-ctan
FAIL: math/test-float32x-finite-ctanh
FAIL: math/test-float32x-finite-expm1
FAIL: math/test-float32x-finite-j0
FAIL: math/test-float32x-finite-sinh
FAIL: math/test-float32x-finite-tan
FAIL: math/test-float32x-finite-tanh
FAIL: math/test-float32x-finite-y0
FAIL: math/test-float32x-j0
FAIL: math/test-float32x-sinh
FAIL: math/test-float32x-tan
FAIL: math/test-float32x-tanh
FAIL: math/test-float32x-y0
FAIL: math/test-float64-asinh
FAIL: math/test-float64-cacos
FAIL: math/test-float64-cacosh
FAIL: math/test-float64-casin
FAIL: math/test-float64-casinh
FAIL: math/test-float64-catanh
FAIL: math/test-float64-ccos
FAIL: math/test-float64-ccosh
FAIL: math/test-float64-cexp
FAIL: math/test-float64-clog10
FAIL: math/test-float64-csin
FAIL: math/test-float64-csinh
FAIL: math/test-float64-csqrt
FAIL: math/test-float64-ctan
FAIL: math/test-float64-ctanh
FAIL: math/test-float64-exp10
FAIL: math/test-float64-expm1
FAIL: math/test-float64-finite-asinh
FAIL: math/test-float64-finite-cacos
FAIL: math/test-float64-finite-cacosh
FAIL: math/test-float64-finite-casin
FAIL: math/test-float64-finite-casinh
FAIL: math/test-float64-finite-catanh
FAIL: math/test-float64-finite-clog10
FAIL: math/test-float64-finite-csqrt
FAIL: math/test-float64-finite-ctan
FAIL: math/test-float64-finite-ctanh
FAIL: math/test-float64-finite-expm1
FAIL: math/test-float64-finite-j0
FAIL: math/test-float64-finite-sinh
FAIL: math/test-float64-finite-tan
FAIL: math/test-float64-finite-tanh
FAIL: math/test-float64-finite-y0
FAIL: math/test-float64-j0
FAIL: math/test-float64-sinh
FAIL: math/test-float64-tan
FAIL: math/test-float64-tanh
FAIL: math/test-float64-y0
FAIL: math/test-idouble-cacos
FAIL: math/test-idouble-cacosh
FAIL: math/test-idouble-casin
FAIL: math/test-idouble-casinh
FAIL: math/test-idouble-ctan
FAIL: math/test-idouble-ctanh
FAIL: math/test-idouble-j0
FAIL: math/test-idouble-tan
FAIL: math/test-idouble-y0
FAIL: math/test-ifloat32x-cacos
FAIL: math/test-ifloat32x-cacosh
FAIL: math/test-ifloat32x-casin
FAIL: math/test-ifloat32x-casinh
FAIL: math/test-ifloat32x-ctan
FAIL: math/test-ifloat32x-ctanh
FAIL: math/test-ifloat32x-j0
FAIL: math/test-ifloat32x-tan
FAIL: math/test-ifloat32x-y0
FAIL: math/test-ifloat64-cacos
FAIL: math/test-ifloat64-cacosh
FAIL: math/test-ifloat64-casin
FAIL: math/test-ifloat64-casinh
FAIL: math/test-ifloat64-ctan
FAIL: math/test-ifloat64-ctanh
FAIL: math/test-ifloat64-j0
FAIL: math/test-ifloat64-tan
FAIL: math/test-ifloat64-y0
FAIL: math/test-ildouble-cacos
FAIL: math/test-ildouble-cacosh
FAIL: math/test-ildouble-casin
FAIL: math/test-ildouble-casinh
FAIL: math/test-ildouble-ctan
FAIL: math/test-ildouble-ctanh
FAIL: math/test-ildouble-j0
FAIL: math/test-ildouble-tan
FAIL: math/test-ildouble-y0
FAIL: math/test-ldouble-asinh
FAIL: math/test-ldouble-cacos
FAIL: math/test-ldouble-cacosh
FAIL: math/test-ldouble-casin
FAIL: math/test-ldouble-casinh
FAIL: math/test-ldouble-catanh
FAIL: math/test-ldouble-ccos
FAIL: math/test-ldouble-ccosh
FAIL: math/test-ldouble-cexp
FAIL: math/test-ldouble-clog10
FAIL: math/test-ldouble-csin
FAIL: math/test-ldouble-csinh
FAIL: math/test-ldouble-csqrt
FAIL: math/test-ldouble-ctan
FAIL: math/test-ldouble-ctanh
FAIL: math/test-ldouble-exp10
FAIL: math/test-ldouble-expm1
FAIL: math/test-ldouble-finite-asinh
FAIL: math/test-ldouble-finite-cacos
FAIL: math/test-ldouble-finite-cacosh
FAIL: math/test-ldouble-finite-casin
FAIL: math/test-ldouble-finite-casinh
FAIL: math/test-ldouble-finite-catanh
FAIL: math/test-ldouble-finite-clog10
FAIL: math/test-ldouble-finite-csqrt
FAIL: math/test-ldouble-finite-ctan
FAIL: math/test-ldouble-finite-ctanh
FAIL: math/test-ldouble-finite-expm1
FAIL: math/test-ldouble-finite-j0
FAIL: math/test-ldouble-finite-sinh
FAIL: math/test-ldouble-finite-tan
FAIL: math/test-ldouble-finite-tanh
FAIL: math/test-ldouble-finite-y0
FAIL: math/test-ldouble-j0
FAIL: math/test-ldouble-pow
FAIL: math/test-ldouble-sinh
FAIL: math/test-ldouble-tan
FAIL: math/test-ldouble-tanh
FAIL: math/test-ldouble-y0
stffrdhrn commented 4 years ago

As of yesterday, fixes are applied

# test finish:   2020-01-24T15:45:53+00:00
# test time(s):  8449
# test for file: tests.sum

# summary
    328 FAIL
   4834 PASS
     35 UNSUPPORTED
     19 XFAIL`
stffrdhrn commented 4 years ago

Running from chroot we can fix many tests, but a few tests start to fail.

i.e. Fail in chroot but not expected to fail in real environment.

+++ log/test--20200126-062828.log       2020-01-26 18:16:30.854599314 +0900
+# test start:    2020-01-26T06:28:28+00:00
+FAIL: dirent/tst-scandir
+FAIL: elf/tst-prelink-cmp
+FAIL: elf/tst-unused-dep
+FAIL: elf/tst-unused-dep-cmp
+FAIL: io/tst-fts
+FAIL: io/tst-fts-lfs
+FAIL: posix/tst-spawn3
+# test finish:   2020-01-26T09:16:30+00:00
+# test time(m):  168
+# test wrapper:  /home/shorne/work/openrisc/or1k-utils/glibc/qemu-or1k-libc-chroot
+    317 FAIL
+   4844 PASS
+     36 UNSUPPORTED

Possible code issue?

Overflow in sysdeps/unix/sysv/linux/getdents.c

Both code call __readdir and it sets ERRNO EOVERFLOW

Chroot Environment, not code issue

stffrdhrn commented 4 years ago

Issues in malloc/

These all look like qemu related issues. Will not investigate further until running native in linux.

# failures
FAIL: malloc/tst-dynarray-at-fail   - crashing qemu
FAIL: malloc/tst-dynarray-fail  - limit cannot find upper AS limit
FAIL: malloc/tst-malloc-thread-fail - crashing qemu qemu: uncaught target signal 6 (Aborted) - core dumped
FAIL: malloc/tst-malloc-usable-tunables
FAIL: malloc/tst-mallocfork2    - 5 procs deadlock in futex wait after a random number of loops
stffrdhrn commented 4 years ago

Issues in elf/

Need to fix these.

# failures
## Checks
-FAIL: elf/check-abi-libc - missing mcount (fixed)
-FAIL: elf/check-textrel - build-glibc/libc.so.dyn: *** text relocations used - non pcrel eh_frame relocations missing _EH_DATA_ macro in GCC (fixed)
-FAIL: elf/check-execstack - no PT_GNU_STACK entry in build-glibc/libc.so.phdr files (needed to add exec stack note in gcc linux.h) (fixed)
-FAIL: elf/check-localplt - Missing required PLT reference: libc.so: _Unwind_Find_FDE (needed to update localpld.data config) (fixed)

## Tests
-FAIL: elf/tst-ldconfig-bad-aux-cache - (fixed now)
-FAIL: elf/tst-pldd - (fixed now)
-FAIL: elf/tst-absolute-sym - fixed missing absolute handling in ld-machine
-FAIL: elf/tst-absolute-zero - fixed missing absolute handling in ld-machine
~FAIL: elf/tst-rtld-preload - works when running alone, environment issue (ignore)
-FAIL: elf/tst-ptrguard1 - fixed test wrapper quoting issue
-FAIL: elf/tst-stackguard1 - fixed test wrapper quoting issue
stffrdhrn commented 4 years ago

After fixing the check-textrel issue results are looking better:

# test finish:   2020-02-16T01:43:38+00:00
# test time(m):  170
# test for file: tests.sum
# test wrapper:  /home/shorne/work/openrisc/or1k-utils/glibc/qemu-or1k-libc-chroot

# summary
    296 FAIL
   4865 PASS
     36 UNSUPPORTED
     19 XFAIL
stffrdhrn commented 4 years ago

After fixing the elf directory tests we here:

# test time(m):  252
# test for file: tests.sum
# test wrapper:  /home/shorne/work/openrisc/or1k-utils/glibc/qemu-or1k-libc-chroot

# summary
    283 FAIL
   4867 PASS
     11 UNRESOLVED
     36 UNSUPPORTED
     19 XFAIL

209 are still math/ failures due to some bad rounding inside the glibc/gcc emulation code.

Now looking into NPTL test failures.

stffrdhrn commented 4 years ago

We have 28 failures in NPTL (threading library)

# failures
FAIL: nptl/tst-audit-threads - dl-runtime.c: 80: _dl_fixup: Assertion
FAIL: nptl/tst-create-detached - pthread_create: Resource temporarily unavailable
FAIL: nptl/tst-stack4 - dl-tls.c: 481: _dl_allocate_tls_init: Assertion 
# fixed
FAIL: nptl/tst-initializers1 - fixed initializer and rwlock_arch_t mismatch
FAIL: nptl/tst-initializers1-c11 - fixed initializer and rwlock_arch_t mismatch
FAIL: nptl/tst-initializers1-c89 - fixed initializer and rwlock_arch_t mismatch
FAIL: nptl/tst-initializers1-c99 - fixed initializer and rwlock_arch_t mismatch
FAIL: nptl/tst-initializers1-gnu11 - fixed initializer and rwlock_arch_t mismatch
FAIL: nptl/tst-initializers1-gnu89 - fixed initializer and rwlock_arch_t mismatch
FAIL: nptl/tst-initializers1-gnu99 - fixed initializer and rwlock_arch_t mismatch
FAIL: nptl/tst-thread_local1 - fixed missing libstdc++ from gcc
FAIL: nptl/tst-tls6 - alignment issue - fixed binutils tpoff (dyamic arg)
# fixed, but not sure why
FAIL: nptl/tst-cancel24 - passing now
FAIL: nptl/tst-minstack-throw - passing now
FAIL: nptl/tst-rwlock15 - passing now
FAIL: nptl/tst-thread-exit-clobber - passing now
# python3 needed!
FAIL: nptl/test-cond-printers - needs python3
FAIL: nptl/test-condattr-printers - needs python3
FAIL: nptl/test-mutex-printers - needs python3
FAIL: nptl/test-mutexattr-printers - needs python3
FAIL: nptl/test-rwlock-printers - needs python3
FAIL: nptl/test-rwlockattr-printers - needs python3
# qemu doesn't support Futex Priority Inversion 
FAIL: nptl/tst-cond-except - pthread_mutex_init failed: Operation not supported
FAIL: nptl/tst-cond24 - pthread_mutex_init failed: Operation not supported
FAIL: nptl/tst-cond25 - pthread_mutex_init failed: Operation not supported
FAIL: nptl/tst-robust-fork - pthread_mutex_init failed: Operation not supported
# qemu reports Clone invalid argument (flags is 0)
FAIL: nptl/tst-align-clone.out: clone failed: Invalid argument
FAIL: nptl/tst-getpid1.out: clone failed: Invalid argument

# test finish:   2020-02-23T00:03:53+00:00
# test time(m):  0
# test for file: nptl/subdir-tests.sum
# test wrapper:  /home/shorne/work/openrisc/or1k-utils/glibc/qemu-or1k-libc-chroot

# summary
     28 FAIL
    328 PASS
      3 UNSUPPORTED
      1 XFAIL
stffrdhrn commented 4 years ago

After fixing more elf and nptl issues, bugs in binutils gdb related to tpoff and ie if statement results are getting better.

Still some remaining

# failures
FAIL: nptl/tst-audit-threads - dl-runtime.c: 80: _dl_fixup: Assertion
FAIL: nptl/tst-create-detached - pthread_create: Resource temporarily unavailable
FAIL: nptl/tst-stack4 - dl-tls.c: 481: _dl_allocate_tls_init: Assertion 

But in summary

# test finish:   2020-03-08T05:08:33+00:00
# test time(m):  168
# test for file: tests.sum
# test wrapper:  /home/shorne/work/openrisc/or1k-utils/glibc/qemu-or1k-libc-chroot

# summary
    258 FAIL
   4903 PASS
     36 UNSUPPORTED
     19 XFAIL
stffrdhrn commented 4 years ago

This one is interesting:

FAIL: nptl/tst-audit-threads - works with LD_BIND_NOW=1, fails because PLT is too large and overruns instruction 16-bit immediate.

Example plt:

.plt

   75e70:       19 80 00 0b     l.movhi r12,0xb
   75e74:       85 8c 95 64     l.lwz r12,-27292(r12)
   75e78:       44 00 60 00     l.jr r12
   75e7c:       a9 60 ff f0     l.ori r11,r0,0xfff0

   75e80:       19 80 00 0b     l.movhi r12,0xb
   75e84:       85 8c 95 68     l.lwz r12,-27288(r12)
   75e88:       44 00 60 00     l.jr r12
   75e8c:       a9 60 ff fc     l.ori r11,r0,0xfffc

   75e90:       19 80 00 0b     l.movhi r12,0xb
   75e94:       85 8c 95 6c     l.lwz r12,-27284(r12)
   75e98:       44 00 60 00     l.jr r12
   75e9c:       a9 61 00 08     l.ori r11,r1,0x8    < r0 changed to r1 from overflow
stffrdhrn commented 4 years ago

Test nptl/tst-stack4 looks like a race condition, adding printf avoids the issue. Also debug/strace avoids the issue.

After I figured that out I looked on Google and found this.

https://sourceware.org/bugzilla/show_bug.cgi?id=19329

stffrdhrn commented 4 years ago

Looking at remaining uninvestigated failures, nothing seems to stand out that we need to look into. Most look like qemu related.

# TODO investigate
FAIL: debug/tst-longjmp_chk2 - Didn't expect signal from child: got `Aborted'

FAIL: stdio-common/tst-vfprintf-width-prec
FAIL: stdlib/tst-strtod-underflow - same as FP issues, no underflow exception
FAIL: timezone/tst-tzset - cpu-exec.c:700: cpu_exec: Assertion `!have_mmap_lock()' failed.

# Fixed
-FAIL: stdlib/tst-makecontext - infinite unwind loop, added nop before __startcontext
-FAIL: support/tst-support_capture_subprocess - problem with syscall fixed b180b6c124bc69efecb3abe41b871076256369da

# Qemu related
-FAIL: libio/tst-vtables - qemu error causing left right diff
-FAIL: io/tst-lockf - locking up doing setlock possible qemu issue
-FAIL: misc/tst-clone2 - clone failed: Invalid argument
-FAIL: misc/tst-clone3 - clone failed: Invalid argument
-FAIL: misc/tst-mlock2 - mlock2.c:46: mlock2 (0): Function not implemented (works on linux)
-FAIL: posix/test-errno - getpeername: errno is: 22 (Invalid argument) expected: 9 (Bad file descriptor) *and more*  (works on linux)
-FAIL: posix/tst-posix_spawn-setsid - child session ID matched parent one  (works on linux)
-FAIL: posix/tst-spawn2 - tst-spawn2.c:44: posix_spawn: Success  (works on linux)
-FAIL: posix/tst-spawn4 - tst-spawn4.c:47: not true: status == ENOEXEC  (works on linux)
-FAIL: misc/test-errno-linux - errno is: 12 (Cannot allocate memory) expected one of LIST (22)(works on linux)
-FAIL: misc/tst-memfd_create - tst-memfd_create.c:45: not true: flags >= 0(works on linux)

# Looks ok, but glibc fails?
-FAIL: gmon/tst-gmon-gprof - extra stack `+f3 1`, looks ok same in [csky](https://libc-alpha.sourceware.narkive.com/vECsdSUq/rfc-patch-v3-00-12-port-c-sky-to-glibc)
-FAIL: gmon/tst-gmon-pie-gprof - extra stack `+f3 1`, looks ok same in **csky**
-FAIL: gmon/tst-gmon-static-gprof - extra stack `+f3 1`, looks ok same in **csky**
stffrdhrn commented 4 years ago

Some of these, when running on linux still fail see:

::::::::::::::
misc/test-errno-linux.out
::::::::::::::
FAIL: epoll_create1: errno is: 38 (Function not implemented) expected one of LIST (22)
FAIL: epoll_ctl: errno is: 38 (Function not implemented) expected one of LIST (9)
FAIL: epoll_wait: errno is: 38 (Function not implemented) expected one of LIST (9)
::::::::::::::
misc/tst-clone2.out
::::::::::::::
::::::::::::::
misc/tst-clone3.out
::::::::::::::
Expected status 2, got 1

Fixed

stffrdhrn commented 4 years ago

Now I am looking at issues in support, the remaining issue is:

FIXED See: b180b6c124bc69efecb3abe41b871076256369da

This case starts a subprocess and captures its output, in some cases it ends with raise(SIGTERM). After a few tries the raise fails. This can be reproduced every time after a certain number of processes run. It happens in both full linux and linux-user mode.

The raise call will unmask signals, raise the signal, then remask signals. In this case it remasks TERM right away.

But why is it masking TERM, it usually doesn't but in this last case it masks TERM and fails.

108   mmap2(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x301ec000                                        
108   mprotect(0x301e6000, 8192, PROT_READ) = 0                                                                                      
108   mprotect(0xa000, 8192, PROT_READ) = 0                                                                                          
108   mprotect(0x30028000, 8192, PROT_READ) = 0                                                                                                                                
108   mmap2(NULL, 8, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0x301f0000                                                                                          
108   rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [ILL TRAP ABRT BUS FPE USR1 USR2 TERM STKFLT IO PWR RT_2 RT_4 RT_8 RT_9 RT_12], 8) = 0                      
108   getpid()                          = 108                                                                                      
108   gettid()                          = 108                                                                                 
108   tgkill(108, 108, SIGTERM)         = 0                                                                                                                 
108   rt_sigprocmask(SIG_SETMASK, [ILL TRAP ABRT BUS FPE USR1 USR2 TERM STKFLT IO PWR RT_2 RT_4 RT_8 RT_9 RT_12], NULL, 8) = 0
108   exit_group(0)                     = ?              
stffrdhrn commented 4 years ago

Remaining issues are 9 below. I am running each on native linux from now (not chroot/qemu-user).

## Malloc
FAIL malloc/tst-malloc-usable-tunables - malloc_usable_size: expected 7 but got 12

Known issue

Fixed

stffrdhrn commented 4 years ago

Other than the known issues with audit-threads and math underflow there is now just 1 last issue:

This seems to be that malloc-usable-tunables runs with GLIBC_TUNABLES=glibc.malloc.check=3while other tests run with MALLOC_CHECK_=3. This fails in chroot environment but works in native linux, it doesn't make much sense why this is, the _sbrk in elf/dl-tunables.c fails when trying to strdup the GLIBC_TUNABLES env string. It seems like some issue with qemu linux-user environment?

-(STRIKE) Seeing that malloc-usable-static is failing on native linux, there might be more failures that fail on native linux but passed on the chroot (qemu linux-user) environment.-

 # GLIBC_TUNABLES=glibc.malloc.check=1 /home/shorne/work/gnu-toolchain/build-gl
ibc/malloc/tst-malloc-usable-static-tunables
(OK!)
stffrdhrn commented 4 years ago

All failures are now explained, We now need to: