From: Greg Hudson Date: Sat, 24 Apr 2010 19:12:34 +0000 (+0000) Subject: Add a sentinel to the sample gss-server after the socket is ready, and X-Git-Tag: krb5-1.9-beta1~264 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b11be41cec65d8fab8256c816178a3d41ecb7642;p=krb5.git Add a sentinel to the sample gss-server after the socket is ready, and use it in gssapi.exp in the dejagnu test suite instead of sleeping. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23934 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/gss-sample/gss-server.c b/src/appl/gss-sample/gss-server.c index 0e2a27516..8b59eb276 100644 --- a/src/appl/gss-sample/gss-server.c +++ b/src/appl/gss-sample/gss-server.c @@ -731,6 +731,7 @@ main(int argc, char **argv) if ((stmp = create_socket(port)) >= 0) { if (listen(stmp, max_threads == 1 ? 0 : max_threads) < 0) perror("listening on socket"); + fprintf(stderr, "starting...\n"); do { struct _work_plan *work = malloc(sizeof(struct _work_plan)); diff --git a/src/tests/dejagnu/krb-standalone/gssapi.exp b/src/tests/dejagnu/krb-standalone/gssapi.exp index 1f6664abd..582e08719 100644 --- a/src/tests/dejagnu/krb-standalone/gssapi.exp +++ b/src/tests/dejagnu/krb-standalone/gssapi.exp @@ -285,7 +285,11 @@ proc doit { } { spawn $GSSSERVER -export -logfile $tmppwd/gss-server.log -verbose -port [expr 8 + $portbase] gssservice@$hostname set gss_server_pid [exp_pid] set gss_server_spawn_id $spawn_id - sleep 2 + + expect { + "starting" { } + eof { perror "gss-server failed to start" } + } run_client gssclient0 $tmppwd/gss_tk_0 gssclient0 run_client gssclient1 $tmppwd/gss_tk_1 gssclient1