summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2001-06-22 23:37:35 +0000
committerTom Yu <tlyu@mit.edu>2001-06-22 23:37:35 +0000
commit513e046e6540ec6392ed058c1d6b36c92a5d0c94 (patch)
treeec9d19cb7c1e804a5f5c3dcc1cad1d8b1743a68b /src
parent7fc757acc35aa16e8794295269fc2ed4aa03ca6d (diff)
* gssftp.exp: Use $tmppwd rather than hardcoding tmpdir
* kadmin.exp: Use $tmppwd rather than hardcoding tmpdir. * rcp.exp: Use $tmppwd rather than hardcoding tmpdir. * rsh.exp: Rearrange ordering of environment setup slightly. * standalone.exp: Use $KLIST -5 -e so as to better debug enctype problems. * v4gssftp.exp: Do check_klogin as well as check_k5login. Use $tmppwd rather than hardcoding tmpdir. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13501 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/tests/dejagnu/krb-standalone/ChangeLog16
-rw-r--r--src/tests/dejagnu/krb-standalone/gssftp.exp20
-rw-r--r--src/tests/dejagnu/krb-standalone/kadmin.exp7
-rw-r--r--src/tests/dejagnu/krb-standalone/rcp.exp10
-rw-r--r--src/tests/dejagnu/krb-standalone/rsh.exp2
-rw-r--r--src/tests/dejagnu/krb-standalone/standalone.exp2
-rw-r--r--src/tests/dejagnu/krb-standalone/v4gssftp.exp24
7 files changed, 51 insertions, 30 deletions
diff --git a/src/tests/dejagnu/krb-standalone/ChangeLog b/src/tests/dejagnu/krb-standalone/ChangeLog
index 91e053f37..d5d323169 100644
--- a/src/tests/dejagnu/krb-standalone/ChangeLog
+++ b/src/tests/dejagnu/krb-standalone/ChangeLog
@@ -1,3 +1,19 @@
+2001-06-22 Tom Yu <tlyu@mit.edu>
+
+ * gssftp.exp: Use $tmppwd rather than hardcoding tmpdir.
+
+ * kadmin.exp: Use $tmppwd rather than hardcoding tmpdir.
+
+ * rcp.exp: Use $tmppwd rather than hardcoding tmpdir.
+
+ * rsh.exp: Rearrange ordering of environment setup slightly.
+
+ * standalone.exp: Use $KLIST -5 -e so as to better debug enctype
+ problems.
+
+ * v4gssftp.exp: Do check_klogin as well as check_k5login. Use
+ $tmppwd rather than hardcoding tmpdir.
+
2001-06-17 Ezra Peisach <epeisach@mit.edu>
* v4krb524d.exp: New tests for the krb524d and k524init programs.
diff --git a/src/tests/dejagnu/krb-standalone/gssftp.exp b/src/tests/dejagnu/krb-standalone/gssftp.exp
index cd9e731fd..912c36686 100644
--- a/src/tests/dejagnu/krb-standalone/gssftp.exp
+++ b/src/tests/dejagnu/krb-standalone/gssftp.exp
@@ -68,7 +68,7 @@ proc stop_ftp_daemon { } {
}
# Create a file to use for ftp testing.
-set file [open tmpdir/ftp-test w]
+set file [open $tmppwd/ftp-test w]
puts $file "This file is used for ftp testing."
close $file
@@ -241,26 +241,26 @@ proc ftp_test { } {
set testname "get"
- catch "exec rm -f tmpdir/copy"
+ catch "exec rm -f $tmppwd/copy"
send "get $tmppwd/ftp-test $tmppwd/copy\r"
expect "Opening BINARY mode data connection for $tmppwd/ftp-test"
expect "Transfer complete"
expect -re "\[0-9\]+ bytes received in \[0-9.e-\]+ seconds"
expect "ftp> "
- if [check_file tmpdir/copy] {
+ if [check_file $tmppwd/copy] {
pass $testname
} else {
fail $testname
}
set testname "put"
- catch "exec rm -f tmpdir/copy"
+ catch "exec rm -f $tmppwd/copy"
send "put $tmppwd/ftp-test $tmppwd/copy\r"
expect "Opening BINARY mode data connection for $tmppwd/copy"
expect "Transfer complete"
expect -re "\[0-9\]+ bytes sent in \[0-9.e-\]+ seconds"
expect "ftp> "
- if [check_file tmpdir/copy] {
+ if [check_file $tmppwd/copy] {
pass $testname
} else {
fail $testname
@@ -274,20 +274,20 @@ proc ftp_test { } {
}
set testname "lcd"
- send "lcd tmpdir\r"
+ send "lcd $tmppwd\r"
expect "Local directory now $tmppwd"
expect "ftp> " {
pass $testname
}
set testname "local get"
- catch "exec rm -f tmpdir/copy"
+ catch "exec rm -f $tmppwd/copy"
send "get ftp-test copy\r"
expect "Opening BINARY mode data connection for ftp-test"
expect "Transfer complete"
expect -re "\[0-9\]+ bytes received in \[0-9.e-\]+ seconds"
expect "ftp> "
- if [check_file tmpdir/copy] {
+ if [check_file $tmppwd/copy] {
pass $testname
} else {
fail $testname
@@ -308,13 +308,13 @@ proc ftp_test { } {
}
set testname "encrypted get"
- catch "exec rm -f tmpdir/copy"
+ catch "exec rm -f $tmppwd/copy"
send "get ftp-test copy\r"
expect "Opening BINARY mode data connection for ftp-test"
expect "Transfer complete"
expect -re "\[0-9\]+ bytes received in \[0-9.e-\]+ seconds"
expect "ftp> "
- if [check_file tmpdir/copy] {
+ if [check_file $tmppwd/copy] {
pass $testname
} else {
fail $testname
diff --git a/src/tests/dejagnu/krb-standalone/kadmin.exp b/src/tests/dejagnu/krb-standalone/kadmin.exp
index 8167b021f..1d0bca54e 100644
--- a/src/tests/dejagnu/krb-standalone/kadmin.exp
+++ b/src/tests/dejagnu/krb-standalone/kadmin.exp
@@ -437,10 +437,11 @@ proc kadmin_extract { instance name } {
global KADMIN
global KEY
global spawn_id
+ global tmppwd
- catch "exec rm -f tmpdir/keytab"
+ catch "exec rm -f $tmppwd/keytab"
- spawn $KADMIN -p krbtest/admin@$REALMNAME -q "xst -k tmpdir/keytab $name/$instance"
+ spawn $KADMIN -p krbtest/admin@$REALMNAME -q "xst -k $tmppwd/keytab $name/$instance"
expect_after {
"Cannot contact any KDC" {
fail "kadmin xst $instance $name lost KDC"
@@ -461,7 +462,7 @@ proc kadmin_extract { instance name } {
expect "Enter password:" {
send "adminpass$KEY\r"
}
-# expect -re "kadmin: Entry for principal $name/$instance with kvno [0-9], encryption type .* added to keytab WRFILE:tmpdir/keytab."
+# expect -re "kadmin: Entry for principal $name/$instance with kvno [0-9], encryption type .* added to keytab WRFILE:$tmppwd/keytab."
expect_after
expect eof
set k_stat [wait -i $spawn_id]
diff --git a/src/tests/dejagnu/krb-standalone/rcp.exp b/src/tests/dejagnu/krb-standalone/rcp.exp
index a51196c5d..59125b78f 100644
--- a/src/tests/dejagnu/krb-standalone/rcp.exp
+++ b/src/tests/dejagnu/krb-standalone/rcp.exp
@@ -80,7 +80,7 @@ proc stop_rsh_daemon { } {
}
# Create a file to use for rcp testing.
-set file [open tmpdir/rcp-test w]
+set file [open $tmppwd/rcp-test w]
puts $file "This file is used for rcp testing."
close $file
@@ -125,9 +125,9 @@ proc rcp_one_test { testname options frompref topref } {
global RCP
global tmppwd
- send_log "rm -f tmpdir/copy\n"
- verbose "exec rm -f tmpdir/copy"
- catch "exec rm -f tmpdir/copy"
+ send_log "rm -f $tmppwd/copy\n"
+ verbose "exec rm -f $tmppwd/copy"
+ catch "exec rm -f $tmppwd/copy"
set from [format "%s%s" $frompref $tmppwd/rcp-test]
set to [format "%s%s" $topref $tmppwd/copy]
@@ -143,7 +143,7 @@ proc rcp_one_test { testname options frompref topref } {
return 0
}
- if ![check_file tmpdir/copy] {
+ if ![check_file $tmppwd/copy] {
fail $testname
return 0
}
diff --git a/src/tests/dejagnu/krb-standalone/rsh.exp b/src/tests/dejagnu/krb-standalone/rsh.exp
index ed47af2c6..0cb8304b4 100644
--- a/src/tests/dejagnu/krb-standalone/rsh.exp
+++ b/src/tests/dejagnu/krb-standalone/rsh.exp
@@ -27,7 +27,6 @@ if ![check_k5login rsh] {
# Set up the kerberos database.
if {![get_hostname] \
|| ![setup_kerberos_files] \
- || ![setup_kerberos_env] \
|| ![setup_kerberos_db 0]} {
return
}
@@ -85,6 +84,7 @@ proc rsh_test { } {
|| ![add_kerberos_key host/$hostname 0] \
|| ![setup_srvtab 0] \
|| ![add_kerberos_key $env(USER) 0] \
+ || ![setup_kerberos_env client] \
|| ![kinit $env(USER) $env(USER)$KEY 0]} {
return
}
diff --git a/src/tests/dejagnu/krb-standalone/standalone.exp b/src/tests/dejagnu/krb-standalone/standalone.exp
index e925b53c0..62358109e 100644
--- a/src/tests/dejagnu/krb-standalone/standalone.exp
+++ b/src/tests/dejagnu/krb-standalone/standalone.exp
@@ -57,7 +57,7 @@ proc doit { } {
}
# Make sure that klist can see the ticket.
- spawn $KLIST -5
+ spawn $KLIST -5 -e
expect {
-re "Ticket cache:\[ \]*(.+:)?$tmppwd/tkt.*Default principal:\[ \]*krbtest/admin@$REALMNAME.*krbtgt/$REALMNAME@$REALMNAME\r\n" {
verbose "klist started"
diff --git a/src/tests/dejagnu/krb-standalone/v4gssftp.exp b/src/tests/dejagnu/krb-standalone/v4gssftp.exp
index 651dbacd3..a940aa50d 100644
--- a/src/tests/dejagnu/krb-standalone/v4gssftp.exp
+++ b/src/tests/dejagnu/krb-standalone/v4gssftp.exp
@@ -26,6 +26,10 @@ if ![check_k5login ftp] {
return
}
+if ![check_klogin ftp] {
+ return
+}
+
# Set up the kerberos database.
if {![get_hostname] \
|| ![setup_kerberos_files] \
@@ -73,7 +77,7 @@ proc stop_ftp_daemon { } {
}
# Create a file to use for ftp testing.
-set file [open tmpdir/ftp-test w]
+set file [open $tmppwd/ftp-test w]
puts $file "This file is used for ftp testing."
close $file
@@ -284,26 +288,26 @@ proc v4ftp_test { } {
set testname "get(v4)"
- catch "exec rm -f tmpdir/copy"
+ catch "exec rm -f $tmppwd/copy"
send "get $tmppwd/ftp-test $tmppwd/copy\r"
expect "Opening BINARY mode data connection for $tmppwd/ftp-test"
expect "Transfer complete"
expect -re "\[0-9\]+ bytes received in \[0-9.e-\]+ seconds"
expect "ftp> "
- if [check_file tmpdir/copy] {
+ if [check_file $tmppwd/copy] {
pass $testname
} else {
fail $testname
}
set testname "put(v4)"
- catch "exec rm -f tmpdir/copy"
+ catch "exec rm -f $tmppwd/copy"
send "put $tmppwd/ftp-test $tmppwd/copy\r"
expect "Opening BINARY mode data connection for $tmppwd/copy"
expect "Transfer complete"
expect -re "\[0-9\]+ bytes sent in \[0-9.e-\]+ seconds"
expect "ftp> "
- if [check_file tmpdir/copy] {
+ if [check_file $tmppwd/copy] {
pass $testname
} else {
fail $testname
@@ -317,20 +321,20 @@ proc v4ftp_test { } {
}
set testname "lcd(v4)"
- send "lcd tmpdir\r"
+ send "lcd $tmppwd\r"
expect "Local directory now $tmppwd"
expect "ftp> " {
pass $testname
}
set testname "local get(v4)"
- catch "exec rm -f tmpdir/copy"
+ catch "exec rm -f $tmppwd/copy"
send "get ftp-test copy\r"
expect "Opening BINARY mode data connection for ftp-test"
expect "Transfer complete"
expect -re "\[0-9\]+ bytes received in \[0-9.e-\]+ seconds"
expect "ftp> "
- if [check_file tmpdir/copy] {
+ if [check_file $tmppwd/copy] {
pass $testname
} else {
fail $testname
@@ -351,7 +355,7 @@ proc v4ftp_test { } {
}
set testname "encrypted get(v4)"
- catch "exec rm -f tmpdir/copy"
+ catch "exec rm -f $tmppwd/copy"
send "get ftp-test copy\r"
expect "Opening BINARY mode data connection for ftp-test"
expect "Transfer complete"
@@ -365,7 +369,7 @@ proc v4ftp_test { } {
}
}
expect "ftp> "
- if [check_file tmpdir/copy] {
+ if [check_file $tmppwd/copy] {
pass $testname
} else {
fail $testname