krb5 commit: Always recreate acl files during dejagnu tests

Tom Yu tlyu at MIT.EDU
Wed Jul 11 23:40:51 EDT 2012


https://github.com/krb5/krb5/commit/244bb3fde58dd6bab0969e0501b537c5871088f0
commit 244bb3fde58dd6bab0969e0501b537c5871088f0
Author: Tom Yu <tlyu at mit.edu>
Date:   Wed Jul 11 23:35:44 2012 -0400

    Always recreate acl files during dejagnu tests
    
    The dejagnu tests create some persistent acl files containing
    hostname-derived principal names.  These can get out of date if the
    host has changed names since the last time the dejagnu tests were run,
    causing failures (notably in iprop.exp).  To avoid this problem,
    change the dejagnu tests to always create new acl files for each test
    run.
    
    ticket: 7200 (new)
    tags: pullup
    target_version: 1.10.3

 src/tests/dejagnu/config/default.exp       |   10 ++++------
 src/tests/dejagnu/krb-standalone/iprop.exp |    8 +++-----
 2 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/tests/dejagnu/config/default.exp b/src/tests/dejagnu/config/default.exp
index c906bf1..2804b5c 100644
--- a/src/tests/dejagnu/config/default.exp
+++ b/src/tests/dejagnu/config/default.exp
@@ -875,12 +875,10 @@ proc setup_kerberos_files { } {
     }
 
     # Create ACL file.
-    if ![file exists $tmppwd/acl] {
-	set aclfile [open $tmppwd/acl w]
-	puts $aclfile "krbtest/admin@$REALMNAME *"
-	puts $aclfile "kiprop/$hostname@$REALMNAME p"
-	close $aclfile
-    }
+    set aclfile [open $tmppwd/acl w]
+    puts $aclfile "krbtest/admin@$REALMNAME *"
+    puts $aclfile "kiprop/$hostname@$REALMNAME p"
+    close $aclfile
 
     # Create dictfile file.
     if ![file exists $tmppwd/dictfile] {
diff --git a/src/tests/dejagnu/krb-standalone/iprop.exp b/src/tests/dejagnu/krb-standalone/iprop.exp
index aff4dc2..0170bb6 100644
--- a/src/tests/dejagnu/krb-standalone/iprop.exp
+++ b/src/tests/dejagnu/krb-standalone/iprop.exp
@@ -5,11 +5,9 @@ proc setup_slave {} {
     global tmppwd hostname REALMNAME KDB5_UTIL
     file delete $tmppwd/slave-stash $tmppwd/slave-acl
     file copy -force $tmppwd/acl $tmppwd/slave-acl
-    if ![file exists $tmppwd/kpropdacl] {
-	set aclfile [open $tmppwd/kpropd-acl w]
-	puts $aclfile "host/$hostname@$REALMNAME"
-	close $aclfile
-    }
+    set aclfile [open $tmppwd/kpropd-acl w]
+    puts $aclfile "host/$hostname@$REALMNAME"
+    close $aclfile
     setup_slave_db
     # copy database - must be used after master db set up
     envstack_push


More information about the cvs-krb5 mailing list