From: Greg Hudson Date: Sat, 24 Apr 2010 19:24:36 +0000 (+0000) Subject: Add a sentinel line to sim_server after the socket is ready, and use X-Git-Tag: krb5-1.9-beta1~262 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=489919e774645f990116ea5f0063a9b009fa962f;p=krb5.git Add a sentinel line to sim_server after the socket is ready, and use it in simple.exp in the dejagnu test suite instead of sleeping. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23936 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/simple/server/sim_server.c b/src/appl/simple/server/sim_server.c index d06c25539..07cb01d5f 100644 --- a/src/appl/simple/server/sim_server.c +++ b/src/appl/simple/server/sim_server.c @@ -172,6 +172,8 @@ main(int argc, char *argv[]) exit(1); } + printf("starting...\n"); + #ifdef DEBUG printf("socket has port # %d\n", ntohs(s_sock.sin_port)); #endif diff --git a/src/tests/dejagnu/krb-standalone/simple.exp b/src/tests/dejagnu/krb-standalone/simple.exp index 7f2763c78..fa749035f 100644 --- a/src/tests/dejagnu/krb-standalone/simple.exp +++ b/src/tests/dejagnu/krb-standalone/simple.exp @@ -46,8 +46,10 @@ proc start_sim_server_daemon { } { verbose "sim_server_spawn is $sim_server_spawn_id" 1 - # Give sim_server some time to start - sleep 2 + expect { + "starting" { } + eof { perror "sim_server failed to start" } + } return 1 }