diff tests/test-ssh-proto-unbundle.t @ 36843: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 11b279a75bf1
children 2090044a288d
line wrap: on
line diff
--- a/tests/test-ssh-proto-unbundle.t	Fri Mar 09 15:57:16 2018 +0100
+++ b/tests/test-ssh-proto-unbundle.t	Mon Mar 12 22:47:33 2018 +0900
@@ -93,6 +93,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 115:
   e>     abort: incompatible Mercurial client; bundle2 required\n
   e>     (see https://www.mercurial-scm.org/wiki/IncompatibleClient)\n
@@ -143,6 +144,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 115:
   e>     abort: incompatible Mercurial client; bundle2 required\n
   e>     (see https://www.mercurial-scm.org/wiki/IncompatibleClient)\n
@@ -260,6 +262,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 196:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -316,6 +319,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 196:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -386,6 +390,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 218:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -443,6 +448,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 218:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -514,6 +520,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 202:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -570,6 +577,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 202:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -640,6 +648,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 206:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -697,6 +706,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 206:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -768,6 +778,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 232:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -827,6 +838,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 232:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -900,6 +912,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 193:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -956,6 +969,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 193:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -1026,6 +1040,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 218:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -1085,6 +1100,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 218:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -1158,6 +1174,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 216:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -1217,6 +1234,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 216:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -1296,6 +1314,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 212:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -1353,6 +1372,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 212:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -1425,6 +1445,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 212:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -1482,6 +1503,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 212:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -1556,6 +1578,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 230:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -1615,6 +1638,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 230:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -1697,6 +1721,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 273:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -1760,6 +1785,7 @@
   o> read(1) -> 1: 0
   result: 0
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 273:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -1837,6 +1863,7 @@
   o> read(1) -> 1: 1
   result: 1
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 100:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -1889,6 +1916,7 @@
   o> read(1) -> 1: 1
   result: 1
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 100:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -1967,6 +1995,7 @@
   o> read(1) -> 1: 1
   result: 1
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 152:
   e>     adding changesets\n
   e>     adding manifests\n
@@ -2023,6 +2052,7 @@
   o> read(1) -> 1: 1
   result: 1
   remote output: 
+  o> read(-1) -> 0: 
   e> read(-1) -> 152:
   e>     adding changesets\n
   e>     adding manifests\n