2002-12-01 00:34:20 +08:00
|
|
|
#! /bin/bash
|
2002-12-01 00:17:29 +08:00
|
|
|
|
2003-11-17 21:46:34 +08:00
|
|
|
# Tue 2003-11-11 18:45:50 +0100
|
|
|
|
# $ df > k
|
|
|
|
# --6741-- FATAL: unhandled syscall: 268
|
|
|
|
# Also 265 (__NR_clock_gettime), 271(__NR_utimes)
|
|
|
|
# $ chgrp meyering .
|
|
|
|
# ==6859== discard syms in /lib/libnss_compat-2.3.2.so due to munmap()
|
|
|
|
# ==6859== discard syms in /lib/libnss_nis-2.3.2.so due to munmap()
|
|
|
|
# ==6859== discard syms in /lib/libnsl-2.3.2.so due to munmap()
|
|
|
|
# ==6859== discard syms in /lib/libnss_files-2.3.2.so due to munmap()
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-12-01 00:34:20 +08:00
|
|
|
# Convert Makefile.am files:
|
2003-07-27 18:01:55 +08:00
|
|
|
# find tests -name Makefile.am | xargs grep -wl PATH|xargs perl -pi -e \
|
|
|
|
# 's,src(\$\(PATH_SEPARATOR\)\$\$PATH),src/vg$1,'
|
2003-11-17 21:46:34 +08:00
|
|
|
#
|
|
|
|
# Create this symlink for suppressions:
|
|
|
|
# ln -s $PWD/.vg-suppressions /tmp/cu-vg
|
|
|
|
|
2002-12-01 00:17:29 +08:00
|
|
|
|
2002-12-01 00:34:20 +08:00
|
|
|
# Create src/vg:
|
|
|
|
|
2002-12-01 01:13:33 +08:00
|
|
|
coreutils=$(echo 'spy:;@echo $(all_programs)' | (cd src; make -f Makefile -f - spy | tr -s '\n ' ' '))
|
2003-07-27 18:02:16 +08:00
|
|
|
mkdir -p src/vg
|
2002-12-01 00:17:29 +08:00
|
|
|
pwd=`pwd`
|
2003-07-27 18:01:55 +08:00
|
|
|
srcdir=$pwd/src
|
|
|
|
path='export PATH='$srcdir':${PATH#*:}'
|
2002-12-01 00:17:29 +08:00
|
|
|
pre='#!/bin/sh\n'"$path"'\n'
|
2002-12-01 01:13:33 +08:00
|
|
|
n=9
|
2003-11-17 21:46:34 +08:00
|
|
|
vg='exec /p/bin/valgrind --suppressions=/tmp/cu-vg --gen-suppressions=yes --leak-check=yes --quiet --num-callers='$n
|
2002-12-01 01:13:33 +08:00
|
|
|
cat <<EOF > src/vg/gen
|
2002-12-01 00:34:20 +08:00
|
|
|
for i in $coreutils; do
|
2002-12-01 01:13:33 +08:00
|
|
|
printf "$pre$vg \$i"' "\$@"\n' > \$i
|
|
|
|
chmod a+x \$i
|
2002-12-01 00:17:29 +08:00
|
|
|
done
|
|
|
|
EOF
|
|
|
|
cd src/vg
|
2002-12-01 01:13:33 +08:00
|
|
|
. ./gen
|