X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=README-valgrind;h=12da47599324b799bcaf42eb0a76900c78aaf85f;hb=186b655094d38ce6de30a943a0fd8ac16e36c9ea;hp=e2e0e980cb1717a6e6f9063827449c5df2cfa409;hpb=ab1fbe7dda8389ff6b4f6e08504719015bef0fc6;p=platform%2Fupstream%2Fcoreutils.git
diff --git a/README-valgrind b/README-valgrind
index e2e0e98..12da475 100644
--- a/README-valgrind
+++ b/README-valgrind
@@ -1,22 +1,44 @@
#! /bin/bash
+# Convert this package for use with valgrind.
+
+# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
# Convert Makefile.am files:
-# find tests -name Makefile.am \
-# | xargs grep -wl PATH|xargs perl -pi -e 's,src:\$\$PATH,src/vg:\$\$PATH,'
+# find tests -name Makefile.am | xargs grep -wl PATH|xargs perl -pi -e \
+# 's,src(\$\(PATH_SEPARATOR\)\$\$PATH),src/vg$1,'
+# To restore:
+# find tests -name Makefile.am|xargs grep -wl PATH|xargs perl -pi -e 's,src/vg,src,'
+#
+# Create this symlink for suppressions (this is no longer necessary,
+# with linux-2.6.9 and valgrind-2.2.0):
+# ln -s $PWD/.vg-suppressions /tmp/cu-vg
# Create src/vg:
coreutils=$(echo 'spy:;@echo $(all_programs)' | (cd src; make -f Makefile -f - spy | tr -s '\n ' ' '))
-mkdir src/vg
+mkdir -p src/vg
pwd=`pwd`
-up=`dirname $pwd`
-path='export PATH='$up':${PATH#*:}'
-pre='#!/bin/sh\n'"$path"'\n'
-n=9
-vg='exec /usr/bin/valgrind --quiet --num-callers='$n
+srcdir=$pwd/src
+_path='export PATH='$srcdir':${PATH#*:}'
+pre='#!/bin/sh\n'"$_path"'\n'
+n=15
+vg='exec /usr/bin/valgrind --suppressions=/tmp/cu-vg --log-fd=3 --leak-check=yes --track-fds=yes --leak-check=full --num-callers='$n
cat < src/vg/gen
for i in $coreutils; do
- printf "$pre$vg \$i"' "\$@"\n' > \$i
+ printf "$pre$vg -- \$i"' "\$@"\n' > \$i
chmod a+x \$i
done
EOF