From 9f0fb75b8e121a93b0f63dd823fa86ffd44e8e5d Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Wed, 12 Jun 2024 11:08:39 +0100 Subject: 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 . * 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. --- libctf/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libctf/configure') diff --git a/libctf/configure b/libctf/configure index 1faadef..7466d56 100755 --- a/libctf/configure +++ b/libctf/configure @@ -16552,7 +16552,7 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac -for ac_header in byteswap.h endian.h +for ac_header in byteswap.h endian.h valgrind/valgrind.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -- cgit v1.1