bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17512: Valgrind and regression tests?


From: behoffski
Subject: bug#17512: Valgrind and regression tests?
Date: Sat, 17 May 2014 05:44:13 +0930
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]