diff options
author | Greg Hudson <ghudson@mit.edu> | 2013-05-01 13:07:36 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2013-05-01 17:18:45 -0400 |
commit | 5454da3bcaa383f5b47984283f11f010d3d2b73e (patch) | |
tree | 0d19ccb36e58a49688f648a22a8110c3e254ffdc /src/lib/rpc/unit-test/config/unix.exp | |
parent | 11bd102c0e3793204111f712e5bd4bf54f2d9573 (diff) | |
download | krb5-5454da3bcaa383f5b47984283f11f010d3d2b73e.tar.gz krb5-5454da3bcaa383f5b47984283f11f010d3d2b73e.tar.xz krb5-5454da3bcaa383f5b47984283f11f010d3d2b73e.zip |
Don't use portmapper in RPC tests
On many Linux systems, due to what is arguably a bug in rpcbind, the
portmapper doesn't allow service registration from non-root processes.
This causes the RPC tests to be frequently skipped. Modify the tests
so that they don't need the portmapper, by grabbing the port number
from the server process and passing it to the client.
Diffstat (limited to 'src/lib/rpc/unit-test/config/unix.exp')
-rw-r--r-- | src/lib/rpc/unit-test/config/unix.exp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/lib/rpc/unit-test/config/unix.exp b/src/lib/rpc/unit-test/config/unix.exp index f02116e1da..ba57b703e9 100644 --- a/src/lib/rpc/unit-test/config/unix.exp +++ b/src/lib/rpc/unit-test/config/unix.exp @@ -112,10 +112,6 @@ proc rpc_test_exit {} { global server_started global kill - if { [info exists server_started] && $server_started == 0 } { - return - } - if {[catch { expect { -i $server_id @@ -138,6 +134,7 @@ proc rpc_test_start { } { global server_id global server_pid global server_started + global server_port global env if [info exists server_pid] { rpc_test_exit } @@ -148,25 +145,17 @@ proc rpc_test_start { } { set server_pid [spawn $SERVER $PROT] set server_id $spawn_id set server_started 1 + set server_port -1 unset env(KRB5_KTNAME) set timeout 30 expect { + -re "port: (\[0-9\]*)\r\n" { + set server_port $expect_out(1,string) + } "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 |