From: Greg Hudson Date: Sun, 28 Feb 2010 20:32:00 +0000 (+0000) Subject: Remove some more test suite cruft: X-Git-Tag: krb5-1.9-beta1~328 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9f79427d9b3793dff35e2c787e7b27f4d62e50f5;p=krb5.git Remove some more test suite cruft: * localhostname from get_hostname was unused. * database_name is no longer used except (misleadingly) in kdb5_util output. * admin_database_name and admin_database_lockfile are no longer used. * default_domain is only used for v4->v5 principal conversion, which isn't tested. * libkadm5's init-v2.exp had a copy of get_hostname; domain and localhostname from it were unused. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23759 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kadm5/unit-test/api.current/init-v2.exp b/src/lib/kadm5/unit-test/api.current/init-v2.exp index 656f146cb..a364b9c14 100644 --- a/src/lib/kadm5/unit-test/api.current/init-v2.exp +++ b/src/lib/kadm5/unit-test/api.current/init-v2.exp @@ -9,10 +9,8 @@ if ![info exists RESOLVE] { proc get_hostname { } { global RESOLVE global hostname - global localhostname - global domain - if {[info exists hostname] && [info exists localhostname]} { + if {[info exists hostname]} { return 1 } @@ -30,12 +28,9 @@ proc get_hostname { } { } close $file catch "exec rm -f myname" exec_output - regexp "^(\[^.\]*)\.(.*)$" $hostname foo localhostname domain set hostname [string tolower $hostname] - set localhostname [string tolower $localhostname] - set domain [string tolower $domain] - verbose "hostname: $hostname; localhostname: $localhostname; domain $domain" + verbose "hostname: $hostname" return 1 } diff --git a/src/tests/dejagnu/config/default.exp b/src/tests/dejagnu/config/default.exp index 1689e86fe..cc94718db 100644 --- a/src/tests/dejagnu/config/default.exp +++ b/src/tests/dejagnu/config/default.exp @@ -640,17 +640,16 @@ proc setup_runtime_env { } { # get_hostname # This procedure will get the local hostname. It sets the global -# variables hostname (the full name) and localhostname (the first part -# of the name). Returns 1 on success, 0 on failure. +# variables hostname (the full name) and domain (all but the first +# part of the name). Returns 1 on success, 0 on failure. proc get_hostname { } { global RESOLVE global hostname - global localhostname global domain global tmppwd - if {[info exists hostname] && [info exists localhostname]} { + if {[info exists hostname]} { return 1 } @@ -670,12 +669,11 @@ proc get_hostname { } { } close $file file delete $tmppwd/hostname - regexp "^(\[^.\]*)\\.(.*)$" $hostname foo localhostname domain + regexp "^\[^.\]*\\.(.*)$" $hostname foo domain set hostname [string tolower $hostname] - set localhostname [string tolower $localhostname] set domain [string tolower $domain] - verbose "hostname: $hostname; localhostname: $localhostname; domain $domain" + verbose "hostname: $hostname; domain: $domain" return 1 } @@ -766,9 +764,6 @@ proc setup_kerberos_files { } { puts $conffile "" puts $conffile "\[realms\]" puts $conffile " $REALMNAME = \{" -# puts $conffile " database_name = $tmppwd/db" - puts $conffile " admin_database_name = $tmppwd/adb" - puts $conffile " admin_database_lockfile = $tmppwd/adb.lock" # Testing with a colon in the name exercises default handling # for pathnames. puts $conffile " key_stash_file = $tmppwd/stash:foo" @@ -817,9 +812,6 @@ proc setup_kerberos_files { } { puts $conffile "" puts $conffile "\[realms\]" puts $conffile " $REALMNAME = \{" -# puts $conffile " database_name = $tmppwd/slave-db" - puts $conffile " admin_database_name = $tmppwd/slave-adb" - puts $conffile " admin_database_lockfile = $tmppwd/slave-adb.lock" # Testing with a colon in the name exercises default handling # for pathnames. puts $conffile " key_stash_file = $tmppwd/slave-stash" @@ -946,7 +938,6 @@ proc setup_krb5_conf { {type client} } { puts $conffile " kdc = $hostname:[expr 1 + $portbase]" puts $conffile " admin_server = $hostname:[expr 4 + $portbase]" puts $conffile " kpasswd_server = $hostname:[expr 5 + $portbase]" - puts $conffile " default_domain = $domain" puts $conffile " database_module = foo_db2" puts $conffile " \}" puts $conffile ""