The "checking for valgrind options for tests..." tests in module valgrind-tests does not work: It says "yes" even when these options don't work. Due to a reference to undefined variable gl_valgrind_opts.
2021-01-02 Bruno Haible <br...@clisp.org> valgrind-tests: Really enable the valgrind options test. * m4/valgrind-tests.m4 (gl_VALGRIND_TESTS): Don't assume that the valgrind options --error-exitcode=1 --leak-check=full always work. diff --git a/m4/valgrind-tests.m4 b/m4/valgrind-tests.m4 index c642f4e..499759d 100644 --- a/m4/valgrind-tests.m4 +++ b/m4/valgrind-tests.m4 @@ -1,4 +1,4 @@ -# valgrind-tests.m4 serial 4 +# valgrind-tests.m4 serial 5 dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -23,10 +23,13 @@ AC_DEFUN([gl_VALGRIND_TESTS], if test "$VALGRIND"; then AC_CACHE_CHECK([for valgrind options for tests], [gl_cv_opt_valgrind_tests], - [gl_cv_opt_valgrind_tests="-q --error-exitcode=1 --leak-check=full" - $VALGRIND $gl_valgrind_opts ls > /dev/null 2>&1 || - gl_cv_opt_valgrind_tests=no]) - + [gl_valgrind_opts='-q --error-exitcode=1 --leak-check=full' + if $VALGRIND $gl_valgrind_opts ls > /dev/null 2>&1; then + gl_cv_opt_valgrind_tests="$gl_valgrind_opts" + else + gl_cv_opt_valgrind_tests=no + fi + ]) if test "$gl_cv_opt_valgrind_tests" != no; then VALGRIND="$VALGRIND $gl_cv_opt_valgrind_tests" else