summaryrefslogtreecommitdiffstats
path: root/src/tests/dejagnu
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2006-06-30 23:22:32 +0000
committerKen Raeburn <raeburn@mit.edu>2006-06-30 23:22:32 +0000
commitea9dc5759de0dd7f59eed27def805d6218f5af5e (patch)
tree5c82bfdfccba9a839068b577b92cfc25a654d2de /src/tests/dejagnu
parent0722d38cb54aa0a61e8b97c15d4ef16778b76e59 (diff)
downloadkrb5-ea9dc5759de0dd7f59eed27def805d6218f5af5e.tar.gz
krb5-ea9dc5759de0dd7f59eed27def805d6218f5af5e.tar.xz
krb5-ea9dc5759de0dd7f59eed27def805d6218f5af5e.zip
test kdb5_util dump/load functionality in dejagnu
This new test just dumps and reloads the database. It doesn't examine the resulting database, but kinit and other tests are run after it, using the reloaded database. * standalone.exp (dump_and_reload): New proc. (doit): Invoke it. ticket: new target_version: 1.5 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18308 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/tests/dejagnu')
-rw-r--r--src/tests/dejagnu/krb-standalone/standalone.exp58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/tests/dejagnu/krb-standalone/standalone.exp b/src/tests/dejagnu/krb-standalone/standalone.exp
index 554906e446..3799a51abe 100644
--- a/src/tests/dejagnu/krb-standalone/standalone.exp
+++ b/src/tests/dejagnu/krb-standalone/standalone.exp
@@ -19,6 +19,61 @@ if ![setup_kerberos_db 1] {
# the rest of the tests inside a proc, so that we can easily kill the
# processes when the procedure ends.
+proc dump_and_reload {} {
+ global KDB5_UTIL
+ global tmppwd
+
+ set dumpfile $tmppwd/dump-file
+ set dumpokfile $dumpfile.dump_ok
+
+ set test1name "kdb5_util dump"
+ set test2name "kdb5_util load"
+
+ if [file exists $dumpfile] { file delete $dumpfile }
+ if [file exists $dumpokfile] { file delete $dumpokfile }
+
+ spawn $KDB5_UTIL dump $dumpfile
+ expect {
+ -re "..*" {
+ fail $test1name
+ untested $test2name
+ return
+ }
+ timeout {
+ fail $test1name
+ untested $test2name
+ return
+ }
+ eof { }
+ }
+ if ![check_exit_status $test1name] {
+ untested $test2name
+ return
+ }
+ if ![file exists $dumpfile]||![file exists $dumpokfile] {
+ fail $test1name
+ untested $test2name
+ return
+ }
+ pass $test1name
+
+ spawn $KDB5_UTIL load $dumpfile
+ expect {
+ -re "..*" {
+ fail $test2name
+ return
+ }
+ timeout {
+ fail $test2name
+ return
+ }
+ eof { }
+ }
+ if [check_exit_status $test2name] {
+ pass $test2name
+ }
+}
+
proc doit { } {
global REALMNAME
global KLIST
@@ -49,6 +104,9 @@ proc doit { } {
return
}
+ # Test dump and load. Continue on, whatever the result.
+ dump_and_reload
+
# Use kinit to get a ticket.
if ![kinit krbtest/admin adminpass$KEY 1] {
return