summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2010-04-24 19:24:36 +0000
committerGreg Hudson <ghudson@mit.edu>2010-04-24 19:24:36 +0000
commit489919e774645f990116ea5f0063a9b009fa962f (patch)
treed0352bdf85e8dea01e1b9e15efc1a76b84632bd2
parent7232640f151185eb829dedc46274c68e79936295 (diff)
downloadkrb5-489919e774645f990116ea5f0063a9b009fa962f.tar.gz
krb5-489919e774645f990116ea5f0063a9b009fa962f.tar.xz
krb5-489919e774645f990116ea5f0063a9b009fa962f.zip
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
-rw-r--r--src/appl/simple/server/sim_server.c2
-rw-r--r--src/tests/dejagnu/krb-standalone/simple.exp6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/appl/simple/server/sim_server.c b/src/appl/simple/server/sim_server.c
index d06c255393..07cb01d5f3 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 7f2763c783..fa749035fc 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
}