From: Tom Yu Date: Mon, 7 Feb 2000 23:51:13 +0000 (+0000) Subject: * config/unix.exp: Call send_error instead of fail to prevent X-Git-Tag: krb5-1.2-beta1~99 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2549b2f4bf8dd88f4e911c90f472f4ec3e04a8ef;p=krb5.git * config/unix.exp: Call send_error instead of fail to prevent referencing variables not yet set up by the test framework. * lib/helpers.exp: Call kinit and kdestroy with the -5 flag to deal with new program behavior. Also call perror rather than error to avoid spewing a stack trace. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12021 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/rpc/unit-test/ChangeLog b/src/lib/rpc/unit-test/ChangeLog index fa4240298..344713e43 100644 --- a/src/lib/rpc/unit-test/ChangeLog +++ b/src/lib/rpc/unit-test/ChangeLog @@ -1,3 +1,12 @@ +2000-02-07 Tom Yu + + * config/unix.exp: Call send_error instead of fail to prevent + referencing variables not yet set up by the test framework. + + * lib/helpers.exp: Call kinit and kdestroy with the -5 flag to + deal with new program behavior. Also call perror rather than + error to avoid spewing a stack trace. + 1999-10-26 Tom Yu * Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES, diff --git a/src/lib/rpc/unit-test/config/unix.exp b/src/lib/rpc/unit-test/config/unix.exp index e26621674..fe6dd036b 100644 --- a/src/lib/rpc/unit-test/config/unix.exp +++ b/src/lib/rpc/unit-test/config/unix.exp @@ -65,11 +65,11 @@ proc rpc_test_start { } { expect { "running" { } eof { - fail "server exited!" + send_error "server exited!" verbose $expect_out(buffer) 1 } timeout { - fail "server didn't start in $timeout seconds" + send_error "server didn't start in $timeout seconds" verbose $expect_out(buffer) 1 } } diff --git a/src/lib/rpc/unit-test/lib/helpers.exp b/src/lib/rpc/unit-test/lib/helpers.exp index b33af6a50..3d7b167fc 100644 --- a/src/lib/rpc/unit-test/lib/helpers.exp +++ b/src/lib/rpc/unit-test/lib/helpers.exp @@ -21,20 +21,20 @@ proc kinit {princ pass lifetime} { global kinit global wait_error_index wait_errno_index wait_status_index - spawn -noecho $kinit -l $lifetime $princ + spawn -noecho $kinit -5 -l $lifetime $princ expect { -re "Password for $princ.*: " { send "$pass\n" } - timeout { error "Timeout waiting for kinit"; close } + timeout { perror "Timeout waiting for kinit"; close } } expect { eof {} } set ret [wait] if {[lindex $ret $wait_error_index] == -1} { - error \ + perror \ "wait(kinit $princ) returned error [lindex $ret $wait_errno_index]" } else { if {[lindex $ret $wait_status_index] != 0} { - error \ + perror \ "kinit $princ failed with [lindex $ret $wait_status_index]" } } @@ -116,7 +116,7 @@ proc wait_client {testname ccname id status} { } set env(KRB5CCNAME) FILE:/tmp/krb5cc_rpc_test_$ccname - if {[catch "exec $kdestroy"] != 0} { + if {[catch "exec $kdestroy -5"] != 0} { error "$testname: cannot destroy client $ccname ccache" }