diff tests/test-ssh-proto.t @ 36851:31581528f242

debugwireproto: close the write end before consuming all available data And make it read all available data deterministically. Otherwise util.poll() may deadlock because both stdout and stderr could have no data. Spotted by the next patch which removes stderr from the fds.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 12 Mar 2018 22:47:33 +0900
parents 8395fddde46c
children 2090044a288d
line wrap: on
line diff
--- a/tests/test-ssh-proto.t	Fri Mar 09 15:57:16 2018 +0100
+++ b/tests/test-ssh-proto.t	Mon Mar 12 22:47:33 2018 +0900
@@ -1138,6 +1138,7 @@
   i>     hello\n
   o> readline() -> 1:
   o>     \n
+  o> read(-1) -> 0: 
   e> read(-1) -> 42:
   e>     cannot upgrade protocols multiple times\n
   e>     -\n
@@ -1229,6 +1230,7 @@
   i>     invalid\n
   o> readline() -> 1:
   o>     \n
+  o> read(-1) -> 0: 
   e> read(-1) -> 46:
   e>     malformed handshake protocol: missing hello\n
   e>     -\n
@@ -1248,6 +1250,7 @@
   i>     invalid\n
   o> readline() -> 1:
   o>     \n
+  o> read(-1) -> 0: 
   e> read(-1) -> 48:
   e>     malformed handshake protocol: missing between\n
   e>     -\n
@@ -1269,6 +1272,7 @@
   i>     invalid\n
   o> readline() -> 1:
   o>     \n
+  o> read(-1) -> 0: 
   e> read(-1) -> 49:
   e>     malformed handshake protocol: missing pairs 81\n
   e>     -\n