GNU bug report logs - #17512
Valgrind and regression tests?

Previous Next

Package: grep;

Reported by: behoffski <behoffski <at> grouse.com.au>

Date: Fri, 16 May 2014 21:04:02 UTC

Severity: wishlist

Tags: notabug

Full log


View this message in rfc822 format

From: behoffski <behoffski <at> grouse.com.au>
To: 17512 <at> debbugs.gnu.org
Subject: bug#17512: Valgrind and regression tests?
Date: Sat, 17 May 2014 05:44:13 +0930
G'day,

I would like to run the entire regression test for Grep (make check),
with Valgrind monitoring each invocation of grep etc, but with the
output going to a separate logfile.  (I have run valgrind for a few
cases, but have not covered the entire spectrum of the regression
test rig.)

The file grep/README-hacking recommends using valgrind, and also
suggests that hackers look at the file "README-valgrind", but no such
file exists.

I note that Valgrind sends its output to stderr by default, and that
the option --log-file=<filename> exists to redirect Valgrind output
elsewhere.  This would be needed in the case of grep et al, as stderr
is used in various ways by the programs.

Is there a simple way of incorporating valgrind into the entire
regression test run?  Two simple ideas come to mind, but I'm not
well versed in the POSIX/shell/makefile/Autoconf/regression rig setup
to know how realistic these are:

  1. Use a shell alias:

       grep="valgrind --log-file=foo grep" make check

  2. Replace grep/egrep/fgrep as appropriate to execute the program
     within a shell, where valgrind plus any options is incorporated
     into the program invocation and the logfile is treated
     appropriately in the program invocation aftermath.

Any hints, help, suggestions etc would be welcome.

cheers,

behoffski (Brenton Hoff)
Programmer, Grouse Software




This bug report was last modified 11 years and 86 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.