Use $(VALGRIND) when running programs using $(KRB5_RUN_ENV) or
authorKen Raeburn <raeburn@mit.edu>
Fri, 13 Oct 2006 23:54:24 +0000 (23:54 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 13 Oct 2006 23:54:24 +0000 (23:54 +0000)
$(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

26 files changed:
src/appl/libpty/Makefile.in
src/config/pre.in
src/config/shlib.conf
src/kdc/Makefile.in
src/lib/crypto/Makefile.in
src/lib/crypto/aes/Makefile.in
src/lib/crypto/crc32/Makefile.in
src/lib/crypto/des/Makefile.in
src/lib/crypto/keyhash_provider/Makefile.in
src/lib/crypto/md4/Makefile.in
src/lib/crypto/md5/Makefile.in
src/lib/crypto/sha1/Makefile.in
src/lib/des425/Makefile.in
src/lib/krb5/ccache/Makefile.in
src/lib/krb5/krb/Makefile.in
src/lib/krb5/os/Makefile.in
src/plugins/kdb/db2/libdb2/test/Makefile.in
src/tests/Makefile.in
src/tests/asn.1/Makefile.in
src/tests/dejagnu/Makefile.in
src/tests/misc/Makefile.in
src/tests/resolve/Makefile.in
src/tests/shlib/Makefile.in
src/tests/threads/Makefile.in
src/util/et/Makefile.in
src/util/profile/Makefile.in

index 2e8c8dad7f72e59dcfae40e1781c1607b9a4449b..521341db0bacac5aa6402278385d9e74230959c2 100644 (file)
@@ -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
 
index 47f8c67f7c928df9ca1ad324bd4fc6844a2090de..2c4c0298dea4eee89d86ca363d91d97e7abc62b4 100644 (file)
@@ -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
index aeaff706baa73b4e7570389c0d2bc5aedf9f1acf..5e92e0e4926eef348835f8cddaf49570029fbac6 100644 (file)
@@ -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
index 33bb2728f18d217b0eb7c026ccc55c2e60907c9d..0c3a161a56cb56560283d2f6aec0e8fd896e49ec 100644 (file)
@@ -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
 
index c14fedd595735135990e5f42b932bade239e01ff..cf8ba4554ff9e7e6572b1b812e0f1dc1ee8bf45f 100644 (file)
@@ -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)
index f341b9b691b1531960402b545e241383df4c0c45..880287a2fb375bcb2a12165667f44408d645d5f0 100644 (file)
@@ -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
index 3832356f9f2b9a070a06ee02014442b37ac878db..dafa08731dfce19910f6d113187169bb07ee3bc6 100644 (file)
@@ -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)
index 96320fc79d3a3b9f1e6e4078d9b0c4965a673c4f..3f5e5adba502aa62c633534a34370d7495293e75 100644 (file)
@@ -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::
 
index 1fca4d3eeec8f74b07cd94918a9e0b4023a84eb3..32c8ee4aa299a30b58eddabedbd33139470c1a50 100644 (file)
@@ -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
index 558b25f00e51b32348b6ab2a76e052da5017bd51..f0cf03bd65ef9b31983c0569120ebf77da73132d 100644 (file)
@@ -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
index 7da369a8572d2a852ccb64c034732d0ef5564c1c..2e366fb88eec57e2fb227407f040265ce380c377 100644 (file)
@@ -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
index eecaa51923501e53b0cc79c5911877b3ecf1695f..c1cd1da5361fd2b3725603dac2f012d0e6c66cc9 100644 (file)
@@ -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
index 82849d670e31279e004aa81549f8824241378686..63fbf074223e93f497b3e20ed5c5530674f4464d 100644 (file)
@@ -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::
 
index d180b3c33ba5abcb44d9f94fab25f57d88723a1b..c6db516271014973d41e04e8d46e7867a3a0c8e9 100644 (file)
@@ -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
index f16e1e9b72c5726711c0b3ae1b9d183d2ba9672c..84b1f27bbd4ed6a92f53747a483f1ead7d1432a7 100644 (file)
@@ -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) \
index 106f4b6eeeffa3b8f89c9fe418dbfc834c20f24f..5a87f929db5f461e98a3ca67d2af0848e65b9a87 100644 (file)
@@ -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:: 
index af4b6bec7246bf4239ead1027f630f0f8a91c0a0..cd7538dcde0c5c77e3189bf86c32cf1d2cfdd325 100644 (file)
@@ -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 $@
index 5820ef32da922be6cbfdb2593f2f5329b1961efa..89cbb042b45be144d0a99d9d570e163cfd3ba6bd 100644 (file)
@@ -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::
index 979ac87609103cdfd27431df2ce64ca9dd2995e8..202153b066de6b053104c9c7801036aa2a316494 100644 (file)
@@ -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  
 
index e33215ae7b0a96c3adf1046b02b90d96b26fb366..60838bccc960628b088e42fcf373fbb1d4484d45 100644 (file)
@@ -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 +++
index 065750f0a4ef20b0bc90c097a7f4320d251cc630..a22acde1c3587a4f7435bca0204096583d913d37 100644 (file)
@@ -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)
index 0e7067c551340e676df0860e9f5489cd8d21f433..65981d285505980e0dae0b5283d23e00ee21d74b 100644 (file)
@@ -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::
 
index 7dda592e2d84bbee759682a4d16a64bb19eedc63..523dd125a673cd1e60c4b25d9020b7f9f61af8cb 100644 (file)
@@ -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)
index 5386d00e1b7c1cce392c85cb8a04220db75dad16..b6da0b087dc10f4823c25e9040caeaa163dfff7c 100644 (file)
@@ -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)
index fd311296378324d38a3e7fd2d4ca9695925677a9..b7aa747a8a460162d5b58042e2deb991a40ae775 100644 (file)
@@ -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%;
index 3d99ea70effd7f4fcb23d62713bbf5dada84d793..5c524138d0093bc744632785c14d25c8fe297baa 100644 (file)
@@ -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