From: Greg Hudson Date: Tue, 10 Nov 2015 16:54:07 +0000 (-0500) Subject: Rename two test programs for consistency X-Git-Tag: krb5-1.15-beta1~330 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F346%2Fhead;p=thirdparty%2Fkrb5.git Rename two test programs for consistency In src/tests, rename t_init_creds.c and t_localauth.c to icred.c and localauth.c for consistency with the other C test programs in that directory. --- diff --git a/.gitignore b/.gitignore index b453a84f1e..3fd3b20ad7 100644 --- a/.gitignore +++ b/.gitignore @@ -254,16 +254,16 @@ testlog /src/tests/gcred /src/tests/hist /src/tests/hrealm +/src/tests/icred /src/tests/kdbtest /src/tests/kdc.conf /src/tests/krb5.conf +/src/tests/localauth /src/tests/plugorder /src/tests/rdreq /src/tests/responder /src/tests/s2p /src/tests/s4u2proxy -/src/tests/t_init_creds -/src/tests/t_localauth /src/tests/asn.1/expected_encode.out /src/tests/asn.1/expected_trval.out diff --git a/src/tests/Makefile.in b/src/tests/Makefile.in index b24e197d29..4ab8e6e3f3 100644 --- a/src/tests/Makefile.in +++ b/src/tests/Makefile.in @@ -6,10 +6,10 @@ SUBDIRS = resolve asn.1 create hammer verify gssapi dejagnu shlib \ RUN_DB_TEST = $(RUN_SETUP) KRB5_KDC_PROFILE=kdc.conf KRB5_CONFIG=krb5.conf \ LC_ALL=C $(VALGRIND) -OBJS= adata.o etinfo.o gcred.o hist.o hrealm.o kdbtest.o plugorder.o \ - t_init_creds.o t_localauth.o rdreq.o responder.o s2p.o s4u2proxy.o -EXTRADEPSRCS= adata.c etinfo.c gcred.c hist.c hrealm.c kdbtest.c plugorder.c \ - t_init_creds.c t_localauth.c rdreq.o responder.c s2p.c s4u2proxy.c +OBJS= adata.o etinfo.o gcred.o hist.o hrealm.o icred.o kdbtest.o localauth.o \ + plugorder.o rdreq.o responder.o s2p.o s4u2proxy.o +EXTRADEPSRCS= adata.c etinfo.c gcred.c hist.c hrealm.c icred.c kdbtest.c \ + localauth.c plugorder.c rdreq.o responder.c s2p.c s4u2proxy.c TEST_DB = ./testdb TEST_REALM = FOO.TEST.REALM @@ -36,10 +36,16 @@ hist: hist.o $(KDB5_DEPLIBS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) hrealm: hrealm.o $(KRB5_BASE_DEPLIBS) $(CC_LINK) -o $@ hrealm.o $(KRB5_BASE_LIBS) +icred: icred.o $(KRB5_BASE_DEPLIBS) + $(CC_LINK) -o $@ icred.o $(KRB5_BASE_LIBS) + kdbtest: kdbtest.o $(KDB5_DEPLIBS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) $(CC_LINK) -o $@ kdbtest.o $(KDB5_LIBS) $(KADMSRV_LIBS) \ $(KRB5_BASE_LIBS) +localauth: localauth.o $(KRB5_BASE_DEPLIBS) + $(CC_LINK) -o $@ localauth.o $(KRB5_BASE_LIBS) + plugorder: plugorder.o $(KRB5_BASE_DEPLIBS) $(CC_LINK) -o $@ plugorder.o $(KRB5_BASE_LIBS) @@ -55,12 +61,6 @@ s2p: s2p.o $(KRB5_BASE_DEPLIBS) s4u2proxy: s4u2proxy.o $(KRB5_BASE_DEPLIBS) $(CC_LINK) -o $@ s4u2proxy.o $(KRB5_BASE_LIBS) -t_init_creds: t_init_creds.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ t_init_creds.o $(KRB5_BASE_LIBS) - -t_localauth: t_localauth.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ t_localauth.o $(KRB5_BASE_LIBS) - unlockiter: unlockiter.o $(KDB5_DEPLIBS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) $(CC_LINK) -o $@ unlockiter.o $(KDB5_LIBS) $(KADMSRV_LIBS) \ $(KRB5_BASE_LIBS) @@ -107,8 +107,8 @@ kdb_check: kdc.conf krb5.conf $(RUN_DB_TEST) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) destroy -f $(RM) $(TEST_DB)* stash_file -check-pytests:: adata etinfo gcred hist hrealm kdbtest plugorder rdreq -check-pytests:: responder s2p s4u2proxy t_init_creds t_localauth unlockiter +check-pytests:: adata etinfo gcred hist hrealm icred kdbtest localauth +check-pytests:: plugorder rdreq responder s2p s4u2proxy unlockiter $(RUNPYTEST) $(srcdir)/t_general.py $(PYTESTFLAGS) $(RUNPYTEST) $(srcdir)/t_dump.py $(PYTESTFLAGS) $(RUNPYTEST) $(srcdir)/t_iprop.py $(PYTESTFLAGS) @@ -159,8 +159,7 @@ check-pytests:: responder s2p s4u2proxy t_init_creds t_localauth unlockiter $(RUNPYTEST) $(srcdir)/t_tabdump.py $(PYTESTFLAGS) clean:: - $(RM) gcred hist hrealm kdbtest plugorder rdreq responder s2p - $(RM) adata etinfo gcred hist hrealm kdbtest plugorder rdreq responder - $(RM) s2p s4u2proxy t_init_creds t_localauth krb5.conf kdc.conf + $(RM) adata etinfo gcred hist hrealm icred kdbtest localauth plugorder + $(RM) rdreq responder s2p s4u2proxy krb5.conf kdc.conf $(RM) -rf kdc_realm/sandbox ldap $(RM) au.log diff --git a/src/tests/deps b/src/tests/deps index c00840efc9..d28002635e 100644 --- a/src/tests/deps +++ b/src/tests/deps @@ -1,6 +1,26 @@ # # Generated makefile dependencies follow. # +$(OUTPRE)adata.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \ + $(BUILDTOP)/include/krb5/krb5.h $(BUILDTOP)/include/osconf.h \ + $(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) $(top_srcdir)/include/k5-buf.h \ + $(top_srcdir)/include/k5-err.h $(top_srcdir)/include/k5-gmt_mktime.h \ + $(top_srcdir)/include/k5-int-pkinit.h $(top_srcdir)/include/k5-int.h \ + $(top_srcdir)/include/k5-platform.h $(top_srcdir)/include/k5-plugin.h \ + $(top_srcdir)/include/k5-thread.h $(top_srcdir)/include/k5-trace.h \ + $(top_srcdir)/include/krb5.h $(top_srcdir)/include/krb5/authdata_plugin.h \ + $(top_srcdir)/include/krb5/plugin.h $(top_srcdir)/include/port-sockets.h \ + $(top_srcdir)/include/socket-utils.h adata.c +$(OUTPRE)etinfo.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \ + $(BUILDTOP)/include/krb5/krb5.h $(BUILDTOP)/include/osconf.h \ + $(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) $(top_srcdir)/include/k5-buf.h \ + $(top_srcdir)/include/k5-err.h $(top_srcdir)/include/k5-gmt_mktime.h \ + $(top_srcdir)/include/k5-int-pkinit.h $(top_srcdir)/include/k5-int.h \ + $(top_srcdir)/include/k5-platform.h $(top_srcdir)/include/k5-plugin.h \ + $(top_srcdir)/include/k5-thread.h $(top_srcdir)/include/k5-trace.h \ + $(top_srcdir)/include/krb5.h $(top_srcdir)/include/krb5/authdata_plugin.h \ + $(top_srcdir)/include/krb5/plugin.h $(top_srcdir)/include/port-sockets.h \ + $(top_srcdir)/include/socket-utils.h etinfo.c $(OUTPRE)gcred.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \ $(BUILDTOP)/include/krb5/krb5.h $(BUILDTOP)/include/osconf.h \ $(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) $(top_srcdir)/include/k5-buf.h \ @@ -40,6 +60,8 @@ $(OUTPRE)hrealm.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \ $(top_srcdir)/include/krb5.h $(top_srcdir)/include/krb5/authdata_plugin.h \ $(top_srcdir)/include/krb5/plugin.h $(top_srcdir)/include/port-sockets.h \ $(top_srcdir)/include/socket-utils.h hrealm.c +$(OUTPRE)icred.$(OBJEXT): $(BUILDTOP)/include/krb5/krb5.h \ + $(COM_ERR_DEPS) $(top_srcdir)/include/krb5.h icred.c $(OUTPRE)kdbtest.$(OBJEXT): $(BUILDTOP)/include/gssapi/gssapi.h \ $(BUILDTOP)/include/gssrpc/types.h $(BUILDTOP)/include/kadm5/admin.h \ $(BUILDTOP)/include/kadm5/chpass_util_strings.h $(BUILDTOP)/include/kadm5/kadm_err.h \ @@ -50,6 +72,8 @@ $(OUTPRE)kdbtest.$(OBJEXT): $(BUILDTOP)/include/gssapi/gssapi.h \ $(top_srcdir)/include/gssrpc/svc.h $(top_srcdir)/include/gssrpc/svc_auth.h \ $(top_srcdir)/include/gssrpc/xdr.h $(top_srcdir)/include/kdb.h \ $(top_srcdir)/include/krb5.h kdbtest.c +$(OUTPRE)localauth.$(OBJEXT): $(BUILDTOP)/include/krb5/krb5.h \ + $(COM_ERR_DEPS) $(top_srcdir)/include/krb5.h localauth.c $(OUTPRE)plugorder.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \ $(BUILDTOP)/include/gssapi/gssapi.h $(BUILDTOP)/include/gssrpc/types.h \ $(BUILDTOP)/include/kadm5/admin.h $(BUILDTOP)/include/kadm5/chpass_util_strings.h \ @@ -69,13 +93,19 @@ $(OUTPRE)plugorder.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \ $(top_srcdir)/include/krb5/authdata_plugin.h $(top_srcdir)/include/krb5/plugin.h \ $(top_srcdir)/include/krb5/pwqual_plugin.h $(top_srcdir)/include/port-sockets.h \ $(top_srcdir)/include/socket-utils.h plugorder.c -$(OUTPRE)t_init_creds.$(OBJEXT): $(BUILDTOP)/include/krb5/krb5.h \ - $(COM_ERR_DEPS) $(top_srcdir)/include/krb5.h t_init_creds.c -$(OUTPRE)t_localauth.$(OBJEXT): $(BUILDTOP)/include/krb5/krb5.h \ - $(COM_ERR_DEPS) $(top_srcdir)/include/krb5.h t_localauth.c $(OUTPRE)responder.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \ $(BUILDTOP)/include/krb5/krb5.h $(COM_ERR_DEPS) $(top_srcdir)/include/k5-json.h \ $(top_srcdir)/include/k5-platform.h $(top_srcdir)/include/k5-thread.h \ $(top_srcdir)/include/krb5.h responder.c $(OUTPRE)s2p.$(OBJEXT): $(BUILDTOP)/include/krb5/krb5.h \ $(COM_ERR_DEPS) $(top_srcdir)/include/krb5.h s2p.c +$(OUTPRE)s4u2proxy.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \ + $(BUILDTOP)/include/krb5/krb5.h $(BUILDTOP)/include/osconf.h \ + $(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) $(top_srcdir)/include/k5-buf.h \ + $(top_srcdir)/include/k5-err.h $(top_srcdir)/include/k5-gmt_mktime.h \ + $(top_srcdir)/include/k5-int-pkinit.h $(top_srcdir)/include/k5-int.h \ + $(top_srcdir)/include/k5-platform.h $(top_srcdir)/include/k5-plugin.h \ + $(top_srcdir)/include/k5-thread.h $(top_srcdir)/include/k5-trace.h \ + $(top_srcdir)/include/krb5.h $(top_srcdir)/include/krb5/authdata_plugin.h \ + $(top_srcdir)/include/krb5/plugin.h $(top_srcdir)/include/port-sockets.h \ + $(top_srcdir)/include/socket-utils.h s4u2proxy.c diff --git a/src/tests/t_init_creds.c b/src/tests/icred.c similarity index 95% rename from src/tests/t_init_creds.c rename to src/tests/icred.c index 6be8340f15..071f91c802 100644 --- a/src/tests/t_init_creds.c +++ b/src/tests/icred.c @@ -1,5 +1,5 @@ /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ -/* tests/t_init_creds.c - test harness for getting initial creds */ +/* tests/icred.c - test harness for getting initial creds */ /* * Copyright (C) 2013 by the Massachusetts Institute of Technology. * All rights reserved. @@ -62,7 +62,7 @@ main(int argc, char **argv) krb5_creds creds; if (argc != 3) { - fprintf(stderr, "Usage: t_init_creds princname password\n"); + fprintf(stderr, "Usage: icred princname password\n"); exit(1); } princstr = argv[1]; diff --git a/src/tests/t_localauth.c b/src/tests/localauth.c similarity index 94% rename from src/tests/t_localauth.c rename to src/tests/localauth.c index 3a65b5b978..a3f7e15c3c 100644 --- a/src/tests/t_localauth.c +++ b/src/tests/localauth.c @@ -1,5 +1,5 @@ /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ -/* tests/t_localauth.c - test harness for kuserok and aname_to_lname */ +/* tests/localauth.c - test harness for kuserok and aname_to_lname */ /* * Copyright (C) 2013 by the Massachusetts Institute of Technology. * All rights reserved. @@ -55,7 +55,7 @@ main(int argc, char **argv) char buf[1024]; if (argc < 2 || argc > 3) { - fprintf(stderr, "Usage: t_localauth principal [localuser]\n"); + fprintf(stderr, "Usage: localauth principal [localuser]\n"); return 1; } check(krb5_init_context(&ctx)); diff --git a/src/tests/t_general.py b/src/tests/t_general.py index c3629e6cf2..fbdeddfc98 100755 --- a/src/tests/t_general.py +++ b/src/tests/t_general.py @@ -29,7 +29,7 @@ for realm in multipass_realms(create_host=False): conf={'plugins': {'pwqual': {'disable': 'empty'}}} realm = K5Realm(create_user=False, create_host=False, krb5_conf=conf) realm.run([kadminl, 'addprinc', '-pw', '', 'user']) -realm.run(['./t_init_creds', 'user', '']) +realm.run(['./icred', 'user', '']) realm.stop() realm = K5Realm(create_host=False) diff --git a/src/tests/t_localauth.py b/src/tests/t_localauth.py index 1d498edf8a..4590485ac5 100755 --- a/src/tests/t_localauth.py +++ b/src/tests/t_localauth.py @@ -9,17 +9,17 @@ conf = {'plugins': {'localauth': { 'disable': 'k5login'}}} realm = K5Realm(create_kdb=False, krb5_conf=conf) def test_an2ln(env, aname, result, msg): - out = realm.run(['./t_localauth', aname], env=env) + out = realm.run(['./localauth', aname], env=env) if out != result + '\n': fail(msg) def test_an2ln_err(env, aname, err, msg): - out = realm.run(['./t_localauth', aname], env=env, expected_code=1) + out = realm.run(['./localauth', aname], env=env, expected_code=1) if err not in out: fail(msg) def test_userok(env, aname, lname, ok, msg): - out = realm.run(['./t_localauth', aname, lname], env=env) + out = realm.run(['./localauth', aname, lname], env=env) if ((ok and out != 'yes\n') or (not ok and out != 'no\n')): fail(msg)