From 20cbbd0b273af56c6d527c8e6b9d96eef49926f2 Mon Sep 17 00:00:00 2001
From: Julien Rische <jrische@redhat.com>
Date: Thu, 31 Mar 2022 18:24:39 +0200
Subject: [PATCH] Use newly enforced dejagnu path naming convention

Since version 1.6.3, dejagnu started to enforce a naming convention that
was already in place, but not mandatory: dejagnu test directories have
to be named "testsuite". If they don't implicit relative sub-paths
resolution (e.g. "lib", "config") is not forking.

This commit renames kadm5 library's unit tests and global tests
directories to match this requirement.

Resolves: rhbz#2053133

Signed-off-by: Julien Rische <jrische@redhat.com>
---
 src/configure.ac                              |   4 +--
 src/lib/kadm5/Makefile.in                     |   2 +-
 .../{unit-test => testsuite}/Makefile.in      |  28 +++++++++---------
 .../api.2/crte-policy.exp                     |   0
 .../api.2/get-policy.exp                      |   0
 .../api.2/mod-policy.exp                      |   0
 .../api.current/chpass-principal-v2.exp       |   0
 .../api.current/chpass-principal.exp          |   0
 .../api.current/crte-policy.exp               |   0
 .../api.current/crte-principal.exp            |   0
 .../api.current/destroy.exp                   |   0
 .../api.current/dlte-policy.exp               |   0
 .../api.current/dlte-principal.exp            |   0
 .../api.current/get-policy.exp                |   0
 .../api.current/get-principal-v2.exp          |   0
 .../api.current/get-principal.exp             |   0
 .../api.current/init-v2.exp                   |   0
 .../api.current/init.exp                      |   0
 .../api.current/mod-policy.exp                |   0
 .../api.current/mod-principal-v2.exp          |   0
 .../api.current/mod-principal.exp             |   0
 .../api.current/randkey-principal-v2.exp      |   0
 .../api.current/randkey-principal.exp         |   0
 .../{unit-test => testsuite}/config/unix.exp  |   0
 src/lib/kadm5/{unit-test => testsuite}/deps   |   0
 .../{unit-test => testsuite}/destroy-test.c   |   0
 .../diff-files/destroy-1                      |   0
 .../diff-files/no-diffs                       |   0
 .../{unit-test => testsuite}/handle-test.c    |   0
 .../{unit-test => testsuite}/init-test.c      |   0
 .../{unit-test => testsuite}/iter-test.c      |   0
 .../kadm5/{unit-test => testsuite}/lib/lib.t  |   2 +-
 .../{unit-test => testsuite}/lock-test.c      |   0
 .../{unit-test => testsuite}/randkey-test.c   |   0
 .../{unit-test => testsuite}/setkey-test.c    |   0
 .../kadm5/{unit-test => testsuite}/site.exp   |   0
 src/tests/Makefile.in                         |   2 +-
 src/tests/t_authdata.py                       |   2 +-
 src/tests/t_certauth.py                       |   2 +-
 src/tests/t_pkinit.py                         |   2 +-
 src/tests/t_proxy.py                          |  12 ++++----
 src/tests/{dejagnu => testsuite}/Makefile.in  |   4 +--
 .../{dejagnu => testsuite}/config/default.exp |   2 +-
 src/tests/{dejagnu => testsuite}/deps         |   0
 .../krb-standalone/gssapi.exp                 |   2 +-
 .../krb-standalone/kprop.exp                  |   0
 .../krb-standalone/princexpire.exp            |   0
 .../krb-standalone/sample.exp                 |   2 +-
 .../krb-standalone/simple.exp                 |   2 +-
 .../krb-standalone/standalone.exp             |   0
 .../krb-standalone/tcp.exp                    |   0
 .../pkinit-certs/ca.pem                       |   0
 .../pkinit-certs/generic.p12                  | Bin
 .../pkinit-certs/generic.pem                  |   0
 .../pkinit-certs/kdc.pem                      |   0
 .../pkinit-certs/make-certs.sh                |   0
 .../pkinit-certs/privkey-enc.pem              |   0
 .../pkinit-certs/privkey.pem                  |   0
 .../pkinit-certs/user-enc.p12                 | Bin
 .../pkinit-certs/user-upn.p12                 | Bin
 .../pkinit-certs/user-upn.pem                 |   0
 .../pkinit-certs/user-upn2.p12                | Bin
 .../pkinit-certs/user-upn2.pem                |   0
 .../pkinit-certs/user-upn3.p12                | Bin
 .../pkinit-certs/user-upn3.pem                |   0
 .../pkinit-certs/user.p12                     | Bin
 .../pkinit-certs/user.pem                     |   0
 .../{dejagnu => testsuite}/proxy-certs/ca.pem |   0
 .../proxy-certs/make-certs.sh                 |   0
 .../proxy-certs/proxy-badsig.pem              |   0
 .../proxy-certs/proxy-ideal.pem               |   0
 .../proxy-certs/proxy-no-match.pem            |   0
 .../proxy-certs/proxy-san.pem                 |   0
 .../proxy-certs/proxy-subject.pem             |   0
 src/tests/{dejagnu => testsuite}/t_inetd.c    |   2 +-
 src/util/k5test.py                            |   2 +-
 76 files changed, 36 insertions(+), 36 deletions(-)
 rename src/lib/kadm5/{unit-test => testsuite}/Makefile.in (86%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.2/crte-policy.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.2/get-policy.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.2/mod-policy.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.current/chpass-principal-v2.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.current/chpass-principal.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.current/crte-policy.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.current/crte-principal.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.current/destroy.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.current/dlte-policy.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.current/dlte-principal.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.current/get-policy.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.current/get-principal-v2.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.current/get-principal.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.current/init-v2.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.current/init.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.current/mod-policy.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.current/mod-principal-v2.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.current/mod-principal.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.current/randkey-principal-v2.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/api.current/randkey-principal.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/config/unix.exp (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/deps (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/destroy-test.c (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/diff-files/destroy-1 (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/diff-files/no-diffs (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/handle-test.c (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/init-test.c (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/iter-test.c (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/lib/lib.t (99%)
 rename src/lib/kadm5/{unit-test => testsuite}/lock-test.c (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/randkey-test.c (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/setkey-test.c (100%)
 rename src/lib/kadm5/{unit-test => testsuite}/site.exp (100%)
 rename src/tests/{dejagnu => testsuite}/Makefile.in (92%)
 rename src/tests/{dejagnu => testsuite}/config/default.exp (99%)
 rename src/tests/{dejagnu => testsuite}/deps (100%)
 rename src/tests/{dejagnu => testsuite}/krb-standalone/gssapi.exp (98%)
 rename src/tests/{dejagnu => testsuite}/krb-standalone/kprop.exp (100%)
 rename src/tests/{dejagnu => testsuite}/krb-standalone/princexpire.exp (100%)
 rename src/tests/{dejagnu => testsuite}/krb-standalone/sample.exp (98%)
 rename src/tests/{dejagnu => testsuite}/krb-standalone/simple.exp (98%)
 rename src/tests/{dejagnu => testsuite}/krb-standalone/standalone.exp (100%)
 rename src/tests/{dejagnu => testsuite}/krb-standalone/tcp.exp (100%)
 rename src/tests/{dejagnu => testsuite}/pkinit-certs/ca.pem (100%)
 rename src/tests/{dejagnu => testsuite}/pkinit-certs/generic.p12 (100%)
 rename src/tests/{dejagnu => testsuite}/pkinit-certs/generic.pem (100%)
 rename src/tests/{dejagnu => testsuite}/pkinit-certs/kdc.pem (100%)
 rename src/tests/{dejagnu => testsuite}/pkinit-certs/make-certs.sh (100%)
 rename src/tests/{dejagnu => testsuite}/pkinit-certs/privkey-enc.pem (100%)
 rename src/tests/{dejagnu => testsuite}/pkinit-certs/privkey.pem (100%)
 rename src/tests/{dejagnu => testsuite}/pkinit-certs/user-enc.p12 (100%)
 rename src/tests/{dejagnu => testsuite}/pkinit-certs/user-upn.p12 (100%)
 rename src/tests/{dejagnu => testsuite}/pkinit-certs/user-upn.pem (100%)
 rename src/tests/{dejagnu => testsuite}/pkinit-certs/user-upn2.p12 (100%)
 rename src/tests/{dejagnu => testsuite}/pkinit-certs/user-upn2.pem (100%)
 rename src/tests/{dejagnu => testsuite}/pkinit-certs/user-upn3.p12 (100%)
 rename src/tests/{dejagnu => testsuite}/pkinit-certs/user-upn3.pem (100%)
 rename src/tests/{dejagnu => testsuite}/pkinit-certs/user.p12 (100%)
 rename src/tests/{dejagnu => testsuite}/pkinit-certs/user.pem (100%)
 rename src/tests/{dejagnu => testsuite}/proxy-certs/ca.pem (100%)
 rename src/tests/{dejagnu => testsuite}/proxy-certs/make-certs.sh (100%)
 rename src/tests/{dejagnu => testsuite}/proxy-certs/proxy-badsig.pem (100%)
 rename src/tests/{dejagnu => testsuite}/proxy-certs/proxy-ideal.pem (100%)
 rename src/tests/{dejagnu => testsuite}/proxy-certs/proxy-no-match.pem (100%)
 rename src/tests/{dejagnu => testsuite}/proxy-certs/proxy-san.pem (100%)
 rename src/tests/{dejagnu => testsuite}/proxy-certs/proxy-subject.pem (100%)
 rename src/tests/{dejagnu => testsuite}/t_inetd.c (99%)

diff --git a/src/configure.ac b/src/configure.ac
index 20066918b..363d5d62d 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -1500,7 +1500,7 @@ V5_AC_OUTPUT_MAKEFILE(.
 
 	lib/rpc lib/rpc/unit-test
 
-	lib/kadm5 lib/kadm5/clnt lib/kadm5/srv lib/kadm5/unit-test
+	lib/kadm5 lib/kadm5/clnt lib/kadm5/srv lib/kadm5/testsuite
 	lib/krad
 	lib/apputils
 
@@ -1544,5 +1544,5 @@ V5_AC_OUTPUT_MAKEFILE(.
 	appl/gss-sample appl/user_user
 
 	tests tests/asn.1 tests/create tests/hammer tests/verify tests/gssapi
-	tests/dejagnu tests/threads tests/shlib tests/gss-threads tests/misc
+	tests/testsuite tests/threads tests/shlib tests/gss-threads tests/misc
 )
diff --git a/src/lib/kadm5/Makefile.in b/src/lib/kadm5/Makefile.in
index c4eaad38d..76fc4b548 100644
--- a/src/lib/kadm5/Makefile.in
+++ b/src/lib/kadm5/Makefile.in
@@ -1,6 +1,6 @@
 mydir=lib$(S)kadm5
 BUILDTOP=$(REL)..$(S)..
-SUBDIRS = clnt srv unit-test
+SUBDIRS = clnt srv testsuite
 
 ##DOSBUILDTOP = ..\..
 
diff --git a/src/lib/kadm5/unit-test/Makefile.in b/src/lib/kadm5/testsuite/Makefile.in
similarity index 86%
rename from src/lib/kadm5/unit-test/Makefile.in
rename to src/lib/kadm5/testsuite/Makefile.in
index 68fa097ff..5a55b786b 100644
--- a/src/lib/kadm5/unit-test/Makefile.in
+++ b/src/lib/kadm5/testsuite/Makefile.in
@@ -1,4 +1,4 @@
-mydir=lib$(S)kadm5$(S)unit-test
+mydir=lib$(S)kadm5$(S)testsuite
 BUILDTOP=$(REL)..$(S)..$(S)..
 KDB_DEP_LIB=$(DL_LIB) $(THREAD_LINKOPTS)
 
@@ -61,7 +61,7 @@ runenv.exp: Makefile
 		eval echo "set env\($$i\) \$$$$i"; done > runenv.exp
 
 #
-# The unit-test targets
+# The testsuite targets
 #
 
 check: check-@DO_TEST@
@@ -72,13 +72,13 @@ check-:
 	@echo "+++ Either tcl, runtest, or Perl is unavailable."
 	@echo "+++"
 
-check-ok unit-test: unit-test-client unit-test-server
+check-ok testsuite: testsuite-client testsuite-server
 
-unit-test-client: unit-test-client-setup unit-test-client-body \
-	unit-test-client-cleanup
+testsuite-client: testsuite-client-setup testsuite-client-body \
+	testsuite-client-cleanup
 
-unit-test-server: unit-test-server-setup unit-test-server-body \
-	unit-test-server-cleanup
+testsuite-server: testsuite-server-setup testsuite-server-body \
+	testsuite-server-cleanup
 
 test-randkey: randkey-test
 	$(ENV_SETUP) $(VALGRIND) ./randkey-test
@@ -98,19 +98,19 @@ test-destroy: destroy-test
 test-setkey-client: client-setkey-test
 	$(ENV_SETUP) $(VALGRIND) ./client-setkey-test testkeys admin admin
 
-unit-test-client-setup: runenv.sh
+testsuite-client-setup: runenv.sh
 	$(ENV_SETUP) $(VALGRIND) $(START_SERVERS)
 
-unit-test-client-cleanup:
+testsuite-client-cleanup:
 	$(ENV_SETUP) $(STOP_SERVERS)
 
-unit-test-server-setup: runenv.sh
+testsuite-server-setup: runenv.sh
 	$(ENV_SETUP) $(VALGRIND) $(START_SERVERS_LOCAL)
 
-unit-test-server-cleanup:
+testsuite-server-cleanup:
 	$(ENV_SETUP) $(STOP_SERVERS_LOCAL)
 
-unit-test-client-body: site.exp test-noauth test-destroy test-handle-client \
+testsuite-client-body: site.exp test-noauth test-destroy test-handle-client \
 	test-setkey-client runenv.exp
 	$(ENV_SETUP) $(RUNTEST) --tool api RPC=1 API=$(CLNTTCL) \
 		KINIT=$(BUILDTOP)/clients/kinit/kinit \
@@ -121,7 +121,7 @@ unit-test-client-body: site.exp test-noauth test-destroy test-handle-client \
 	-mv api.log capi.log
 	-mv api.sum capi.sum
 
-unit-test-server-body: site.exp test-handle-server lock-test 
+testsuite-server-body: site.exp test-handle-server lock-test 
 	$(ENV_SETUP) $(RUNTEST) --tool api RPC=0 API=$(SRVTCL) \
 		LOCKTEST=./lock-test \
 		KADMIN_LOCAL=$(BUILDTOP)/kadmin/cli/kadmin.local \
@@ -140,4 +140,4 @@ clean:
 	$(RM) lock-test lock-test.o
 	$(RM) server-iter-test iter-test.o
 	$(RM) server-setkey-test client-setkey-test setkey-test.o
-	$(RM) *.log *.plog *.sum *.psum unit-test-log.* runenv.exp
+	$(RM) *.log *.plog *.sum *.psum testsuite-log.* runenv.exp
diff --git a/src/lib/kadm5/unit-test/api.2/crte-policy.exp b/src/lib/kadm5/testsuite/api.2/crte-policy.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.2/crte-policy.exp
rename to src/lib/kadm5/testsuite/api.2/crte-policy.exp
diff --git a/src/lib/kadm5/unit-test/api.2/get-policy.exp b/src/lib/kadm5/testsuite/api.2/get-policy.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.2/get-policy.exp
rename to src/lib/kadm5/testsuite/api.2/get-policy.exp
diff --git a/src/lib/kadm5/unit-test/api.2/mod-policy.exp b/src/lib/kadm5/testsuite/api.2/mod-policy.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.2/mod-policy.exp
rename to src/lib/kadm5/testsuite/api.2/mod-policy.exp
diff --git a/src/lib/kadm5/unit-test/api.current/chpass-principal-v2.exp b/src/lib/kadm5/testsuite/api.current/chpass-principal-v2.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.current/chpass-principal-v2.exp
rename to src/lib/kadm5/testsuite/api.current/chpass-principal-v2.exp
diff --git a/src/lib/kadm5/unit-test/api.current/chpass-principal.exp b/src/lib/kadm5/testsuite/api.current/chpass-principal.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.current/chpass-principal.exp
rename to src/lib/kadm5/testsuite/api.current/chpass-principal.exp
diff --git a/src/lib/kadm5/unit-test/api.current/crte-policy.exp b/src/lib/kadm5/testsuite/api.current/crte-policy.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.current/crte-policy.exp
rename to src/lib/kadm5/testsuite/api.current/crte-policy.exp
diff --git a/src/lib/kadm5/unit-test/api.current/crte-principal.exp b/src/lib/kadm5/testsuite/api.current/crte-principal.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.current/crte-principal.exp
rename to src/lib/kadm5/testsuite/api.current/crte-principal.exp
diff --git a/src/lib/kadm5/unit-test/api.current/destroy.exp b/src/lib/kadm5/testsuite/api.current/destroy.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.current/destroy.exp
rename to src/lib/kadm5/testsuite/api.current/destroy.exp
diff --git a/src/lib/kadm5/unit-test/api.current/dlte-policy.exp b/src/lib/kadm5/testsuite/api.current/dlte-policy.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.current/dlte-policy.exp
rename to src/lib/kadm5/testsuite/api.current/dlte-policy.exp
diff --git a/src/lib/kadm5/unit-test/api.current/dlte-principal.exp b/src/lib/kadm5/testsuite/api.current/dlte-principal.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.current/dlte-principal.exp
rename to src/lib/kadm5/testsuite/api.current/dlte-principal.exp
diff --git a/src/lib/kadm5/unit-test/api.current/get-policy.exp b/src/lib/kadm5/testsuite/api.current/get-policy.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.current/get-policy.exp
rename to src/lib/kadm5/testsuite/api.current/get-policy.exp
diff --git a/src/lib/kadm5/unit-test/api.current/get-principal-v2.exp b/src/lib/kadm5/testsuite/api.current/get-principal-v2.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.current/get-principal-v2.exp
rename to src/lib/kadm5/testsuite/api.current/get-principal-v2.exp
diff --git a/src/lib/kadm5/unit-test/api.current/get-principal.exp b/src/lib/kadm5/testsuite/api.current/get-principal.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.current/get-principal.exp
rename to src/lib/kadm5/testsuite/api.current/get-principal.exp
diff --git a/src/lib/kadm5/unit-test/api.current/init-v2.exp b/src/lib/kadm5/testsuite/api.current/init-v2.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.current/init-v2.exp
rename to src/lib/kadm5/testsuite/api.current/init-v2.exp
diff --git a/src/lib/kadm5/unit-test/api.current/init.exp b/src/lib/kadm5/testsuite/api.current/init.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.current/init.exp
rename to src/lib/kadm5/testsuite/api.current/init.exp
diff --git a/src/lib/kadm5/unit-test/api.current/mod-policy.exp b/src/lib/kadm5/testsuite/api.current/mod-policy.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.current/mod-policy.exp
rename to src/lib/kadm5/testsuite/api.current/mod-policy.exp
diff --git a/src/lib/kadm5/unit-test/api.current/mod-principal-v2.exp b/src/lib/kadm5/testsuite/api.current/mod-principal-v2.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.current/mod-principal-v2.exp
rename to src/lib/kadm5/testsuite/api.current/mod-principal-v2.exp
diff --git a/src/lib/kadm5/unit-test/api.current/mod-principal.exp b/src/lib/kadm5/testsuite/api.current/mod-principal.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.current/mod-principal.exp
rename to src/lib/kadm5/testsuite/api.current/mod-principal.exp
diff --git a/src/lib/kadm5/unit-test/api.current/randkey-principal-v2.exp b/src/lib/kadm5/testsuite/api.current/randkey-principal-v2.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.current/randkey-principal-v2.exp
rename to src/lib/kadm5/testsuite/api.current/randkey-principal-v2.exp
diff --git a/src/lib/kadm5/unit-test/api.current/randkey-principal.exp b/src/lib/kadm5/testsuite/api.current/randkey-principal.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/api.current/randkey-principal.exp
rename to src/lib/kadm5/testsuite/api.current/randkey-principal.exp
diff --git a/src/lib/kadm5/unit-test/config/unix.exp b/src/lib/kadm5/testsuite/config/unix.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/config/unix.exp
rename to src/lib/kadm5/testsuite/config/unix.exp
diff --git a/src/lib/kadm5/unit-test/deps b/src/lib/kadm5/testsuite/deps
similarity index 100%
rename from src/lib/kadm5/unit-test/deps
rename to src/lib/kadm5/testsuite/deps
diff --git a/src/lib/kadm5/unit-test/destroy-test.c b/src/lib/kadm5/testsuite/destroy-test.c
similarity index 100%
rename from src/lib/kadm5/unit-test/destroy-test.c
rename to src/lib/kadm5/testsuite/destroy-test.c
diff --git a/src/lib/kadm5/unit-test/diff-files/destroy-1 b/src/lib/kadm5/testsuite/diff-files/destroy-1
similarity index 100%
rename from src/lib/kadm5/unit-test/diff-files/destroy-1
rename to src/lib/kadm5/testsuite/diff-files/destroy-1
diff --git a/src/lib/kadm5/unit-test/diff-files/no-diffs b/src/lib/kadm5/testsuite/diff-files/no-diffs
similarity index 100%
rename from src/lib/kadm5/unit-test/diff-files/no-diffs
rename to src/lib/kadm5/testsuite/diff-files/no-diffs
diff --git a/src/lib/kadm5/unit-test/handle-test.c b/src/lib/kadm5/testsuite/handle-test.c
similarity index 100%
rename from src/lib/kadm5/unit-test/handle-test.c
rename to src/lib/kadm5/testsuite/handle-test.c
diff --git a/src/lib/kadm5/unit-test/init-test.c b/src/lib/kadm5/testsuite/init-test.c
similarity index 100%
rename from src/lib/kadm5/unit-test/init-test.c
rename to src/lib/kadm5/testsuite/init-test.c
diff --git a/src/lib/kadm5/unit-test/iter-test.c b/src/lib/kadm5/testsuite/iter-test.c
similarity index 100%
rename from src/lib/kadm5/unit-test/iter-test.c
rename to src/lib/kadm5/testsuite/iter-test.c
diff --git a/src/lib/kadm5/unit-test/lib/lib.t b/src/lib/kadm5/testsuite/lib/lib.t
similarity index 99%
rename from src/lib/kadm5/unit-test/lib/lib.t
rename to src/lib/kadm5/testsuite/lib/lib.t
index 3444775cf..327946849 100644
--- a/src/lib/kadm5/unit-test/lib/lib.t
+++ b/src/lib/kadm5/testsuite/lib/lib.t
@@ -226,7 +226,7 @@ proc end_dump_compare {name} {
     global  RPC
 
     if { ! $RPC } { 
-#	set file $TOP/admin/lib/unit-test/diff-files/$name
+#	set file $TOP/admin/lib/testsuite/diff-files/$name
 #	exec $env(SIMPLE_DUMP) > /tmp/dump.after
 #	exec $env(COMPARE_DUMP) /tmp/dump.before /tmp/dump.after $file
     }
diff --git a/src/lib/kadm5/unit-test/lock-test.c b/src/lib/kadm5/testsuite/lock-test.c
similarity index 100%
rename from src/lib/kadm5/unit-test/lock-test.c
rename to src/lib/kadm5/testsuite/lock-test.c
diff --git a/src/lib/kadm5/unit-test/randkey-test.c b/src/lib/kadm5/testsuite/randkey-test.c
similarity index 100%
rename from src/lib/kadm5/unit-test/randkey-test.c
rename to src/lib/kadm5/testsuite/randkey-test.c
diff --git a/src/lib/kadm5/unit-test/setkey-test.c b/src/lib/kadm5/testsuite/setkey-test.c
similarity index 100%
rename from src/lib/kadm5/unit-test/setkey-test.c
rename to src/lib/kadm5/testsuite/setkey-test.c
diff --git a/src/lib/kadm5/unit-test/site.exp b/src/lib/kadm5/testsuite/site.exp
similarity index 100%
rename from src/lib/kadm5/unit-test/site.exp
rename to src/lib/kadm5/testsuite/site.exp
diff --git a/src/tests/Makefile.in b/src/tests/Makefile.in
index 20f27d748..1198dca0c 100644
--- a/src/tests/Makefile.in
+++ b/src/tests/Makefile.in
@@ -1,6 +1,6 @@
 mydir=tests
 BUILDTOP=$(REL)..
-SUBDIRS = asn.1 create hammer verify gssapi dejagnu shlib gss-threads misc \
+SUBDIRS = asn.1 create hammer verify gssapi testsuite shlib gss-threads misc \
 	threads softpkcs11
 
 RUN_DB_TEST = $(RUN_SETUP) KRB5_KDC_PROFILE=kdc.conf KRB5_CONFIG=krb5.conf \
diff --git a/src/tests/t_authdata.py b/src/tests/t_authdata.py
index 2e01f46bc..e5135f435 100644
--- a/src/tests/t_authdata.py
+++ b/src/tests/t_authdata.py
@@ -57,7 +57,7 @@ if not os.path.exists(os.path.join(plugins, 'preauth', 'pkinit.so')):
     skipped('anonymous ticket authdata tests', 'PKINIT not built')
 else:
     # Set up a realm with PKINIT support and get anonymous tickets.
-    certs = os.path.join(srctop, 'tests', 'dejagnu', 'pkinit-certs')
+    certs = os.path.join(srctop, 'tests', 'testsuite', 'pkinit-certs')
     ca_pem = os.path.join(certs, 'ca.pem')
     kdc_pem = os.path.join(certs, 'kdc.pem')
     privkey_pem = os.path.join(certs, 'privkey.pem')
diff --git a/src/tests/t_certauth.py b/src/tests/t_certauth.py
index 0fe0fdb4a..bfa5bfc96 100644
--- a/src/tests/t_certauth.py
+++ b/src/tests/t_certauth.py
@@ -4,7 +4,7 @@ from k5test import *
 if not os.path.exists(os.path.join(plugins, 'preauth', 'pkinit.so')):
     skip_rest('certauth tests', 'PKINIT module not built')
 
-certs = os.path.join(srctop, 'tests', 'dejagnu', 'pkinit-certs')
+certs = os.path.join(srctop, 'tests', 'testsuite', 'pkinit-certs')
 ca_pem = os.path.join(certs, 'ca.pem')
 kdc_pem = os.path.join(certs, 'kdc.pem')
 privkey_pem = os.path.join(certs, 'privkey.pem')
diff --git a/src/tests/t_pkinit.py b/src/tests/t_pkinit.py
index aee4da2b1..8763ce484 100755
--- a/src/tests/t_pkinit.py
+++ b/src/tests/t_pkinit.py
@@ -7,7 +7,7 @@ if not os.path.exists(os.path.join(plugins, 'preauth', 'pkinit.so')):
 soft_pkcs11 = os.path.join(buildtop, 'tests', 'softpkcs11', 'softpkcs11.so')
 
 # Construct a krb5.conf fragment configuring pkinit.
-certs = os.path.join(srctop, 'tests', 'dejagnu', 'pkinit-certs')
+certs = os.path.join(srctop, 'tests', 'testsuite', 'pkinit-certs')
 ca_pem = os.path.join(certs, 'ca.pem')
 kdc_pem = os.path.join(certs, 'kdc.pem')
 user_pem = os.path.join(certs, 'user.pem')
diff --git a/src/tests/t_proxy.py b/src/tests/t_proxy.py
index 3069eaa8f..6ae5c8c8e 100755
--- a/src/tests/t_proxy.py
+++ b/src/tests/t_proxy.py
@@ -10,17 +10,17 @@ except:
 
 # Construct a krb5.conf fragment configuring the client to use a local proxy
 # server.
-proxysubjectpem = os.path.join(srctop, 'tests', 'dejagnu', 'proxy-certs',
+proxysubjectpem = os.path.join(srctop, 'tests', 'testsuite', 'proxy-certs',
                                'proxy-subject.pem')
-proxysanpem = os.path.join(srctop, 'tests', 'dejagnu', 'proxy-certs',
+proxysanpem = os.path.join(srctop, 'tests', 'testsuite', 'proxy-certs',
                            'proxy-san.pem')
-proxyidealpem = os.path.join(srctop, 'tests', 'dejagnu', 'proxy-certs',
+proxyidealpem = os.path.join(srctop, 'tests', 'testsuite', 'proxy-certs',
                              'proxy-ideal.pem')
-proxywrongpem = os.path.join(srctop, 'tests', 'dejagnu', 'proxy-certs',
+proxywrongpem = os.path.join(srctop, 'tests', 'testsuite', 'proxy-certs',
                              'proxy-no-match.pem')
-proxybadpem = os.path.join(srctop, 'tests', 'dejagnu', 'proxy-certs',
+proxybadpem = os.path.join(srctop, 'tests', 'testsuite', 'proxy-certs',
                            'proxy-badsig.pem')
-proxyca = os.path.join(srctop, 'tests', 'dejagnu', 'proxy-certs', 'ca.pem')
+proxyca = os.path.join(srctop, 'tests', 'testsuite', 'proxy-certs', 'ca.pem')
 proxyurl = 'https://localhost:$port5/KdcProxy'
 proxyurlupcase = 'https://LocalHost:$port5/KdcProxy'
 proxyurl4 = 'https://127.0.0.1:$port5/KdcProxy'
diff --git a/src/tests/dejagnu/Makefile.in b/src/tests/testsuite/Makefile.in
similarity index 92%
rename from src/tests/dejagnu/Makefile.in
rename to src/tests/testsuite/Makefile.in
index e78e270ed..d3efe3606 100644
--- a/src/tests/dejagnu/Makefile.in
+++ b/src/tests/testsuite/Makefile.in
@@ -1,4 +1,4 @@
-mydir=tests$(S)dejagnu
+mydir=tests$(S)testsuite
 BUILDTOP=$(REL)..$(S)..
 RUNTEST = @RUNTEST@ $(DEJAFLAGS)
 RUNTESTFLAGS =
@@ -13,7 +13,7 @@ check: check-runtest-@HAVE_RUNTEST@
 
 check-runtest-no:
 	@echo "+++"
-	@echo "+++ WARNING: tests/dejagnu tests not run."
+	@echo "+++ WARNING: tests/testsuite tests not run."
 	@echo "+++ runtest is unavailable."
 	@echo "+++"
 	@echo 'Skipped dejagnu tests: runtest not found' >> $(SKIPTESTS)
diff --git a/src/tests/dejagnu/config/default.exp b/src/tests/testsuite/config/default.exp
similarity index 99%
rename from src/tests/dejagnu/config/default.exp
rename to src/tests/testsuite/config/default.exp
index 302dee74c..1492fac32 100644
--- a/src/tests/dejagnu/config/default.exp
+++ b/src/tests/testsuite/config/default.exp
@@ -256,7 +256,7 @@ verbose "Test realm is $REALMNAME"
 
 # Find some programs we need.  We use the binaries from the build tree
 # if they exist.  If they do not, then they must be in PATH.  We
-# expect $objdir to be ...tests/dejagnu.
+# expect $objdir to be ...tests/testsuite.
 
 foreach i {
     {KDB5_UTIL $objdir/../../kadmin/dbutil/kdb5_util}
diff --git a/src/tests/dejagnu/deps b/src/tests/testsuite/deps
similarity index 100%
rename from src/tests/dejagnu/deps
rename to src/tests/testsuite/deps
diff --git a/src/tests/dejagnu/krb-standalone/gssapi.exp b/src/tests/testsuite/krb-standalone/gssapi.exp
similarity index 98%
rename from src/tests/dejagnu/krb-standalone/gssapi.exp
rename to src/tests/testsuite/krb-standalone/gssapi.exp
index e3357e769..d176e210c 100644
--- a/src/tests/dejagnu/krb-standalone/gssapi.exp
+++ b/src/tests/testsuite/krb-standalone/gssapi.exp
@@ -2,7 +2,7 @@
 # This is a DejaGnu test script.
 # This script tests that the GSS-API tester functions correctly.
 
-# This mostly just calls procedures in test/dejagnu/config/default.exp.
+# This mostly just calls procedures in test/testsuite/config/default.exp.
 
 if ![info exists KDESTROY] {
     set KDESTROY [findfile $objdir/../../clients/kdestroy/kdestroy]
diff --git a/src/tests/dejagnu/krb-standalone/kprop.exp b/src/tests/testsuite/krb-standalone/kprop.exp
similarity index 100%
rename from src/tests/dejagnu/krb-standalone/kprop.exp
rename to src/tests/testsuite/krb-standalone/kprop.exp
diff --git a/src/tests/dejagnu/krb-standalone/princexpire.exp b/src/tests/testsuite/krb-standalone/princexpire.exp
similarity index 100%
rename from src/tests/dejagnu/krb-standalone/princexpire.exp
rename to src/tests/testsuite/krb-standalone/princexpire.exp
diff --git a/src/tests/dejagnu/krb-standalone/sample.exp b/src/tests/testsuite/krb-standalone/sample.exp
similarity index 98%
rename from src/tests/dejagnu/krb-standalone/sample.exp
rename to src/tests/testsuite/krb-standalone/sample.exp
index 93a75f1d0..009de5ddb 100644
--- a/src/tests/dejagnu/krb-standalone/sample.exp
+++ b/src/tests/testsuite/krb-standalone/sample.exp
@@ -2,7 +2,7 @@
 # This is a DejaGnu test script.
 # This script tests that sample user-user communication works.
 
-# This mostly just calls procedures in test/dejagnu/config/default.exp.
+# This mostly just calls procedures in test/testsuite/config/default.exp.
 
 if ![info exists KLIST] {
     set KLIST [findfile $objdir/../../clients/klist/klist]
diff --git a/src/tests/dejagnu/krb-standalone/simple.exp b/src/tests/testsuite/krb-standalone/simple.exp
similarity index 98%
rename from src/tests/dejagnu/krb-standalone/simple.exp
rename to src/tests/testsuite/krb-standalone/simple.exp
index d8b218248..92b33066e 100644
--- a/src/tests/dejagnu/krb-standalone/simple.exp
+++ b/src/tests/testsuite/krb-standalone/simple.exp
@@ -2,7 +2,7 @@
 # This is a DejaGnu test script.
 # This script tests that krb-safe and krb-priv messages work.
 
-# This mostly just calls procedures in test/dejagnu/config/default.exp.
+# This mostly just calls procedures in test/testsuite/config/default.exp.
 
 if ![info exists KLIST] {
     set KLIST [findfile $objdir/../../clients/klist/klist]
diff --git a/src/tests/dejagnu/krb-standalone/standalone.exp b/src/tests/testsuite/krb-standalone/standalone.exp
similarity index 100%
rename from src/tests/dejagnu/krb-standalone/standalone.exp
rename to src/tests/testsuite/krb-standalone/standalone.exp
diff --git a/src/tests/dejagnu/krb-standalone/tcp.exp b/src/tests/testsuite/krb-standalone/tcp.exp
similarity index 100%
rename from src/tests/dejagnu/krb-standalone/tcp.exp
rename to src/tests/testsuite/krb-standalone/tcp.exp
diff --git a/src/tests/dejagnu/pkinit-certs/ca.pem b/src/tests/testsuite/pkinit-certs/ca.pem
similarity index 100%
rename from src/tests/dejagnu/pkinit-certs/ca.pem
rename to src/tests/testsuite/pkinit-certs/ca.pem
diff --git a/src/tests/dejagnu/pkinit-certs/generic.p12 b/src/tests/testsuite/pkinit-certs/generic.p12
similarity index 100%
rename from src/tests/dejagnu/pkinit-certs/generic.p12
rename to src/tests/testsuite/pkinit-certs/generic.p12
diff --git a/src/tests/dejagnu/pkinit-certs/generic.pem b/src/tests/testsuite/pkinit-certs/generic.pem
similarity index 100%
rename from src/tests/dejagnu/pkinit-certs/generic.pem
rename to src/tests/testsuite/pkinit-certs/generic.pem
diff --git a/src/tests/dejagnu/pkinit-certs/kdc.pem b/src/tests/testsuite/pkinit-certs/kdc.pem
similarity index 100%
rename from src/tests/dejagnu/pkinit-certs/kdc.pem
rename to src/tests/testsuite/pkinit-certs/kdc.pem
diff --git a/src/tests/dejagnu/pkinit-certs/make-certs.sh b/src/tests/testsuite/pkinit-certs/make-certs.sh
similarity index 100%
rename from src/tests/dejagnu/pkinit-certs/make-certs.sh
rename to src/tests/testsuite/pkinit-certs/make-certs.sh
diff --git a/src/tests/dejagnu/pkinit-certs/privkey-enc.pem b/src/tests/testsuite/pkinit-certs/privkey-enc.pem
similarity index 100%
rename from src/tests/dejagnu/pkinit-certs/privkey-enc.pem
rename to src/tests/testsuite/pkinit-certs/privkey-enc.pem
diff --git a/src/tests/dejagnu/pkinit-certs/privkey.pem b/src/tests/testsuite/pkinit-certs/privkey.pem
similarity index 100%
rename from src/tests/dejagnu/pkinit-certs/privkey.pem
rename to src/tests/testsuite/pkinit-certs/privkey.pem
diff --git a/src/tests/dejagnu/pkinit-certs/user-enc.p12 b/src/tests/testsuite/pkinit-certs/user-enc.p12
similarity index 100%
rename from src/tests/dejagnu/pkinit-certs/user-enc.p12
rename to src/tests/testsuite/pkinit-certs/user-enc.p12
diff --git a/src/tests/dejagnu/pkinit-certs/user-upn.p12 b/src/tests/testsuite/pkinit-certs/user-upn.p12
similarity index 100%
rename from src/tests/dejagnu/pkinit-certs/user-upn.p12
rename to src/tests/testsuite/pkinit-certs/user-upn.p12
diff --git a/src/tests/dejagnu/pkinit-certs/user-upn.pem b/src/tests/testsuite/pkinit-certs/user-upn.pem
similarity index 100%
rename from src/tests/dejagnu/pkinit-certs/user-upn.pem
rename to src/tests/testsuite/pkinit-certs/user-upn.pem
diff --git a/src/tests/dejagnu/pkinit-certs/user-upn2.p12 b/src/tests/testsuite/pkinit-certs/user-upn2.p12
similarity index 100%
rename from src/tests/dejagnu/pkinit-certs/user-upn2.p12
rename to src/tests/testsuite/pkinit-certs/user-upn2.p12
diff --git a/src/tests/dejagnu/pkinit-certs/user-upn2.pem b/src/tests/testsuite/pkinit-certs/user-upn2.pem
similarity index 100%
rename from src/tests/dejagnu/pkinit-certs/user-upn2.pem
rename to src/tests/testsuite/pkinit-certs/user-upn2.pem
diff --git a/src/tests/dejagnu/pkinit-certs/user-upn3.p12 b/src/tests/testsuite/pkinit-certs/user-upn3.p12
similarity index 100%
rename from src/tests/dejagnu/pkinit-certs/user-upn3.p12
rename to src/tests/testsuite/pkinit-certs/user-upn3.p12
diff --git a/src/tests/dejagnu/pkinit-certs/user-upn3.pem b/src/tests/testsuite/pkinit-certs/user-upn3.pem
similarity index 100%
rename from src/tests/dejagnu/pkinit-certs/user-upn3.pem
rename to src/tests/testsuite/pkinit-certs/user-upn3.pem
diff --git a/src/tests/dejagnu/pkinit-certs/user.p12 b/src/tests/testsuite/pkinit-certs/user.p12
similarity index 100%
rename from src/tests/dejagnu/pkinit-certs/user.p12
rename to src/tests/testsuite/pkinit-certs/user.p12
diff --git a/src/tests/dejagnu/pkinit-certs/user.pem b/src/tests/testsuite/pkinit-certs/user.pem
similarity index 100%
rename from src/tests/dejagnu/pkinit-certs/user.pem
rename to src/tests/testsuite/pkinit-certs/user.pem
diff --git a/src/tests/dejagnu/proxy-certs/ca.pem b/src/tests/testsuite/proxy-certs/ca.pem
similarity index 100%
rename from src/tests/dejagnu/proxy-certs/ca.pem
rename to src/tests/testsuite/proxy-certs/ca.pem
diff --git a/src/tests/dejagnu/proxy-certs/make-certs.sh b/src/tests/testsuite/proxy-certs/make-certs.sh
similarity index 100%
rename from src/tests/dejagnu/proxy-certs/make-certs.sh
rename to src/tests/testsuite/proxy-certs/make-certs.sh
diff --git a/src/tests/dejagnu/proxy-certs/proxy-badsig.pem b/src/tests/testsuite/proxy-certs/proxy-badsig.pem
similarity index 100%
rename from src/tests/dejagnu/proxy-certs/proxy-badsig.pem
rename to src/tests/testsuite/proxy-certs/proxy-badsig.pem
diff --git a/src/tests/dejagnu/proxy-certs/proxy-ideal.pem b/src/tests/testsuite/proxy-certs/proxy-ideal.pem
similarity index 100%
rename from src/tests/dejagnu/proxy-certs/proxy-ideal.pem
rename to src/tests/testsuite/proxy-certs/proxy-ideal.pem
diff --git a/src/tests/dejagnu/proxy-certs/proxy-no-match.pem b/src/tests/testsuite/proxy-certs/proxy-no-match.pem
similarity index 100%
rename from src/tests/dejagnu/proxy-certs/proxy-no-match.pem
rename to src/tests/testsuite/proxy-certs/proxy-no-match.pem
diff --git a/src/tests/dejagnu/proxy-certs/proxy-san.pem b/src/tests/testsuite/proxy-certs/proxy-san.pem
similarity index 100%
rename from src/tests/dejagnu/proxy-certs/proxy-san.pem
rename to src/tests/testsuite/proxy-certs/proxy-san.pem
diff --git a/src/tests/dejagnu/proxy-certs/proxy-subject.pem b/src/tests/testsuite/proxy-certs/proxy-subject.pem
similarity index 100%
rename from src/tests/dejagnu/proxy-certs/proxy-subject.pem
rename to src/tests/testsuite/proxy-certs/proxy-subject.pem
diff --git a/src/tests/dejagnu/t_inetd.c b/src/tests/testsuite/t_inetd.c
similarity index 99%
rename from src/tests/dejagnu/t_inetd.c
rename to src/tests/testsuite/t_inetd.c
index abcde50fa..2bad2cf65 100644
--- a/src/tests/dejagnu/t_inetd.c
+++ b/src/tests/testsuite/t_inetd.c
@@ -1,5 +1,5 @@
 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* tests/dejagnu/t_inetd.c */
+/* tests/testsuite/t_inetd.c */
 /*
  * Copyright 1991 by the Massachusetts Institute of Technology.
  * All Rights Reserved.
diff --git a/src/util/k5test.py b/src/util/k5test.py
index 251d11a9d..908a1495c 100644
--- a/src/util/k5test.py
+++ b/src/util/k5test.py
@@ -1383,7 +1383,7 @@ kswitch = os.path.join(buildtop, 'clients', 'kswitch', 'kswitch')
 kvno = os.path.join(buildtop, 'clients', 'kvno', 'kvno')
 kdestroy = os.path.join(buildtop, 'clients', 'kdestroy', 'kdestroy')
 kpasswd = os.path.join(buildtop, 'clients', 'kpasswd', 'kpasswd')
-t_inetd = os.path.join(buildtop, 'tests', 'dejagnu', 't_inetd')
+t_inetd = os.path.join(buildtop, 'tests', 'testsuite', 't_inetd')
 kproplog = os.path.join(buildtop, 'kprop', 'kproplog')
 kpropd = os.path.join(buildtop, 'kprop', 'kpropd')
 kprop = os.path.join(buildtop, 'kprop', 'kprop')
-- 
2.35.1

