mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-14 21:28:57 +08:00
libctf: suppress spurious failure of malloc-counting tests under valgrind
The libctf-regression/open-error-free.c test works by interposing malloc and counting mallocs and frees across libctf operations. This only works under suitably-interposable mallocs on systems supporting dlsym (RTLD_NEXT, ...), so its operation is restricted to glibc systems for now, but also it interacts badly with valgrind, which interposes malloc itself. Detect a running valgrind and skip the test. Add new facilities allowing libctf lookup tests to declare themselves unsupported, by printing "UNSUPPORTED: " and then some meaningful message instead of their normal output. libctf/ * configure.ac: Check for <valgrind/valgrind.h>. * config.h.in: Regenerate. * configure: Likewise. * testsuite/lib/ctf-lib.exp (run_lookup_test): Add support for UNSUPPORTED tests. * testsuite/libctf-regression/open-error-free.c: When running under valgrind, this test is unsupported.
This commit is contained in:
@@ -109,7 +109,7 @@ if test $ac_cv_libctf_bfd_elf = yes; then
|
||||
fi
|
||||
|
||||
AC_C_BIGENDIAN
|
||||
AC_CHECK_HEADERS(byteswap.h endian.h)
|
||||
AC_CHECK_HEADERS(byteswap.h endian.h valgrind/valgrind.h)
|
||||
AC_CHECK_FUNCS(pread)
|
||||
|
||||
dnl Check for bswap_{16,32,64}
|
||||
|
||||
Reference in New Issue
Block a user