printf("%-16s valgrind $vgopts $prog $args\n", "$name:");
# Pass the appropriate --tool option for the directory (can be overridden
- # by an "args:" line, though).
+ # by an "args:" line, though). Set both VALGRIND_LIB and
+ # VALGRIND_LIB_INNER in case this Valgrind was configured with
+ # --enable-inner.
my $tool=determine_tool();
- mysystem("VALGRIND_LIB=$tests_dir/.in_place $valgrind --command-line-only=yes --memcheck:leak-check=no --addrcheck:leak-check=no --tool=$tool $vgopts $prog $args > $name.stdout.out 2> $name.stderr.out");
+ mysystem("VALGRIND_LIB=$tests_dir/.in_place VALGRIND_LIB_INNER=$tests_dir/.in_place "
+ . "$valgrind --command-line-only=yes --memcheck:leak-check=no "
+ . "--addrcheck:leak-check=no --tool=$tool $vgopts "
+ . "$prog $args > $name.stdout.out 2> $name.stderr.out");
if (defined $stdout_filter) {
mysystem("$stdout_filter < $name.stdout.out > $tmp");