summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2005-09-08 01:44:53 +0000
committerKen Raeburn <raeburn@mit.edu>2005-09-08 01:44:53 +0000
commit5b9eda5632d6d5b2c54614dd1a80c73de6491675 (patch)
tree331443b99535330e6fe55c5b2a57bf5352df6d8f /src/tests
parent761f807d5ea32f5db0c07ae2c011c97b4688eaaf (diff)
downloadkrb5-5b9eda5632d6d5b2c54614dd1a80c73de6491675.tar.gz
krb5-5b9eda5632d6d5b2c54614dd1a80c73de6491675.tar.xz
krb5-5b9eda5632d6d5b2c54614dd1a80c73de6491675.zip
* default.exp: Initialize can_get_root to yes.
(setup_root_shell): If can_get_root is "no", log a message and return, without making another attempt. On failing attempts, set can_get_root to "no". git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17375 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/dejagnu/config/ChangeLog7
-rw-r--r--src/tests/dejagnu/config/default.exp18
2 files changed, 25 insertions, 0 deletions
diff --git a/src/tests/dejagnu/config/ChangeLog b/src/tests/dejagnu/config/ChangeLog
index 3814a7b77..82028c7c8 100644
--- a/src/tests/dejagnu/config/ChangeLog
+++ b/src/tests/dejagnu/config/ChangeLog
@@ -1,3 +1,10 @@
+2005-09-07 Ken Raeburn <raeburn@mit.edu>
+
+ * default.exp: Initialize can_get_root to yes.
+ (setup_root_shell): If can_get_root is "no", log a message and
+ return, without making another attempt. On failing attempts, set
+ can_get_root to "no".
+
2005-08-16 Ken Raeburn <raeburn@mit.edu>
* default.exp (setup_kerberos_files): Don't write database_name
diff --git a/src/tests/dejagnu/config/default.exp b/src/tests/dejagnu/config/default.exp
index 8f078c300..c3fd29425 100644
--- a/src/tests/dejagnu/config/default.exp
+++ b/src/tests/dejagnu/config/default.exp
@@ -2307,6 +2307,8 @@ proc v4klist_none { testname } {
# Kerberos must already be installed on this machine. It's a pain,
# but I can't think of a better approach.
+if ![info exists can_get_root] { set can_get_root yes }
+
proc setup_root_shell { testname } {
global BINSH
global ROOT_PROMPT
@@ -2319,9 +2321,16 @@ proc setup_root_shell { testname } {
global tmppwd
global env
global krb5_init_vars
+ global can_get_root
global timeout
+ if [string match $can_get_root no] {
+ note "$testname test requires ability to log in as root"
+ unsupported $testname
+ return 0
+ }
+
# Make sure we are using the original values of the environment
# variables. This means that the caller must call
# setup_kerberos_env after calling this procedure.
@@ -2337,6 +2346,7 @@ proc setup_root_shell { testname } {
}
if ![get_hostname] {
+ set can_get_root no
return 0
}
@@ -2369,6 +2379,7 @@ proc setup_root_shell { testname } {
unsupported "$testname"
set timeout $old_timeout
stop_root_shell
+ set can_get_root no
return 0
}
"Cannot assign requested address" {
@@ -2376,6 +2387,7 @@ proc setup_root_shell { testname } {
unsupported "$testname"
set timeout $old_timeout
stop_root_shell
+ set can_get_root no
return 0
}
-re "usage: rlogin|illegal option -- x|invalid option -- x" {
@@ -2383,6 +2395,7 @@ proc setup_root_shell { testname } {
unsupported "$testname"
set timeout $old_timeout
stop_root_shell
+ set can_get_root no
return 0
}
-re "$ROOT_PROMPT" { }
@@ -2392,6 +2405,7 @@ proc setup_root_shell { testname } {
perror "try running with ROOT_PROMPT=\"regexp\""
set timeout $old_timeout
stop_root_shell
+ set can_get_root no
return 0
}
eof {
@@ -2409,6 +2423,7 @@ proc setup_root_shell { testname } {
stop_root_shell
set timeout $old_timeout
catch "expect_after"
+ set can_get_root no
return 0
}
}
@@ -2419,6 +2434,7 @@ proc setup_root_shell { testname } {
stop_root_shell
set timeout $old_timeout
catch "expect_after"
+ set can_get_root no
return 0
}
eof {
@@ -2426,6 +2442,7 @@ proc setup_root_shell { testname } {
stop_root_shell
set timeout $old_timeout
catch "expect_after"
+ set can_get_root no
return 0
}
}
@@ -2478,6 +2495,7 @@ proc setup_root_shell { testname } {
perror "root shell can not cd to $dir"
set timeout $old_timeout
stop_root_shell
+ set can_get_root no
return 0
}
}