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: Paul Eggert <eggert <at> cs.ucla.edu>
To: behoffski <behoffski <at> grouse.com.au>, 17512 <at> debbugs.gnu.org
Subject: bug#17512: Valgrind and regression tests?
Date: Fri, 16 May 2014 17:35:46 -0700
behoffski wrote:
>    1. Use a shell alias:
>
>         grep="valgrind --log-file=foo grep" make check

That won't work, as too many parts of the system ignore the aliases.

>    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.

Yes, something like that should work.  You can set up your own 
implementation of grep, like this:

#! /bin/sh
exec valgrind --log-file=foo /full/path/to/actual/grep "$@"

in a shell script called 'grep', in a different directory, and prepand 
that directory to your PATH.

Perhaps Jim has a better way to do it, though -- he's more of a valgrind 
wizard than I.




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

Previous Next


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