svn rev #21895: trunk/src/lib/rpc/unit-test/ config/ rpc_test.0/

epeisach@MIT.EDU epeisach at MIT.EDU
Thu Feb 5 14:02:31 EST 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=21895
Commit By: epeisach
Log Message:
ticket: 6349

Detect failure to register with rpcbind/portmap due to security
restrictons and not bomb out in tests.





Changed Files:
U   trunk/src/lib/rpc/unit-test/config/unix.exp
U   trunk/src/lib/rpc/unit-test/rpc_test.0/expire.exp
U   trunk/src/lib/rpc/unit-test/rpc_test.0/fullrun.exp
U   trunk/src/lib/rpc/unit-test/rpc_test.0/gsserr.exp
Modified: trunk/src/lib/rpc/unit-test/config/unix.exp
===================================================================
--- trunk/src/lib/rpc/unit-test/config/unix.exp	2009-02-05 18:43:08 UTC (rev 21894)
+++ trunk/src/lib/rpc/unit-test/config/unix.exp	2009-02-05 19:02:29 UTC (rev 21895)
@@ -112,6 +112,10 @@
 	global server_started
 	global kill
 
+        if { [info exists server_started] && $server_started == 0 } { 
+	    return 
+	}
+
  	if {[catch {
 		expect {
 			-i $server_id
@@ -143,6 +147,7 @@
  	verbose "% $SERVER" 1
 	set server_pid [spawn $SERVER $PROT]
 	set server_id $spawn_id
+        set server_started 1
 
 	unset env(KRB5_KTNAME)
 
@@ -150,6 +155,18 @@
 
 	expect {
 		"running" { }
+	        "Cannot register service" {
+		        send_error "Server cannot register with portmap/rpcbind!!\n"
+		        note "+++"
+		        note "+++ These tests require the ability to register with portmap/rpcbind"
+		        note "+++ Either the server is not running or it does not"
+		        note "+++  allow registration using a loopback connection"
+		        note "+++"
+		        verbose $expect_out(buffer) 1
+		        set server_started 0
+		        unsupported "Server registration"
+		        return
+	        }
 		eof { 
 			send_error "server exited!"
 			verbose $expect_out(buffer) 1

Modified: trunk/src/lib/rpc/unit-test/rpc_test.0/expire.exp
===================================================================
--- trunk/src/lib/rpc/unit-test/rpc_test.0/expire.exp	2009-02-05 18:43:08 UTC (rev 21894)
+++ trunk/src/lib/rpc/unit-test/rpc_test.0/expire.exp	2009-02-05 19:02:29 UTC (rev 21895)
@@ -2,7 +2,7 @@
 
 load_lib "helpers.exp"
 
-global spawn_id
+global server_started
 
 proc expired {} {
     global spawn_id server_id
@@ -18,8 +18,10 @@
 
     flush_server
 }
-expired
 
+#if { [info exists server_pid] && ($server_pid >= 0) } { expired }
+if { $server_started } {expired } 
+
 proc overlap {} {
     global spawn_id
 
@@ -41,6 +43,6 @@
 
     flush_server
 }
-overlap
+if { $server_started } {overlap} 
 
 

Modified: trunk/src/lib/rpc/unit-test/rpc_test.0/fullrun.exp
===================================================================
--- trunk/src/lib/rpc/unit-test/rpc_test.0/fullrun.exp	2009-02-05 18:43:08 UTC (rev 21894)
+++ trunk/src/lib/rpc/unit-test/rpc_test.0/fullrun.exp	2009-02-05 19:02:29 UTC (rev 21895)
@@ -4,7 +4,10 @@
 
 global spawn_id
 global server_id
+global server_started
 
+if { !$server_started } {return} 
+
 # Start the client and do a full run
 start_client "full run" fullrun testuser notathena 8h 1026
 set client_id $spawn_id

Modified: trunk/src/lib/rpc/unit-test/rpc_test.0/gsserr.exp
===================================================================
--- trunk/src/lib/rpc/unit-test/rpc_test.0/gsserr.exp	2009-02-05 18:43:08 UTC (rev 21894)
+++ trunk/src/lib/rpc/unit-test/rpc_test.0/gsserr.exp	2009-02-05 19:02:29 UTC (rev 21895)
@@ -4,8 +4,11 @@
 
 global spawn_id
 global server_id
+global server_started
 global hostname
 
+if { !$server_started } {return} 
+
 start_client "gss err" gsserr testuser notathena 8h 1026 notserver@$hostname
 
 eof_client "gss err" gsserr $spawn_id 2




More information about the cvs-krb5 mailing list