blob: 9e2d54ca8e61aabff669af45e4238be6bb560aa2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#! /bin/bash
# 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()
# Convert Makefile.am files:
# find tests -name Makefile.am | xargs grep -wl PATH|xargs perl -pi -e \
# 's,src(\$\(PATH_SEPARATOR\)\$\$PATH),src/vg$1,'
#
# Create this symlink for suppressions:
# 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 -p src/vg
pwd=`pwd`
srcdir=$pwd/src
path='export PATH='$srcdir':${PATH#*:}'
pre='#!/bin/sh\n'"$path"'\n'
n=9
vg='exec /p/bin/valgrind --suppressions=/tmp/cu-vg --gen-suppressions=yes --leak-check=yes --quiet --num-callers='$n
cat <<EOF > src/vg/gen
for i in $coreutils; do
printf "$pre$vg \$i"' "\$@"\n' > \$i
chmod a+x \$i
done
EOF
cd src/vg
. ./gen
|