Run a single expect statement to read from both client and server, to
authorTom Yu <tlyu@mit.edu>
Wed, 28 Jan 2009 00:32:29 +0000 (00:32 +0000)
committerTom Yu <tlyu@mit.edu>
Wed, 28 Jan 2009 00:32:29 +0000 (00:32 +0000)
avoid an apparent race condition on Darwin.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21814 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/rpc/unit-test/rpc_test.0/fullrun.exp

index 7cdda8af139cd924e6f3af9720492126ea7fee98..2b2d205201a95a6206471a9e706803acbafcf6db 100644 (file)
@@ -19,22 +19,16 @@ set ver_line "rpc_test server: bad verifier\[^\r\n\]*\[\r\n]+"
 set dots 0
 set server_lines 0
 while {1} {
-       set oldtimeout $timeout
-       set timeout 5
-       while {1} {
-               expect {
-                       -i $server_id
-                       -re $ver_line {
-                               verbose "Got line from server."
-                               incr server_lines
-                       }
-                       default {
-                               break
-                       }
-               }
-       }
-       set timeout $oldtimeout
        expect {
+               -i $server_id
+               -re $ver_line {
+                       verbose "Got line from server."
+                       incr server_lines
+               }
+               default {
+                       exp_continue
+               }
+
                -i $client_id
                . { 
                        incr dots
@@ -54,7 +48,6 @@ while {1} {
                        fail "full run: timeout waiting for dot"
                        break
                }
-
        }
 }
 if {$dots==11} {