summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2006-10-13 23:54:24 +0000
committerKen Raeburn <raeburn@mit.edu>2006-10-13 23:54:24 +0000
commit2720291460e1e211be215fddb8096e3ed1d9bb28 (patch)
treeb4756498450fc19aba40eb171dbffb91791a9582 /src/tests
parentc59d1c439d08bde8e10f6a9e73ad753f7968503c (diff)
downloadkrb5-2720291460e1e211be215fddb8096e3ed1d9bb28.tar.gz
krb5-2720291460e1e211be215fddb8096e3ed1d9bb28.tar.xz
krb5-2720291460e1e211be215fddb8096e3ed1d9bb28.zip
Use $(VALGRIND) when running programs using $(KRB5_RUN_ENV) or
$(RUN_SETUP). Replaces old hack with MAYBE_VALGRIND added to RUN_ENV in a way that would break in some of the tests. Set VALGRIND in site.exp in tests/dejagnu. (Not used yet.) Runs some shell scripts under valgrind, rather than changing them to run only the executables under valgrind; this is mostly okay, just creates lots of extra log data, and requires --trace-children=yes. This should work for any instrumentation program invocation that gets followed immediately by the name and argument list for the program being instrumented. For example, VALGRIND="env LD_PRELOAD=..." should work, though I haven't tested it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18699 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/Makefile.in26
-rw-r--r--src/tests/asn.1/Makefile.in6
-rw-r--r--src/tests/dejagnu/Makefile.in1
-rw-r--r--src/tests/misc/Makefile.in2
-rw-r--r--src/tests/resolve/Makefile.in6
-rw-r--r--src/tests/shlib/Makefile.in9
-rw-r--r--src/tests/threads/Makefile.in4
7 files changed, 26 insertions, 28 deletions
diff --git a/src/tests/Makefile.in b/src/tests/Makefile.in
index 5820ef32da..89cbb042b4 100644
--- a/src/tests/Makefile.in
+++ b/src/tests/Makefile.in
@@ -37,29 +37,29 @@ krb5.conf: Makefile
kdb_check: kdc.conf krb5.conf
$(RM) $(TEST_DB)*
- $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) create
- $(RUN_SETUP) ../tests/create/kdb5_mkdums $(KTEST_OPTS)
- $(RUN_SETUP) ../tests/verify/kdb5_verify $(KTEST_OPTS)
- $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump $(TEST_DB).dump
- $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump -ov $(TEST_DB).ovdump
- $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) destroy -f
+ $(RUN_SETUP) $(VALGRIND) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) create
+ $(RUN_SETUP) $(VALGRIND) ../tests/create/kdb5_mkdums $(KTEST_OPTS)
+ $(RUN_SETUP) $(VALGRIND) ../tests/verify/kdb5_verify $(KTEST_OPTS)
+ $(RUN_SETUP) $(VALGRIND) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump $(TEST_DB).dump
+ $(RUN_SETUP) $(VALGRIND) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump -ov $(TEST_DB).ovdump
+ $(RUN_SETUP) $(VALGRIND) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) destroy -f
@echo "====> NOTE!"
@echo "The following 'create' command is needed due to a change"
@echo "in functionality caused by DAL integration. See ticket 3973."
@echo ====
- $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) create
- $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) load $(TEST_DB).dump
- $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) load -update -ov $(TEST_DB).ovdump
- $(RUN_SETUP) ../tests/verify/kdb5_verify $(KTEST_OPTS)
- $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump $(TEST_DB).dump2
- $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump -ov $(TEST_DB).ovdump2
+ $(RUN_SETUP) $(VALGRIND) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) create
+ $(RUN_SETUP) $(VALGRIND) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) load $(TEST_DB).dump
+ $(RUN_SETUP) $(VALGRIND) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) load -update -ov $(TEST_DB).ovdump
+ $(RUN_SETUP) $(VALGRIND) ../tests/verify/kdb5_verify $(KTEST_OPTS)
+ $(RUN_SETUP) $(VALGRIND) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump $(TEST_DB).dump2
+ $(RUN_SETUP) $(VALGRIND) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump -ov $(TEST_DB).ovdump2
sort $(TEST_DB).dump > $(TEST_DB).sort
sort $(TEST_DB).dump2 > $(TEST_DB).sort2
sort $(TEST_DB).ovdump > $(TEST_DB).ovsort
sort $(TEST_DB).ovdump2 > $(TEST_DB).ovsort2
cmp $(TEST_DB).sort $(TEST_DB).sort2
cmp $(TEST_DB).ovsort $(TEST_DB).ovsort2
- $(RUN_SETUP) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) destroy -f
+ $(RUN_SETUP) $(VALGRIND) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) destroy -f
$(RM) $(TEST_DB)* stash_file
clean::
diff --git a/src/tests/asn.1/Makefile.in b/src/tests/asn.1/Makefile.in
index 979ac87609..202153b066 100644
--- a/src/tests/asn.1/Makefile.in
+++ b/src/tests/asn.1/Makefile.in
@@ -31,15 +31,15 @@ trval: $(srcdir)/trval.c
check:: krb5_decode_test krb5_encode_test
KRB5_CONFIG=$(SRCTOP)/config-files/krb5.conf ; \
export KRB5_CONFIG ;\
- $(RUN_SETUP) ./krb5_decode_test
+ $(RUN_SETUP) $(VALGRIND) ./krb5_decode_test
$(RM) test.out
KRB5_CONFIG=$(SRCTOP)/config-files/krb5.conf ; \
export KRB5_CONFIG ;\
- $(RUN_SETUP) ./krb5_encode_test > test.out
+ $(RUN_SETUP) $(VALGRIND) ./krb5_encode_test > test.out
cmp test.out $(srcdir)/reference_encode.out
KRB5_CONFIG=$(SRCTOP)/config-files/krb5.conf ; \
export KRB5_CONFIG ;\
- $(RUN_SETUP) ./krb5_encode_test -t > test.out
+ $(RUN_SETUP) $(VALGRIND) ./krb5_encode_test -t > test.out
cmp test.out $(srcdir)/trval_reference.out
$(RM) test.out
diff --git a/src/tests/dejagnu/Makefile.in b/src/tests/dejagnu/Makefile.in
index e33215ae7b..60838bccc9 100644
--- a/src/tests/dejagnu/Makefile.in
+++ b/src/tests/dejagnu/Makefile.in
@@ -44,6 +44,7 @@ runenv.vals: runenv.vars
site.exp: runenv.vals Makefile
echo "set runvarlist [list `cat runenv.vals | tr '\n' ' '`]" | \
sed -e 's%=\.%='`pwd`'/.%g' > site.exp
+ echo "set VALGRIND {$(VALGRIND)}" >> site.exp
echo "set KRB5_DB_MODULE_DIR {$(KRB5_DB_MODULE_DIR)}" >> site.exp
# +++ Dependency line eater +++
diff --git a/src/tests/misc/Makefile.in b/src/tests/misc/Makefile.in
index 065750f0a4..a22acde1c3 100644
--- a/src/tests/misc/Makefile.in
+++ b/src/tests/misc/Makefile.in
@@ -12,7 +12,7 @@ SRCS=$(srcdir)/test_getpw.c
all:: test_getpw
check:: test_getpw
- $(RUN_SETUP) ./test_getpw
+ $(RUN_SETUP) $(VALGRIND) ./test_getpw
test_getpw: $(OUTPRE)test_getpw.$(OBJEXT) $(SUPPORT_DEPLIB)
$(CC_LINK) $(ALL_CFLAGS) -o test_getpw $(OUTPRE)test_getpw.$(OBJEXT) $(SUPPORT_LIB)
diff --git a/src/tests/resolve/Makefile.in b/src/tests/resolve/Makefile.in
index 0e7067c551..65981d2855 100644
--- a/src/tests/resolve/Makefile.in
+++ b/src/tests/resolve/Makefile.in
@@ -22,9 +22,9 @@ fake-addrinfo-test: fake-addrinfo-test.o
$(CC_LINK) -o $@ fake-addrinfo-test.o $(SUPPORT_LIB) $(LIBS)
check:: resolve addrinfo-test
- $(RUN_SETUP) ./resolve
- $(RUN_SETUP) ./addrinfo-test -p telnet
- $(RUN_SETUP) ./fake-addrinfo-test -p telnet
+ $(RUN_SETUP) $(VALGRIND) ./resolve
+ $(RUN_SETUP) $(VALGRIND) ./addrinfo-test -p telnet
+ $(RUN_SETUP) $(VALGRIND) ./fake-addrinfo-test -p telnet
install::
diff --git a/src/tests/shlib/Makefile.in b/src/tests/shlib/Makefile.in
index 7dda592e2d..523dd125a6 100644
--- a/src/tests/shlib/Makefile.in
+++ b/src/tests/shlib/Makefile.in
@@ -7,18 +7,15 @@ PROG_RPATH=$(KRB5_LIBDIR)
RUN_SETUP = @KRB5_RUN_ENV@
-VALGRIND=valgrind
-VALGRINDFLAGS=--tool=memcheck --leak-check=yes --show-reachable=yes
+#VALGRIND=valgrind
+#VALGRINDFLAGS=--tool=memcheck --leak-check=yes --show-reachable=yes
SRCS=$(srcdir)/t_loader.c
all::
run-t_loader: t_loader
- $(RUN_SETUP) ./t_loader
-
-valgrind-t_loader: t_loader
- $(RUN_SETUP) $(VALGRIND) $(VALGRINDFLAGS) ./t_loader
+ $(RUN_SETUP) $(VALGRIND) ./t_loader
t_loader: t_loader.o
$(CC_LINK) -o t_loader t_loader.o $(DL_LIB)
diff --git a/src/tests/threads/Makefile.in b/src/tests/threads/Makefile.in
index 5386d00e1b..b6da0b087d 100644
--- a/src/tests/threads/Makefile.in
+++ b/src/tests/threads/Makefile.in
@@ -13,7 +13,7 @@ all::
N = 4
run-t_rcache: t_rcache
- $(RUN_SETUP) ./t_rcache -n $(N)
+ $(RUN_SETUP) $(VALGRIND) ./t_rcache -n $(N)
t_rcache: t_rcache.o $(KRB5_BASE_DEPLIBS)
$(CC_LINK) -o t_rcache t_rcache.o $(KRB5_BASE_LIBS) $(THREAD_LINKOPTS)
@@ -22,7 +22,7 @@ syms: syms.o
$(CC_LINK) -o syms syms.o
run-syms: syms
- $(RUN_SETUP) ./syms
+ $(RUN_SETUP) $(VALGRIND) ./syms
prof1: prof1.o $(KRB5_BASE_DEPLIBS)
$(CC_LINK) -o prof1 prof1.o $(KRB5_BASE_LIBS) $(THREAD_LINKOPTS)