From 1782c25c267ab1de34b4a58376911d574ed38ac3 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Sat, 10 Aug 1996 04:39:04 +0000 Subject: [PATCH] * Read all kadmin output before waiting for it to die * Sleep 2 seconds before starting KDC, so we know we slept at elast one second so that the file modification time will actually change. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8920 dc483132-0cff-0310-8789-dd5450dbe970 --- src/tests/dejagnu/config/ChangeLog | 11 +++++++++++ src/tests/dejagnu/config/default.exp | 14 ++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/tests/dejagnu/config/ChangeLog b/src/tests/dejagnu/config/ChangeLog index 390124962..81f05d571 100644 --- a/src/tests/dejagnu/config/ChangeLog +++ b/src/tests/dejagnu/config/ChangeLog @@ -1,3 +1,14 @@ +Thu Aug 8 23:08:13 1996 Sam Hartman + + * default.exp: In add_kerberos_key and add_random_key only execute + the final expect_after if the spawn ID is still open; also soak up + all the kadmin responses. + +Thu Aug 8 22:13:27 1996 Sam Hartman + + * default.exp: Sleep for two seconds while waiting for KDC to + start; sleep(1) doesn't always take up any time. + Mon Aug 5 21:16:48 1996 Ezra Peisach * default.exp: Update to new kdb5_util convention. diff --git a/src/tests/dejagnu/config/default.exp b/src/tests/dejagnu/config/default.exp index b802b65f9..c7d597743 100644 --- a/src/tests/dejagnu/config/default.exp +++ b/src/tests/dejagnu/config/default.exp @@ -771,9 +771,8 @@ proc start_kerberos_daemons { standalone } { if ![file exists $kdc_lfile] then { catch [touch $kdc_lfile] - sleep 1 } - + sleep 2 set kdc_start [file mtime $kdc_lfile] spawn $KRB5KDC -r $REALMNAME -n @@ -784,7 +783,7 @@ proc start_kerberos_daemons { standalone } { if { [file mtime $kdc_lfile] != $kdc_start } then { break; } - sleep 1 + sleep 2 } if {$count >= $retry} { @@ -919,7 +918,6 @@ proc add_kerberos_key { kkey standalone } { } eof { fail "kadmin $kkey" - catch "expect_after" return 0 } } @@ -933,9 +931,9 @@ proc add_kerberos_key { kkey standalone } { send "$KEY\r" expect { "Principal \"$kkey@$REALMNAME\" created" { } - "Principal or policy already exists while creating" { } + "Principal or policy already exists while creating*" { expect eof } } - expect_after + catch "expect_after" if ![check_exit_status kadmin] { return 0 } @@ -977,9 +975,9 @@ proc add_random_key { kkey standalone } { send "adminpass$KEY\r" expect { "Principal \"$kkey@$REALMNAME\" created" { } - "Principal or policy already exists while creating" { } + "Principal or policy already exists while creating*" { expect eof} } - expect_after + catch "expect_after" if ![check_exit_status kadmin] { return 0 } -- 2.26.2