From 2720291460e1e211be215fddb8096e3ed1d9bb28 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 13 Oct 2006 23:54:24 +0000 Subject: [PATCH] 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 --- src/appl/libpty/Makefile.in | 2 +- src/config/pre.in | 4 +--- src/config/shlib.conf | 2 +- src/kdc/Makefile.in | 2 +- src/lib/crypto/Makefile.in | 10 ++++---- src/lib/crypto/aes/Makefile.in | 4 ++-- src/lib/crypto/crc32/Makefile.in | 2 +- src/lib/crypto/des/Makefile.in | 10 ++++---- src/lib/crypto/keyhash_provider/Makefile.in | 4 ++-- src/lib/crypto/md4/Makefile.in | 2 +- src/lib/crypto/md5/Makefile.in | 2 +- src/lib/crypto/sha1/Makefile.in | 4 ++-- src/lib/des425/Makefile.in | 10 ++++---- src/lib/krb5/ccache/Makefile.in | 2 +- src/lib/krb5/krb/Makefile.in | 8 +++---- src/lib/krb5/os/Makefile.in | 12 +++++----- src/plugins/kdb/db2/libdb2/test/Makefile.in | 2 +- src/tests/Makefile.in | 26 ++++++++++----------- src/tests/asn.1/Makefile.in | 6 ++--- src/tests/dejagnu/Makefile.in | 1 + src/tests/misc/Makefile.in | 2 +- src/tests/resolve/Makefile.in | 6 ++--- src/tests/shlib/Makefile.in | 9 +++---- src/tests/threads/Makefile.in | 4 ++-- src/util/et/Makefile.in | 4 ++-- src/util/profile/Makefile.in | 2 +- 26 files changed, 69 insertions(+), 73 deletions(-) diff --git a/src/appl/libpty/Makefile.in b/src/appl/libpty/Makefile.in index 2e8c8dad7..521341db0 100644 --- a/src/appl/libpty/Makefile.in +++ b/src/appl/libpty/Makefile.in @@ -57,7 +57,7 @@ pty_paranoia: pty_paranoia.o $(COM_ERR_DEPLIB) $(PTY_DEPLIB) $(CC_LINK) -o pty_paranoia pty_paranoia.o $(PTY_LIB) $(COM_ERR_LIB) $(LIBS) check-paranoia: pty_paranoia - $(KRB5_RUN_ENV) ./pty_paranoia + $(KRB5_RUN_ENV) $(VALGRIND) ./pty_paranoia install-unix:: install-libs diff --git a/src/config/pre.in b/src/config/pre.in index 47f8c67f7..2c4c0298d 100644 --- a/src/config/pre.in +++ b/src/config/pre.in @@ -550,9 +550,7 @@ PROFFLAGS=@PROFFLAGS@ # platform-dependent temporary files that should get cleaned up EXTRA_FILES=@EXTRA_FILES@ -# The "env" at the end is because sometimes we add local environment -# variable settings with "@RUN_ENV@ KRB5_CONFIG=foo ..." -MAYBE_VALGRIND= # valgrind --tool=memcheck --log-file=$(BUILDTOP)/valgrind.out --trace-children=yes -v --leak-check=yes env +VALGRIND= # valgrind --tool=memcheck --log-file=$(BUILDTOP)/valgrind.out --trace-children=yes -v --leak-check=yes # AUTOCONF_HEADER=$(SRCTOP)/include/autoconf.h.in diff --git a/src/config/shlib.conf b/src/config/shlib.conf index aeaff706b..5e92e0e49 100644 --- a/src/config/shlib.conf +++ b/src/config/shlib.conf @@ -374,7 +374,7 @@ mips-*-netbsd*) RPATH_FLAG='-Wl,-rpath -Wl,' CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) $(RPATH_FLAG)$(PROG_RPATH) $(CFLAGS) $(LDFLAGS)' CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)' - RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH; $(MAYBE_VALGRIND)' + RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH; ' ## old version: # Linux libc does weird stuff at shlib link time, must be diff --git a/src/kdc/Makefile.in b/src/kdc/Makefile.in index 33bb2728f..0c3a161a5 100644 --- a/src/kdc/Makefile.in +++ b/src/kdc/Makefile.in @@ -72,7 +72,7 @@ fakeka: fakeka.o $(KADMSRV_DEPLIBS) $(KRB4COMPAT_DEPLIBS) $(APPUTILS_DEPLIB) check-unix:: rtest KRB5_CONFIG=$(SRCTOP)/config-files/krb5.conf ; export KRB5_CONFIG ;\ - $(RUN_SETUP) $(srcdir)/rtscript > test.out + $(RUN_SETUP) $(VALGRIND) $(srcdir)/rtscript > test.out cmp test.out $(srcdir)/rtest.good $(RM) test.out diff --git a/src/lib/crypto/Makefile.in b/src/lib/crypto/Makefile.in index c14fedd59..cf8ba4554 100644 --- a/src/lib/crypto/Makefile.in +++ b/src/lib/crypto/Makefile.in @@ -179,13 +179,13 @@ libcrypto.lib: clean-unix:: clean-liblinks clean-libs clean-libobjs check-unix:: t_nfold t_encrypt t_prf t_prng t_hmac t_pkcs5 - $(RUN_SETUP) ./t_nfold - $(RUN_SETUP) ./t_encrypt - $(RUN_SETUP) ./t_prng <$(srcdir)/t_prng.seed >t_prng.output && \ + $(RUN_SETUP) $(VALGRIND) ./t_nfold + $(RUN_SETUP) $(VALGRIND) ./t_encrypt + $(RUN_SETUP) $(VALGRIND) ./t_prng <$(srcdir)/t_prng.seed >t_prng.output && \ diff t_prng.output $(srcdir)/t_prng.expected - $(RUN_SETUP) ./t_hmac + $(RUN_SETUP) $(VALGRIND) ./t_hmac -# $(RUN_SETUP) ./t_pkcs5 +# $(RUN_SETUP) $(VALGRIND) ./t_pkcs5 t_nfold$(EXEEXT): t_nfold.$(OBJEXT) nfold.$(OBJEXT) $(SUPPORT_DEPLIB) $(CC_LINK) -o $@ t_nfold.$(OBJEXT) nfold.$(OBJEXT) $(SUPPORT_LIB) diff --git a/src/lib/crypto/aes/Makefile.in b/src/lib/crypto/aes/Makefile.in index f341b9b69..880287a2f 100644 --- a/src/lib/crypto/aes/Makefile.in +++ b/src/lib/crypto/aes/Makefile.in @@ -58,9 +58,9 @@ aes-test: aes-test.$(OBJEXT) $(CRYPTO_DEPLIB) check:: run-aes-test run-aes-test: aes-test - $(RUN_SETUP) ./aes-test -k > vk.txt + $(RUN_SETUP) $(VALGRIND) ./aes-test -k > vk.txt cmp vk.txt $(srcdir)/expect-vk.txt - $(RUN_SETUP) ./aes-test > vt.txt + $(RUN_SETUP) $(VALGRIND) ./aes-test > vt.txt cmp vt.txt $(srcdir)/expect-vt.txt clean-unix:: clean-libobjs diff --git a/src/lib/crypto/crc32/Makefile.in b/src/lib/crypto/crc32/Makefile.in index 3832356f9..dafa08731 100644 --- a/src/lib/crypto/crc32/Makefile.in +++ b/src/lib/crypto/crc32/Makefile.in @@ -31,7 +31,7 @@ clean-unix:: clean-libobjs $(RM) t_crc.o t_crc check-unix:: t_crc - $(RUN_SETUP) ./t_crc + $(RUN_SETUP) $(VALGRIND) ./t_crc t_crc: t_crc.o crc32.o $(SUPPORT_DEPLIB) $(CC_LINK) -o $@ t_crc.o crc32.o $(SUPPORT_LIB) diff --git a/src/lib/crypto/des/Makefile.in b/src/lib/crypto/des/Makefile.in index 96320fc79..3f5e5adba 100644 --- a/src/lib/crypto/des/Makefile.in +++ b/src/lib/crypto/des/Makefile.in @@ -77,11 +77,11 @@ t_afss2k$(EXEEXT): $(TAFSS2KOBJS) $(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) $(CC_LINK) -o $@ $(TAFSS2KOBJS) -lcom_err $(SUPPORT_LIB) check-unix:: verify destest t_afss2k - $(RUN_SETUP) ./verify -z - $(RUN_SETUP) ./verify -m - $(RUN_SETUP) ./verify - $(RUN_SETUP) ./destest < $(srcdir)/keytest.data - $(RUN_SETUP) ./t_afss2k + $(RUN_SETUP) $(VALGRIND) ./verify -z + $(RUN_SETUP) $(VALGRIND) ./verify -m + $(RUN_SETUP) $(VALGRIND) ./verify + $(RUN_SETUP) $(VALGRIND) ./destest < $(srcdir)/keytest.data + $(RUN_SETUP) $(VALGRIND) ./t_afss2k check-windows:: diff --git a/src/lib/crypto/keyhash_provider/Makefile.in b/src/lib/crypto/keyhash_provider/Makefile.in index 1fca4d3ee..32c8ee4aa 100644 --- a/src/lib/crypto/keyhash_provider/Makefile.in +++ b/src/lib/crypto/keyhash_provider/Makefile.in @@ -43,8 +43,8 @@ t_cksum5: t_cksum5.o $(CRYPTO_DEPLIB) $(CC_LINK) -o t_cksum5 t_cksum5.o $(K5CRYPTO_LIB) $(COM_ERR_LIB) $(SUPPORT_LIB) $(LIBS) check-unix:: t_cksum4 t_cksum5 - $(RUN_SETUP) $(C)t_cksum4 "this is a test" - $(RUN_SETUP) $(C)t_cksum5 "this is a test" + $(RUN_SETUP) $(VALGRIND) $(C)t_cksum4 "this is a test" + $(RUN_SETUP) $(VALGRIND) $(C)t_cksum5 "this is a test" clean-unix:: $(RM) t_cksum4 t_cksum4.o diff --git a/src/lib/crypto/md4/Makefile.in b/src/lib/crypto/md4/Makefile.in index 558b25f00..f0cf03bd6 100644 --- a/src/lib/crypto/md4/Makefile.in +++ b/src/lib/crypto/md4/Makefile.in @@ -44,7 +44,7 @@ $(OUTPRE)t_mddriver.exe: $(OUTPRE)t_mddriver.obj $(OUTPRE)md4.obj link -out:$@ $** check-unix:: t_mddriver - $(RUN_SETUP) $(C)t_mddriver -x + $(RUN_SETUP) $(VALGRIND) $(C)t_mddriver -x check-windows:: $(OUTPRE)t_mddriver.exe $(OUTPRE)$(C)t_mddriver.exe -x diff --git a/src/lib/crypto/md5/Makefile.in b/src/lib/crypto/md5/Makefile.in index 7da369a85..2e366fb88 100644 --- a/src/lib/crypto/md5/Makefile.in +++ b/src/lib/crypto/md5/Makefile.in @@ -34,7 +34,7 @@ $(OUTPRE)t_mddriver.exe: $(OUTPRE)t_mddriver.obj $(OUTPRE)md5.obj link -out:$@ $** check-unix:: t_mddriver - $(RUN_SETUP) $(C)t_mddriver -x + $(RUN_SETUP) $(VALGRIND) $(C)t_mddriver -x check-windows:: $(OUTPRE)t_mddriver.exe $(OUTPRE)$(C)t_mddriver.exe -x diff --git a/src/lib/crypto/sha1/Makefile.in b/src/lib/crypto/sha1/Makefile.in index eecaa5192..c1cd1da53 100644 --- a/src/lib/crypto/sha1/Makefile.in +++ b/src/lib/crypto/sha1/Makefile.in @@ -34,8 +34,8 @@ $(OUTPRE)t_shs.exe: $(OUTPRE)t_shs.obj $(OUTPRE)shs.obj link -out:$@ $** check-unix:: t_shs t_shs3 - $(RUN_SETUP) $(C)t_shs -x - $(RUN_SETUP) $(C)t_shs3 + $(RUN_SETUP) $(VALGRIND) $(C)t_shs -x + $(RUN_SETUP) $(VALGRIND) $(C)t_shs3 check-windows:: $(OUTPRE)t_shs.exe $(OUTPRE)t_shs3.exe $(OUTPRE)$(C)t_shs.exe -x diff --git a/src/lib/des425/Makefile.in b/src/lib/des425/Makefile.in index 82849d670..63fbf0742 100644 --- a/src/lib/des425/Makefile.in +++ b/src/lib/des425/Makefile.in @@ -92,11 +92,11 @@ t_pcbc: t_pcbc.o pcbc_encrypt.o key_sched.o $(KRB5_BASE_DEPLIBS) $(CC_LINK) -o $@ t_pcbc.o pcbc_encrypt.o key_sched.o $(KRB5_BASE_LIBS) check-unix:: verify t_quad t_pcbc - $(RUN_SETUP) ./verify -z - $(RUN_SETUP) ./verify -m - $(RUN_SETUP) ./verify - $(RUN_SETUP) ./t_quad - $(RUN_SETUP) ./t_pcbc + $(RUN_SETUP) $(VALGRIND) ./verify -z + $(RUN_SETUP) $(VALGRIND) ./verify -m + $(RUN_SETUP) $(VALGRIND) ./verify + $(RUN_SETUP) $(VALGRIND) ./t_quad + $(RUN_SETUP) $(VALGRIND) ./t_pcbc check-windows:: diff --git a/src/lib/krb5/ccache/Makefile.in b/src/lib/krb5/ccache/Makefile.in index d180b3c33..c6db51627 100644 --- a/src/lib/krb5/ccache/Makefile.in +++ b/src/lib/krb5/ccache/Makefile.in @@ -98,7 +98,7 @@ t_cccursor: $(T_CCCURSOR_OBJS) $(KRB5_BASE_DEPLIBS) check-unix:: t_cc KRB5_CONFIG=$(srcdir)/t_krb5.conf ; export KRB5_CONFIG ;\ - $(RUN_SETUP) ./t_cc + $(RUN_SETUP) $(VALGRIND) ./t_cc clean-unix:: $(RM) t_cc t_cc.o diff --git a/src/lib/krb5/krb/Makefile.in b/src/lib/krb5/krb/Makefile.in index f16e1e9b7..84b1f27bb 100644 --- a/src/lib/krb5/krb/Makefile.in +++ b/src/lib/krb5/krb/Makefile.in @@ -325,7 +325,7 @@ TEST_PROGS= t_walk_rtree t_kerb t_ser t_deltat t_expand check-unix:: $(TEST_PROGS) KRB5_CONFIG=$(srcdir)/t_krb5.conf ; export KRB5_CONFIG ;\ - $(RUN_SETUP) ./t_kerb \ + $(RUN_SETUP) $(VALGRIND) ./t_kerb \ parse_name tytso \ parse_name tytso@SHAZAAM \ parse_name tytso/root@VEGGIE.COM \ @@ -349,9 +349,9 @@ check-unix:: $(TEST_PROGS) cmp test.out $(srcdir)/t_ref_kerb.out $(RM) test.out KRB5_CONFIG=$(srcdir)/t_krb5.conf ; export KRB5_CONFIG ;\ - $(RUN_SETUP) ./t_ser - $(RUN_SETUP) ./t_deltat - $(RUN_SETUP) sh $(srcdir)/transit-tests + $(RUN_SETUP) $(VALGRIND) ./t_ser + $(RUN_SETUP) $(VALGRIND) ./t_deltat + $(RUN_SETUP) $(VALGRIND) sh $(srcdir)/transit-tests clean:: $(RM) $(OUTPRE)t_walk_rtree$(EXEEXT) $(OUTPRE)t_walk_rtree.$(OBJEXT) \ diff --git a/src/lib/krb5/os/Makefile.in b/src/lib/krb5/os/Makefile.in index 106f4b6ee..5a87f929d 100644 --- a/src/lib/krb5/os/Makefile.in +++ b/src/lib/krb5/os/Makefile.in @@ -199,7 +199,7 @@ lclint-localaddr: localaddr.c check-unix:: $(TEST_PROGS) KRB5_CONFIG=$(srcdir)/td_krb5.conf ; export KRB5_CONFIG ;\ - $(KRB5_RUN_ENV) ./t_std_conf -d -s NEW.DEFAULT.REALM -d \ + $(KRB5_RUN_ENV) $(VALGRIND) ./t_std_conf -d -s NEW.DEFAULT.REALM -d \ -k IGGY.ORG -k DEFAULT_REALM.TST \ -D DEFAULT_REALM.TST -r bad.idea -r itar.bad.idea \ -r really.BAD.IDEA. -r clipper.bad.idea -r KeYEsCrOW.BaD.IDea \ @@ -207,7 +207,7 @@ check-unix:: $(TEST_PROGS) cmp test.out $(srcdir)/ref_std_conf.out $(RM) test.out KRB5_CONFIG=$(srcdir)/td_krb5.conf ; export KRB5_CONFIG ;\ - $(KRB5_RUN_ENV) ./t_locate_kdc ATHENA.MIT.EDU + $(KRB5_RUN_ENV) $(VALGRIND) ./t_locate_kdc ATHENA.MIT.EDU # # Do some aname-to-lname testing. @@ -218,7 +218,7 @@ check-unix:: echo '[realms]' >> ./t_an.conf echo 'r = {' >> ./t_an.conf # if test -r ../../../admin/aname/kdb5_anadd ; then \ -# $(KRB5_RUN_ENV) ../../../admin/aname/kdb5_anadd -a -n ./t_an p/i/i/i@r piii; \ +# $(KRB5_RUN_ENV) $(VALGRIND) ../../../admin/aname/kdb5_anadd -a -n ./t_an p/i/i/i@r piii; \ # ../../../admin/aname/kdb5_anadd -a -n ./t_an p/a/b/c@r pabc; \ # echo 'auth_to_local = DB:./t_an' >> ./t_an.conf; \ # fi @@ -228,12 +228,12 @@ check-unix:: echo '}' >> ./t_an.conf # if test -r ../../../admin/aname/kdb5_anadd ; then \ # KRB5_CONFIG=./t_an.conf ; export KRB5_CONFIG ; \ -# $(KRB5_RUN_ENV) ./t_an_to_ln p/i/i/i@r p/a/b/c@r; \ +# $(KRB5_RUN_ENV) $(VALGRIND) ./t_an_to_ln p/i/i/i@r p/a/b/c@r; \ # fi KRB5_CONFIG=./t_an.conf ; export KRB5_CONFIG ; \ - $(KRB5_RUN_ENV) ./t_an_to_ln rul/helpme/e@r ru/123/le@r + $(KRB5_RUN_ENV) $(VALGRIND) ./t_an_to_ln rul/helpme/e@r ru/123/le@r KRB5_CONFIG=./t_an.conf ; export KRB5_CONFIG ; \ - $(KRB5_RUN_ENV) ./t_an_to_ln fred/r@r barney/r@r + $(KRB5_RUN_ENV) $(VALGRIND) ./t_an_to_ln fred/r@r barney/r@r $(RM) ./t_an.* clean:: diff --git a/src/plugins/kdb/db2/libdb2/test/Makefile.in b/src/plugins/kdb/db2/libdb2/test/Makefile.in index af4b6bec7..cd7538dcd 100644 --- a/src/plugins/kdb/db2/libdb2/test/Makefile.in +++ b/src/plugins/kdb/db2/libdb2/test/Makefile.in @@ -23,7 +23,7 @@ dbtest: dbtest.o $(DB_DEPLIB) $(CC_LINK) -o $@ dbtest.o $(STRERROR_OBJ) $(DB_LIB) check:: dbtest - $(KRB5_RUN_ENV) srcdir=$(srcdir) TMPDIR=$(TMPDIR) $(FCTSH) $(srcdir)/run.test + $(KRB5_RUN_ENV) srcdir=$(srcdir) TMPDIR=$(TMPDIR) $(VALGRIND) $(FCTSH) $(srcdir)/run.test bttest.o: $(srcdir)/btree.tests/main.c $(CC) $(ALL_CFLAGS) -c $(srcdir)/btree.tests/main.c -o $@ diff --git a/src/tests/Makefile.in b/src/tests/Makefile.in index 5820ef32d..89cbb042b 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 979ac8760..202153b06 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 e33215ae7..60838bccc 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 065750f0a..a22acde1c 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 0e7067c55..65981d285 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 7dda592e2..523dd125a 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 5386d00e1..b6da0b087 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) diff --git a/src/util/et/Makefile.in b/src/util/et/Makefile.in index fd3112963..b7aa747a8 100644 --- a/src/util/et/Makefile.in +++ b/src/util/et/Makefile.in @@ -161,8 +161,8 @@ RUN_SETUP = @KRB5_RUN_ENV@ # test_et doesn't have an interesting exit status, but it'll exercise # some cases that t_com_err doesn't, so let's see if it crashes. check-unix:: t_com_err test_et - $(RUN_SETUP) ./test_et - $(RUN_SETUP) ./t_com_err + $(RUN_SETUP) $(VALGRIND) ./test_et + $(RUN_SETUP) $(VALGRIND) ./t_com_err check-windows:: $(OUTPRE)test_et$(EXEEXT) set path=$(BUILDTOP)\lib\$(OUTPRE);%path%; diff --git a/src/util/profile/Makefile.in b/src/util/profile/Makefile.in index 3d99ea70e..5c524138d 100644 --- a/src/util/profile/Makefile.in +++ b/src/util/profile/Makefile.in @@ -144,7 +144,7 @@ check-unix-tcl-: check-unix-tcl-ok: profile_tcl cp $(srcdir)/test.ini test2.ini - $(KRB5_RUN_ENV) ./profile_tcl $(srcdir)/prof_test1 + $(KRB5_RUN_ENV) $(VALGRIND) ./profile_tcl $(srcdir)/prof_test1 check-windows:: $(OUTPRE)test_profile.exe $(OUTPRE)test_parse.exe $(RM) $(OUTPRE)*.obj -- 2.26.2