krb5 commit [krb5-1.14]: Use RUN_TEST and fix installed krb5.conf uses

Tom Yu tlyu at mit.edu
Mon Oct 26 15:39:34 EDT 2015


https://github.com/krb5/krb5/commit/962a14661fc5b16aea4725f67eff22f9f9179918
commit 962a14661fc5b16aea4725f67eff22f9f9179918
Author: Greg Hudson <ghudson at mit.edu>
Date:   Sun Oct 4 14:45:29 2015 -0400

    Use RUN_TEST and fix installed krb5.conf uses
    
    Use $(RUN_TEST) to run most C test programs, for simplicity and to fix
    accidental uses of the installed krb5.conf.  Where a particular
    krb5.conf must be used instead of the one in src/config-files, use a
    locally defined variant like RUN_TEST_LOCAL_CONF.
    
    Accidental references to the installed krb5.conf were present when
    running t_pac, t_princ, t_etypes, t_trace, t_attr, t_attrset,
    t_packet, t_remote, t_client, pkinit_kdf_test, test_chpw_message,
    text_cxx_krb5, and test_cxx_k5int.
    
    Based on a patch from Robbie Harwood.
    
    (cherry picked from commit 4eea9c287e43ab40936e25094cd093f2f3f32bd9)
    
    ticket: 8266
    version_fixed: 1.14
    status: resolved

 src/kdc/Makefile.in                     |    3 +-
 src/lib/crypto/builtin/des/Makefile.in  |    8 ++--
 src/lib/crypto/builtin/sha1/Makefile.in |    4 +-
 src/lib/crypto/builtin/sha2/Makefile.in |    2 +-
 src/lib/crypto/crypto_tests/Makefile.in |   48 +++++++++++++++---------------
 src/lib/crypto/krb/Makefile.in          |    2 +-
 src/lib/gssapi/generic/Makefile.in      |    2 +-
 src/lib/kdb/Makefile.in                 |    2 +-
 src/lib/krad/Makefile.in                |   13 ++++----
 src/lib/krb5/ccache/Makefile.in         |    6 +--
 src/lib/krb5/keytab/Makefile.in         |    3 +-
 src/lib/krb5/krb/Makefile.in            |   31 +++++++++----------
 src/lib/krb5/os/Makefile.in             |   18 ++++++-----
 src/plugins/preauth/pkinit/Makefile.in  |    2 +-
 src/tests/asn.1/Makefile.in             |   16 ++--------
 src/tests/gssapi/Makefile.in            |    6 ++--
 src/tests/misc/Makefile.in              |   14 ++++----
 src/tests/resolve/Makefile.in           |    6 ++--
 src/tests/shlib/Makefile.in             |    2 +-
 src/tests/threads/Makefile.in           |    2 +-
 src/util/et/Makefile.in                 |    4 +-
 src/util/profile/Makefile.in            |    6 ++--
 22 files changed, 94 insertions(+), 106 deletions(-)

diff --git a/src/kdc/Makefile.in b/src/kdc/Makefile.in
index 63b6bb6..f0f2d5a 100644
--- a/src/kdc/Makefile.in
+++ b/src/kdc/Makefile.in
@@ -69,8 +69,7 @@ rtest: $(RT_OBJS) $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS) $(KRB5_BASE_DEPLIBS)
 	$(CC_LINK) -o rtest $(RT_OBJS) $(KDB5_LIBS) $(KADM_COMM_LIBS) $(KRB5_BASE_LIBS)
 
 check-unix:: rtest
-	KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; export KRB5_CONFIG ; \
-	$(RUN_SETUP) $(VALGRIND) $(srcdir)/rtscript > test.out
+	$(RUN_TEST) $(srcdir)/rtscript > test.out
 	cmp test.out $(srcdir)/rtest.good
 	$(RM) test.out
 
diff --git a/src/lib/crypto/builtin/des/Makefile.in b/src/lib/crypto/builtin/des/Makefile.in
index cf4567e..02255dd 100644
--- a/src/lib/crypto/builtin/des/Makefile.in
+++ b/src/lib/crypto/builtin/des/Makefile.in
@@ -59,10 +59,10 @@ destest$(EXEEXT): destest.$(OBJEXT) $(TOBJS) $(SUPPORT_DEPLIB)
 all-unix:: all-libobjs
 
 check-unix:: verify destest
-	$(RUN_SETUP) $(VALGRIND) ./verify -z
-	$(RUN_SETUP) $(VALGRIND) ./verify -m
-	$(RUN_SETUP) $(VALGRIND) ./verify
-	$(RUN_SETUP) $(VALGRIND) ./destest < $(srcdir)/keytest.data
+	$(RUN_TEST) ./verify -z
+	$(RUN_TEST) ./verify -m
+	$(RUN_TEST) ./verify
+	$(RUN_TEST) ./destest < $(srcdir)/keytest.data
 
 includes:: depend
 
diff --git a/src/lib/crypto/builtin/sha1/Makefile.in b/src/lib/crypto/builtin/sha1/Makefile.in
index 339e47c..3f913ca 100644
--- a/src/lib/crypto/builtin/sha1/Makefile.in
+++ b/src/lib/crypto/builtin/sha1/Makefile.in
@@ -28,8 +28,8 @@ t_shs3: t_shs3.o shs.o $(SUPPORT_DEPLIB)
 	$(CC_LINK) -o t_shs3 t_shs3.o shs.o $(SUPPORT_LIB)
 
 check-unix:: t_shs t_shs3
-	$(RUN_SETUP) $(VALGRIND) $(C)t_shs -x
-	$(RUN_SETUP) $(VALGRIND) $(C)t_shs3
+	$(RUN_TEST) $(C)t_shs -x
+	$(RUN_TEST) $(C)t_shs3
 
 check-windows:: $(OUTPRE)t_shs.exe $(OUTPRE)t_shs3.exe
 	$(OUTPRE)$(C)t_shs.exe -x
diff --git a/src/lib/crypto/builtin/sha2/Makefile.in b/src/lib/crypto/builtin/sha2/Makefile.in
index 7c5e137..a13f02e 100644
--- a/src/lib/crypto/builtin/sha2/Makefile.in
+++ b/src/lib/crypto/builtin/sha2/Makefile.in
@@ -28,7 +28,7 @@ $(OUTPRE)t_sha256.exe: $(OUTPRE)t_sha256.obj $(OUTPRE)sha256.obj
 
 
 check-unix:: t_sha256
-	$(RUN_SETUP) $(VALGRIND) $(C)t_sha256
+	$(RUN_TEST) $(C)t_sha256
 
 clean::
 	$(RM) t_sha256$(EXEEXT) t_sha256.$(OBJEXT)
diff --git a/src/lib/crypto/crypto_tests/Makefile.in b/src/lib/crypto/crypto_tests/Makefile.in
index c92ecc8..f80c9a0 100644
--- a/src/lib/crypto/crypto_tests/Makefile.in
+++ b/src/lib/crypto/crypto_tests/Makefile.in
@@ -38,35 +38,35 @@ check-unix:: t_nfold t_encrypt t_decrypt t_prf t_prng t_cmac t_hmac \
 		camellia-test  \
 		t_mddriver4 t_mddriver \
 		t_crc t_cts t_short t_str2key t_derive t_fork t_cf2 t_combine
-	$(RUN_SETUP) $(VALGRIND) ./t_nfold
-	$(RUN_SETUP) $(VALGRIND) ./t_encrypt
-	$(RUN_SETUP) $(VALGRIND) ./t_decrypt
-	$(RUN_SETUP) $(VALGRIND) ./t_prng <$(srcdir)/t_prng.seed >t_prng.output
-	$(RUN_SETUP) $(VALGRIND) ./t_cmac
-	$(RUN_SETUP) $(VALGRIND) ./t_hmac
-	$(RUN_SETUP) $(VALGRIND) ./t_prf <$(srcdir)/t_prf.in >t_prf.output
+	$(RUN_TEST) ./t_nfold
+	$(RUN_TEST) ./t_encrypt
+	$(RUN_TEST) ./t_decrypt
+	$(RUN_TEST) ./t_prng <$(srcdir)/t_prng.seed >t_prng.output
+	$(RUN_TEST) ./t_cmac
+	$(RUN_TEST) ./t_hmac
+	$(RUN_TEST) ./t_prf <$(srcdir)/t_prf.in >t_prf.output
 	diff t_prf.output $(srcdir)/t_prf.expected
-	$(RUN_SETUP) $(VALGRIND) ./t_cksum4 "this is a test" e3f76a07f3401e3536b43a3f54226c39422c35682c354835
-	$(RUN_SETUP) $(VALGRIND) ./t_cksum5 "this is a test" e3f76a07f3401e351143ee6f4c09be1edb4264d55015db53
-	$(RUN_SETUP) $(VALGRIND) ./t_cksums
-	$(RUN_SETUP) $(VALGRIND) ./t_crc
-	$(RUN_SETUP) $(VALGRIND) ./t_cts
-	$(RUN_SETUP) $(VALGRIND) ./aes-test -k > vk.txt
+	$(RUN_TEST) ./t_cksum4 "this is a test" e3f76a07f3401e3536b43a3f54226c39422c35682c354835
+	$(RUN_TEST) ./t_cksum5 "this is a test" e3f76a07f3401e351143ee6f4c09be1edb4264d55015db53
+	$(RUN_TEST) ./t_cksums
+	$(RUN_TEST) ./t_crc
+	$(RUN_TEST) ./t_cts
+	$(RUN_TEST) ./aes-test -k > vk.txt
 	cmp vk.txt $(srcdir)/expect-vk.txt
-	$(RUN_SETUP) $(VALGRIND) ./aes-test > vt.txt
+	$(RUN_TEST) ./aes-test > vt.txt
 	cmp vt.txt $(srcdir)/expect-vt.txt
-	$(RUN_SETUP) $(VALGRIND) ./camellia-test > camellia-vt.txt
+	$(RUN_TEST) ./camellia-test > camellia-vt.txt
 	cmp camellia-vt.txt $(srcdir)/camellia-expect-vt.txt
-	$(RUN_SETUP) $(VALGRIND) $(C)t_mddriver4 -x
-	$(RUN_SETUP) $(VALGRIND) $(C)t_mddriver -x
-	$(RUN_SETUP) $(VALGRIND) ./t_short
-	$(RUN_SETUP) $(VALGRIND) ./t_str2key
-	$(RUN_SETUP) $(VALGRIND) ./t_derive
-	$(RUN_SETUP) $(VALGRIND) ./t_fork
-	$(RUN_SETUP) $(VALGRIND) ./t_cf2 <$(srcdir)/t_cf2.in >t_cf2.output
+	$(RUN_TEST) $(C)t_mddriver4 -x
+	$(RUN_TEST) $(C)t_mddriver -x
+	$(RUN_TEST) ./t_short
+	$(RUN_TEST) ./t_str2key
+	$(RUN_TEST) ./t_derive
+	$(RUN_TEST) ./t_fork
+	$(RUN_TEST) ./t_cf2 <$(srcdir)/t_cf2.in >t_cf2.output
 	diff t_cf2.output $(srcdir)/t_cf2.expected
-	$(RUN_SETUP) $(VALGRIND) ./t_combine
-#	$(RUN_SETUP) $(VALGRIND) ./t_pkcs5
+	$(RUN_TEST) ./t_combine
+#	$(RUN_TEST) ./t_pkcs5
 
 t_nfold$(EXEEXT): t_nfold.$(OBJEXT) $(KRB5_BASE_DEPLIBS)
 	$(CC_LINK) -o $@ t_nfold.$(OBJEXT) $(KRB5_BASE_LIBS)
diff --git a/src/lib/crypto/krb/Makefile.in b/src/lib/crypto/krb/Makefile.in
index 75ce457..47d1b4a 100644
--- a/src/lib/crypto/krb/Makefile.in
+++ b/src/lib/crypto/krb/Makefile.in
@@ -203,7 +203,7 @@ depend:: $(SRCS)
 
 check-unix:: t_fortuna
 	if [ $(PRNG_ALG) = fortuna ]; then \
-		$(RUN_SETUP) $(VALGRIND) ./t_fortuna > t_fortuna.output; \
+		$(RUN_TEST) ./t_fortuna > t_fortuna.output; \
 		cmp t_fortuna.output $(srcdir)/t_fortuna.expected; \
 	fi
 
diff --git a/src/lib/gssapi/generic/Makefile.in b/src/lib/gssapi/generic/Makefile.in
index c8681fb..9f8f0b4 100644
--- a/src/lib/gssapi/generic/Makefile.in
+++ b/src/lib/gssapi/generic/Makefile.in
@@ -151,7 +151,7 @@ t_seqstate: t_seqstate.o util_seqstate.o $(SUPPORT_DEPLIB)
 		$(SUPPORT_LIB)
 
 check-unix:: t_seqstate
-	$(RUN_SETUP) $(VALGRIND) ./t_seqstate
+	$(RUN_TEST) ./t_seqstate
 
 generate-files-mac: gssapi.h errmap.h
 
diff --git a/src/lib/kdb/Makefile.in b/src/lib/kdb/Makefile.in
index b6b6ddf..16cd5db 100644
--- a/src/lib/kdb/Makefile.in
+++ b/src/lib/kdb/Makefile.in
@@ -54,7 +54,7 @@ clean-unix:: clean-liblinks clean-libs clean-libobjs
 	$(RM) t_ulog.o t_ulog test.ulog
 
 check-unix:: t_ulog
-	$(RUN_SETUP) $(VALGRIND) ./t_ulog test.ulog
+	$(RUN_TEST) ./t_ulog test.ulog
 
 check-pytests:: t_stringattr
 	$(RUNPYTEST) $(srcdir)/t_stringattr.py $(PYTESTFLAGS)
diff --git a/src/lib/krad/Makefile.in b/src/lib/krad/Makefile.in
index 75431a0..3c732ef 100644
--- a/src/lib/krad/Makefile.in
+++ b/src/lib/krad/Makefile.in
@@ -2,7 +2,6 @@ mydir=lib$(S)krad
 BUILDTOP=$(REL)..$(S)..
 RELDIR=krad
 
-RUN_SETUP=@KRB5_RUN_ENV@
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
 
@@ -33,12 +32,12 @@ install-unix:: install-libs
 clean-unix:: clean-liblinks clean-libs clean-libobjs
 
 check-unix:: t_attr t_attrset t_code t_packet t_remote t_client
-	$(RUN_SETUP) $(VALGRIND) ./t_attr
-	$(RUN_SETUP) $(VALGRIND) ./t_attrset
-	$(RUN_SETUP) $(VALGRIND) ./t_code
-	$(RUN_SETUP) $(VALGRIND) ./t_packet $(PYTHON) $(srcdir)/t_daemon.py
-	$(RUN_SETUP) $(VALGRIND) ./t_remote $(PYTHON) $(srcdir)/t_daemon.py
-	$(RUN_SETUP) $(VALGRIND) ./t_client $(PYTHON) $(srcdir)/t_daemon.py
+	$(RUN_TEST) ./t_attr
+	$(RUN_TEST) ./t_attrset
+	$(RUN_TEST) ./t_code
+	$(RUN_TEST) ./t_packet $(PYTHON) $(srcdir)/t_daemon.py
+	$(RUN_TEST) ./t_remote $(PYTHON) $(srcdir)/t_daemon.py
+	$(RUN_TEST) ./t_client $(PYTHON) $(srcdir)/t_daemon.py
 
 TESTDEPS=t_test.o $(KRB5_BASE_DEPLIBS)
 TESTLIBS=t_test.o $(KRB5_BASE_LIBS)
diff --git a/src/lib/krb5/ccache/Makefile.in b/src/lib/krb5/ccache/Makefile.in
index 30cfc22..516ad7f 100644
--- a/src/lib/krb5/ccache/Makefile.in
+++ b/src/lib/krb5/ccache/Makefile.in
@@ -138,10 +138,8 @@ t_marshal: $(T_MARSHAL_OBJS) $(KRB5_BASE_DEPLIBS)
 	$(CC_LINK) -o $@ $(T_MARSHAL_OBJS) $(KRB5_BASE_LIBS)
 
 check-unix:: t_cc t_marshal
-	KRB5_CONFIG=$(srcdir)/t_krb5.conf ; export KRB5_CONFIG ;\
-	$(RUN_SETUP) $(VALGRIND) ./t_cc
-	KRB5_CONFIG=$(srcdir)/t_krb5.conf ; export KRB5_CONFIG ;\
-	$(RUN_SETUP) $(VALGRIND) ./t_marshal testcache
+	$(RUN_TEST) ./t_cc
+	$(RUN_TEST) ./t_marshal testcache
 
 check-pytests:: t_cccursor t_cccol
 	$(RUNPYTEST) $(srcdir)/t_cccol.py $(PYTESTFLAGS)
diff --git a/src/lib/krb5/keytab/Makefile.in b/src/lib/krb5/keytab/Makefile.in
index d586ee0..28485d5 100644
--- a/src/lib/krb5/keytab/Makefile.in
+++ b/src/lib/krb5/keytab/Makefile.in
@@ -54,8 +54,7 @@ all-unix:: all-libobjs
 clean-unix:: clean-libobjs
 
 check-unix:: t_keytab
-	KRB5_CONFIG=$(srcdir)/t_krb5.conf ; export KRB5_CONFIG ;\
-	$(RUN_SETUP) $(VALGRIND) ./t_keytab
+	$(RUN_TEST) ./t_keytab
 
 T_KEYTAB_OBJS = t_keytab.o
 t_keytab: $(T_KEYTAB_OBJS) $(KRB5_BASE_DEPLIBS)
diff --git a/src/lib/krb5/krb/Makefile.in b/src/lib/krb5/krb/Makefile.in
index 62f0b90..d73d4ad 100644
--- a/src/lib/krb5/krb/Makefile.in
+++ b/src/lib/krb5/krb/Makefile.in
@@ -3,6 +3,10 @@ BUILDTOP=$(REL)..$(S)..$(S)..
 LOCALINCLUDES = -I$(srcdir)/../os -I$(top_srcdir)
 DEFINES=-DLIBDIR=\"$(KRB5_LIBDIR)\" -DDYNOBJEXT=\"$(DYNOBJEXT)\"
 
+# Like RUN_TEST, but use t_krb5.conf from this directory.
+RUN_TEST_LOCAL_CONF=$(RUN_SETUP) KRB5_CONFIG=$(srcdir)/t_krb5.conf LC_ALL=C \
+	$(VALGRIND)
+
 ##DOS##BUILDTOP = ..\..\..
 ##DOS##PREFIXDIR=krb
 ##DOS##OBJFILE=..\$(OUTPRE)$(PREFIXDIR).lst
@@ -438,8 +442,7 @@ TEST_PROGS= t_walk_rtree t_kerb t_ser t_deltat t_expand t_authdata t_pac \
 	t_princ t_etypes t_vfy_increds t_response_items
 
 check-unix:: $(TEST_PROGS)
-	KRB5_CONFIG=$(srcdir)/t_krb5.conf ; export KRB5_CONFIG ;\
-	$(RUN_SETUP) $(VALGRIND) ./t_kerb \
+	$(RUN_TEST_LOCAL_CONF) ./t_kerb \
 		parse_name tytso \
 		parse_name tytso at SHAZAAM \
 		parse_name tytso/root at VEGGIE.COM \
@@ -462,20 +465,16 @@ check-unix:: $(TEST_PROGS)
 		> test.out
 	cmp test.out $(srcdir)/t_ref_kerb.out
 	$(RM) test.out
-	KRB5_CONFIG=$(srcdir)/t_krb5.conf ; export KRB5_CONFIG ;\
-		$(RUN_SETUP) $(VALGRIND) ./t_ser
-	$(RUN_SETUP) $(VALGRIND) ./t_deltat
-	$(RUN_SETUP) $(VALGRIND) sh $(srcdir)/transit-tests
-	KRB5_CONFIG=$(srcdir)/t_krb5.conf ; export KRB5_CONFIG ;\
-		$(RUN_SETUP) $(VALGRIND) sh $(srcdir)/walktree-tests
-	KRB5_CONFIG=$(srcdir)/t_krb5.conf ; export KRB5_CONFIG ;\
-	$(RUN_SETUP) $(VALGRIND) ./t_authdata
-	$(RUN_SETUP) $(VALGRIND) ./t_pac
-	$(RUN_SETUP) $(VALGRIND) ./t_princ
-	$(RUN_SETUP) $(VALGRIND) ./t_etypes
-	$(RUN_SETUP) $(VALGRIND) ./t_response_items
-	KRB5_CONFIG=$(srcdir)/t_krb5.conf ; export KRB5_CONFIG ;\
-		$(RUN_SETUP) $(VALGRIND) ./t_copy_context
+	$(RUN_TEST) ./t_ser
+	$(RUN_TEST) ./t_deltat
+	$(RUN_TEST) sh $(srcdir)/transit-tests
+	$(RUN_TEST_LOCAL_CONF) sh $(srcdir)/walktree-tests
+	$(RUN_TEST) ./t_authdata
+	$(RUN_TEST) ./t_pac
+	$(RUN_TEST) ./t_princ
+	$(RUN_TEST) ./t_etypes
+	$(RUN_TEST) ./t_response_items
+	$(RUN_TEST) ./t_copy_context
 
 check-pytests:: t_expire_warn t_vfy_increds
 	$(RUNPYTEST) $(srcdir)/t_expire_warn.py $(PYTESTFLAGS)
diff --git a/src/lib/krb5/os/Makefile.in b/src/lib/krb5/os/Makefile.in
index 1bd8573..ab1cfc6 100644
--- a/src/lib/krb5/os/Makefile.in
+++ b/src/lib/krb5/os/Makefile.in
@@ -4,6 +4,10 @@ DEFINES=-DLIBDIR=\"$(KRB5_LIBDIR)\" -DBINDIR=\"$(CLIENT_BINDIR)\" \
 	-DSBINDIR=\"$(ADMIN_BINDIR)\"
 LOCALINCLUDES= -I$(top_srcdir)/util/profile
 
+# Like RUN_TEST, but use td_krb5.conf from this directory.
+RUN_TEST_LOCAL_CONF=$(RUN_SETUP) KRB5_CONFIG=$(srcdir)/td_krb5.conf LC_ALL=C \
+	$(VALGRIND)
+
 ##DOS##BUILDTOP = ..\..\..
 ##DOS##PREFIXDIR=os
 ##DOS##OBJFILE=..\$(OUTPRE)$(PREFIXDIR).lst
@@ -199,8 +203,7 @@ check-unix:: check-unix-stdconf check-unix-locate check-unix-trace \
 	check-unix-expand
 
 check-unix-stdconf:: t_std_conf
-	KRB5_CONFIG=$(srcdir)/td_krb5.conf ; export KRB5_CONFIG ;\
-	$(RUN_SETUP) $(VALGRIND) ./t_std_conf  -d -s NEW.DEFAULT.REALM -d \
+	$(RUN_TEST_LOCAL_CONF) ./t_std_conf  -d -s NEW.DEFAULT.REALM -d \
 		-D DEFAULT_REALM.TST -r bad.idea -r itar.bad.idea \
 		-r really.BAD.IDEA. -r clipper.bad.idea -r KeYEsCrOW.BaD.IDea \
 		-r pgp.good.idea -r no_domain > test.out
@@ -219,8 +222,7 @@ check-unix-locate:: t_locate_kdc
 	if [ "$(OFFLINE)" = no ]; then \
 	    if $(DIG) $(SRVNAME) srv | grep -i $(DIGPAT) || \
 		$(NSLOOKUP) -q=srv $(SRVNAME) | grep -i $(NSPAT); then \
-		KRB5_CONFIG=$(srcdir)/td_krb5.conf ; export KRB5_CONFIG ;\
-		$(RUN_SETUP) $(VALGRIND) ./t_locate_kdc $(LOCREALM); \
+		$(RUN_TEST) ./t_locate_kdc $(LOCREALM); \
 	    else \
 		echo '*** WARNING: skipped t_locate_kdc test: known DNS name not found'; \
 		echo 'Skipped t_locate_kdc test: known DNS name found' >> $(SKIPTESTS); \
@@ -233,15 +235,15 @@ check-unix-locate:: t_locate_kdc
 check-unix-trace:: t_trace
 	rm -f t_trace.out
 	KRB5_TRACE=t_trace.out ; export KRB5_TRACE ; \
-	$(RUN_SETUP) $(VALGRIND) ./t_trace
+	$(RUN_TEST) ./t_trace
 	sed -e 's/^[^:]*: //' t_trace.out | cmp - $(srcdir)/t_trace.ref
 	rm -f t_trace.out
 
 check-unix-expand:: t_expand_path
-	$(RUN_SETUP) $(VALGRIND) ./t_expand_path '%{null}' ''
-	$(RUN_SETUP) $(VALGRIND) ./t_expand_path ' %{BINDIR}%{LIBDIR} ' \
+	$(RUN_TEST) ./t_expand_path '%{null}' ''
+	$(RUN_TEST) ./t_expand_path ' %{BINDIR}%{LIBDIR} ' \
 		' $(CLIENT_BINDIR)$(KRB5_LIBDIR) '
-	$(RUN_SETUP) $(VALGRIND) ./t_expand_path \
+	$(RUN_TEST) ./t_expand_path \
 		'the %{animal}%{s} on the %{place}%{s}' \
 		'the frogs on the pads'
 
diff --git a/src/plugins/preauth/pkinit/Makefile.in b/src/plugins/preauth/pkinit/Makefile.in
index 32d010f..2c24a99 100644
--- a/src/plugins/preauth/pkinit/Makefile.in
+++ b/src/plugins/preauth/pkinit/Makefile.in
@@ -45,7 +45,7 @@ clean::
 	$(RM) pkinit_kdf_test pkinit_kdf_test.o
 
 check-unix:: pkinit_kdf_test
-	$(RUN_SETUP) $(VALGRIND) ./pkinit_kdf_test
+	$(RUN_TEST) ./pkinit_kdf_test
 
 pkinit_kdf_test: pkinit_kdf_test.o $(STLIBOBJS) $(SHLIB_EXPDEPS)
 	$(CC_LINK) -o $@ pkinit_kdf_test.o $(STLIBOBJS) $(SHLIB_EXPLIBS)
diff --git a/src/tests/asn.1/Makefile.in b/src/tests/asn.1/Makefile.in
index 6d766ed..422e535 100644
--- a/src/tests/asn.1/Makefile.in
+++ b/src/tests/asn.1/Makefile.in
@@ -38,14 +38,10 @@ check:: check-encode check-encode-trval check-decode check-leak
 # Does not actually test for leaks unless using valgrind or a similar
 # tool, but does exercise a bunch of code.
 check-leak: krb5_decode_leak
-	KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; \
-		export KRB5_CONFIG ;\
-		$(RUN_SETUP) $(VALGRIND) ./krb5_decode_leak
+	$(RUN_TEST) ./krb5_decode_leak
 
 check-decode: krb5_decode_test
-	KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; \
-		export KRB5_CONFIG ;\
-		$(RUN_SETUP) $(VALGRIND) ./krb5_decode_test
+	$(RUN_TEST) ./krb5_decode_test
 
 PKINIT_ENCODE_OUT=$(PKINIT_ENCODE_OUT- at PKINIT@)
 PKINIT_ENCODE_OUT-yes=$(srcdir)/pkinit_encode.out
@@ -68,15 +64,11 @@ expected_trval.out: trval_reference.out pkinit_trval.out ldap_trval.out
 		$(LDAP_TRVAL_OUT) > $@
 
 check-encode: krb5_encode_test expected_encode.out
-	KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; \
-		export KRB5_CONFIG ;\
-		$(RUN_SETUP) $(VALGRIND) ./krb5_encode_test > test.out
+	$(RUN_TEST) ./krb5_encode_test > test.out
 	cmp test.out expected_encode.out
 
 check-encode-trval: krb5_encode_test expected_trval.out
-	KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; \
-		export KRB5_CONFIG ;\
-		$(RUN_SETUP) $(VALGRIND) ./krb5_encode_test -t > trval.out
+	$(RUN_TEST) ./krb5_encode_test -t > trval.out
 	cmp trval.out expected_trval.out
 
 # This target uses asn1c to generate encodings of sample objects, to
diff --git a/src/tests/gssapi/Makefile.in b/src/tests/gssapi/Makefile.in
index 9fe5ed5..0a329a0 100644
--- a/src/tests/gssapi/Makefile.in
+++ b/src/tests/gssapi/Makefile.in
@@ -34,9 +34,9 @@ all:: ccinit ccrefresh t_accname t_ccselect t_ciflags t_credstore t_enctypes \
 	t_oid t_pcontok t_prf t_s4u t_s4u2proxy_krb5 t_saslname t_spnego
 
 check-unix:: t_oid
-	$(RUN_SETUP) $(VALGRIND) ./t_invalid
-	$(RUN_SETUP) $(VALGRIND) ./t_oid
-	$(RUN_SETUP) $(VALGRIND) ./t_prf
+	$(RUN_TEST) ./t_invalid
+	$(RUN_TEST) ./t_oid
+	$(RUN_TEST) ./t_prf
 
 check-pytests:: ccinit ccrefresh t_accname t_ccselect t_ciflags t_credstore \
 	t_enctypes t_err t_export_cred t_export_name t_imp_cred t_inq_cred \
diff --git a/src/tests/misc/Makefile.in b/src/tests/misc/Makefile.in
index ed37359..68d7bd9 100644
--- a/src/tests/misc/Makefile.in
+++ b/src/tests/misc/Makefile.in
@@ -18,13 +18,13 @@ SRCS=\
 all:: test_getpw test_chpw_message
 
 check:: test_getpw test_chpw_message test_cxx_krb5 test_cxx_gss test_cxx_rpc test_cxx_k5int test_cxx_kadm5
-	$(RUN_SETUP) $(VALGRIND) ./test_getpw
-	$(RUN_SETUP) $(VALGRIND) ./test_chpw_message
-	$(RUN_SETUP) $(VALGRIND) ./test_cxx_krb5
-	$(RUN_SETUP) $(VALGRIND) ./test_cxx_k5int
-	$(RUN_SETUP) $(VALGRIND) ./test_cxx_gss
-	$(RUN_SETUP) $(VALGRIND) ./test_cxx_rpc
-	$(RUN_SETUP) $(VALGRIND) ./test_cxx_kadm5
+	$(RUN_TEST) ./test_getpw
+	$(RUN_TEST) ./test_chpw_message
+	$(RUN_TEST) ./test_cxx_krb5
+	$(RUN_TEST) ./test_cxx_k5int
+	$(RUN_TEST) ./test_cxx_gss
+	$(RUN_TEST) ./test_cxx_rpc
+	$(RUN_TEST) ./test_cxx_kadm5
 
 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 6d79dcb..5a1eb13 100644
--- a/src/tests/resolve/Makefile.in
+++ b/src/tests/resolve/Makefile.in
@@ -17,9 +17,9 @@ fake-addrinfo-test: fake-addrinfo-test.o
 	$(CC_LINK) -o $@ fake-addrinfo-test.o $(SUPPORT_LIB) $(LIBS)
 
 check:: resolve addrinfo-test fake-addrinfo-test
-	$(RUN_SETUP) $(VALGRIND) ./resolve
-	$(RUN_SETUP) $(VALGRIND) ./addrinfo-test -p telnet
-	$(RUN_SETUP) $(VALGRIND) ./fake-addrinfo-test -p telnet
+	$(RUN_TEST) ./resolve
+	$(RUN_TEST) ./addrinfo-test -p telnet
+	$(RUN_TEST) ./fake-addrinfo-test -p telnet
 
 install::
 
diff --git a/src/tests/shlib/Makefile.in b/src/tests/shlib/Makefile.in
index 0401143..9ad575d 100644
--- a/src/tests/shlib/Makefile.in
+++ b/src/tests/shlib/Makefile.in
@@ -9,7 +9,7 @@ SRCS=$(srcdir)/t_loader.c
 all::
 
 run-t_loader: t_loader
-	$(RUN_SETUP) $(VALGRIND) ./t_loader
+	$(RUN_TEST) ./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 311e2c0..2bb2e26 100644
--- a/src/tests/threads/Makefile.in
+++ b/src/tests/threads/Makefile.in
@@ -10,7 +10,7 @@ SRCS=$(srcdir)/t_rcache.c \
 all::
 
 run-t_rcache: t_rcache
-	$(RUN_SETUP) $(VALGRIND) ./t_rcache
+	$(RUN_TEST) ./t_rcache
 
 t_rcache: t_rcache.o $(KRB5_BASE_DEPLIBS)
 	$(CC_LINK) -o t_rcache t_rcache.o $(KRB5_BASE_LIBS) $(THREAD_LINKOPTS)
diff --git a/src/util/et/Makefile.in b/src/util/et/Makefile.in
index ae13065..e276fcc 100644
--- a/src/util/et/Makefile.in
+++ b/src/util/et/Makefile.in
@@ -103,8 +103,8 @@ clean-unix::
 # 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) $(VALGRIND) ./test_et
-	$(RUN_SETUP) $(VALGRIND) ./t_com_err
+	$(RUN_TEST) ./test_et
+	$(RUN_TEST) ./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 79ea610..942c85d 100644
--- a/src/util/profile/Makefile.in
+++ b/src/util/profile/Makefile.in
@@ -136,8 +136,8 @@ clean-windows::
 	$(RM) $(PROFILE_HDR)
 
 check-unix:: test_parse test_profile test_vtable test_load modtest.conf
-	$(RUN_SETUP) $(VALGRIND) ./test_vtable
-	$(RUN_SETUP) $(VALGRIND) ./test_load
+	$(RUN_TEST) ./test_vtable
+	$(RUN_TEST) ./test_load
 
 DO_TCL=@DO_TCL@
 check-unix:: check-unix-tcl-$(DO_TCL)
@@ -149,7 +149,7 @@ check-unix-tcl-:
 
 check-unix-tcl-ok: profile_tcl
 	cp $(srcdir)/test.ini test2.ini
-	$(RUN_SETUP) $(VALGRIND) ./profile_tcl $(srcdir)/prof_test1
+	$(RUN_TEST) ./profile_tcl $(srcdir)/prof_test1
 
 check-windows:: $(OUTPRE)test_profile.exe $(OUTPRE)test_parse.exe
 	$(RM) $(OUTPRE)*.obj


More information about the cvs-krb5 mailing list