##// END OF EJS Templates
tests: suppress read(-1) -> '' calls in fileobjectobserver...
Augie Fackler -
r38334:565074cc default
parent child Browse files
Show More
@@ -450,6 +450,7 b' test-sparse-verbose-json.t'
450 test-sparse.t
450 test-sparse.t
451 test-split.t
451 test-split.t
452 test-ssh-clone-r.t
452 test-ssh-clone-r.t
453 test-ssh-proto-unbundle.t
453 test-ssh-proto.t
454 test-ssh-proto.t
454 test-sshserver.py
455 test-sshserver.py
455 test-stack.t
456 test-stack.t
@@ -782,6 +782,13 b' class fileobjectobserver(baseproxyobserv'
782 if res is None:
782 if res is None:
783 res = ''
783 res = ''
784
784
785 if size == -1 and res == '':
786 # Suppress pointless read(-1) calls that return
787 # nothing. These happen _a lot_ on Python 3, and there
788 # doesn't seem to be a better workaround to have matching
789 # Python 2 and 3 behavior. :(
790 return
791
785 if self.logdataapis:
792 if self.logdataapis:
786 self.fh.write('%s> read(%d) -> %d' % (self.name, size, len(res)))
793 self.fh.write('%s> read(%d) -> %d' % (self.name, size, len(res)))
787
794
@@ -93,7 +93,6 b' Test pushing bundle1 payload to a server'
93 o> read(1) -> 1: 0
93 o> read(1) -> 1: 0
94 result: 0
94 result: 0
95 remote output:
95 remote output:
96 o> read(-1) -> 0:
97 e> read(-1) -> 115:
96 e> read(-1) -> 115:
98 e> abort: incompatible Mercurial client; bundle2 required\n
97 e> abort: incompatible Mercurial client; bundle2 required\n
99 e> (see https://www.mercurial-scm.org/wiki/IncompatibleClient)\n
98 e> (see https://www.mercurial-scm.org/wiki/IncompatibleClient)\n
@@ -144,7 +143,6 b' Test pushing bundle1 payload to a server'
144 o> read(1) -> 1: 0
143 o> read(1) -> 1: 0
145 result: 0
144 result: 0
146 remote output:
145 remote output:
147 o> read(-1) -> 0:
148 e> read(-1) -> 115:
146 e> read(-1) -> 115:
149 e> abort: incompatible Mercurial client; bundle2 required\n
147 e> abort: incompatible Mercurial client; bundle2 required\n
150 e> (see https://www.mercurial-scm.org/wiki/IncompatibleClient)\n
148 e> (see https://www.mercurial-scm.org/wiki/IncompatibleClient)\n
@@ -274,7 +272,6 b' ui.write() in hook is redirected to stde'
274 o> read(1) -> 1: 0
272 o> read(1) -> 1: 0
275 result: 0
273 result: 0
276 remote output:
274 remote output:
277 o> read(-1) -> 0:
278 e> read(-1) -> 196:
275 e> read(-1) -> 196:
279 e> adding changesets\n
276 e> adding changesets\n
280 e> adding manifests\n
277 e> adding manifests\n
@@ -331,7 +328,6 b' ui.write() in hook is redirected to stde'
331 o> read(1) -> 1: 0
328 o> read(1) -> 1: 0
332 result: 0
329 result: 0
333 remote output:
330 remote output:
334 o> read(-1) -> 0:
335 e> read(-1) -> 196:
331 e> read(-1) -> 196:
336 e> adding changesets\n
332 e> adding changesets\n
337 e> adding manifests\n
333 e> adding manifests\n
@@ -402,7 +398,6 b' And a variation that writes multiple lin'
402 o> read(1) -> 1: 0
398 o> read(1) -> 1: 0
403 result: 0
399 result: 0
404 remote output:
400 remote output:
405 o> read(-1) -> 0:
406 e> read(-1) -> 218:
401 e> read(-1) -> 218:
407 e> adding changesets\n
402 e> adding changesets\n
408 e> adding manifests\n
403 e> adding manifests\n
@@ -460,7 +455,6 b' And a variation that writes multiple lin'
460 o> read(1) -> 1: 0
455 o> read(1) -> 1: 0
461 result: 0
456 result: 0
462 remote output:
457 remote output:
463 o> read(-1) -> 0:
464 e> read(-1) -> 218:
458 e> read(-1) -> 218:
465 e> adding changesets\n
459 e> adding changesets\n
466 e> adding manifests\n
460 e> adding manifests\n
@@ -532,7 +526,6 b' And a variation that does a ui.flush() a'
532 o> read(1) -> 1: 0
526 o> read(1) -> 1: 0
533 result: 0
527 result: 0
534 remote output:
528 remote output:
535 o> read(-1) -> 0:
536 e> read(-1) -> 202:
529 e> read(-1) -> 202:
537 e> adding changesets\n
530 e> adding changesets\n
538 e> adding manifests\n
531 e> adding manifests\n
@@ -589,7 +582,6 b' And a variation that does a ui.flush() a'
589 o> read(1) -> 1: 0
582 o> read(1) -> 1: 0
590 result: 0
583 result: 0
591 remote output:
584 remote output:
592 o> read(-1) -> 0:
593 e> read(-1) -> 202:
585 e> read(-1) -> 202:
594 e> adding changesets\n
586 e> adding changesets\n
595 e> adding manifests\n
587 e> adding manifests\n
@@ -660,7 +652,6 b' Multiple writes + flush'
660 o> read(1) -> 1: 0
652 o> read(1) -> 1: 0
661 result: 0
653 result: 0
662 remote output:
654 remote output:
663 o> read(-1) -> 0:
664 e> read(-1) -> 206:
655 e> read(-1) -> 206:
665 e> adding changesets\n
656 e> adding changesets\n
666 e> adding manifests\n
657 e> adding manifests\n
@@ -718,7 +709,6 b' Multiple writes + flush'
718 o> read(1) -> 1: 0
709 o> read(1) -> 1: 0
719 result: 0
710 result: 0
720 remote output:
711 remote output:
721 o> read(-1) -> 0:
722 e> read(-1) -> 206:
712 e> read(-1) -> 206:
723 e> adding changesets\n
713 e> adding changesets\n
724 e> adding manifests\n
714 e> adding manifests\n
@@ -790,7 +780,6 b' ui.write() + ui.write_err() output is ca'
790 o> read(1) -> 1: 0
780 o> read(1) -> 1: 0
791 result: 0
781 result: 0
792 remote output:
782 remote output:
793 o> read(-1) -> 0:
794 e> read(-1) -> 232:
783 e> read(-1) -> 232:
795 e> adding changesets\n
784 e> adding changesets\n
796 e> adding manifests\n
785 e> adding manifests\n
@@ -850,7 +839,6 b' ui.write() + ui.write_err() output is ca'
850 o> read(1) -> 1: 0
839 o> read(1) -> 1: 0
851 result: 0
840 result: 0
852 remote output:
841 remote output:
853 o> read(-1) -> 0:
854 e> read(-1) -> 232:
842 e> read(-1) -> 232:
855 e> adding changesets\n
843 e> adding changesets\n
856 e> adding manifests\n
844 e> adding manifests\n
@@ -924,7 +912,6 b' print() output is captured'
924 o> read(1) -> 1: 0
912 o> read(1) -> 1: 0
925 result: 0
913 result: 0
926 remote output:
914 remote output:
927 o> read(-1) -> 0:
928 e> read(-1) -> 193:
915 e> read(-1) -> 193:
929 e> adding changesets\n
916 e> adding changesets\n
930 e> adding manifests\n
917 e> adding manifests\n
@@ -981,7 +968,6 b' print() output is captured'
981 o> read(1) -> 1: 0
968 o> read(1) -> 1: 0
982 result: 0
969 result: 0
983 remote output:
970 remote output:
984 o> read(-1) -> 0:
985 e> read(-1) -> 193:
971 e> read(-1) -> 193:
986 e> adding changesets\n
972 e> adding changesets\n
987 e> adding manifests\n
973 e> adding manifests\n
@@ -1052,7 +1038,6 b' Mixed print() and ui.write() are both ca'
1052 o> read(1) -> 1: 0
1038 o> read(1) -> 1: 0
1053 result: 0
1039 result: 0
1054 remote output:
1040 remote output:
1055 o> read(-1) -> 0:
1056 e> read(-1) -> 218:
1041 e> read(-1) -> 218:
1057 e> adding changesets\n
1042 e> adding changesets\n
1058 e> adding manifests\n
1043 e> adding manifests\n
@@ -1112,7 +1097,6 b' Mixed print() and ui.write() are both ca'
1112 o> read(1) -> 1: 0
1097 o> read(1) -> 1: 0
1113 result: 0
1098 result: 0
1114 remote output:
1099 remote output:
1115 o> read(-1) -> 0:
1116 e> read(-1) -> 218:
1100 e> read(-1) -> 218:
1117 e> adding changesets\n
1101 e> adding changesets\n
1118 e> adding manifests\n
1102 e> adding manifests\n
@@ -1186,7 +1170,6 b' print() to stdout and stderr both get ca'
1186 o> read(1) -> 1: 0
1170 o> read(1) -> 1: 0
1187 result: 0
1171 result: 0
1188 remote output:
1172 remote output:
1189 o> read(-1) -> 0:
1190 e> read(-1) -> 216:
1173 e> read(-1) -> 216:
1191 e> adding changesets\n
1174 e> adding changesets\n
1192 e> adding manifests\n
1175 e> adding manifests\n
@@ -1246,7 +1229,6 b' print() to stdout and stderr both get ca'
1246 o> read(1) -> 1: 0
1229 o> read(1) -> 1: 0
1247 result: 0
1230 result: 0
1248 remote output:
1231 remote output:
1249 o> read(-1) -> 0:
1250 e> read(-1) -> 216:
1232 e> read(-1) -> 216:
1251 e> adding changesets\n
1233 e> adding changesets\n
1252 e> adding manifests\n
1234 e> adding manifests\n
@@ -1326,7 +1308,6 b' Shell hook writing to stdout has output '
1326 o> read(1) -> 1: 0
1308 o> read(1) -> 1: 0
1327 result: 0
1309 result: 0
1328 remote output:
1310 remote output:
1329 o> read(-1) -> 0:
1330 e> read(-1) -> 212:
1311 e> read(-1) -> 212:
1331 e> adding changesets\n
1312 e> adding changesets\n
1332 e> adding manifests\n
1313 e> adding manifests\n
@@ -1384,7 +1365,6 b' Shell hook writing to stdout has output '
1384 o> read(1) -> 1: 0
1365 o> read(1) -> 1: 0
1385 result: 0
1366 result: 0
1386 remote output:
1367 remote output:
1387 o> read(-1) -> 0:
1388 e> read(-1) -> 212:
1368 e> read(-1) -> 212:
1389 e> adding changesets\n
1369 e> adding changesets\n
1390 e> adding manifests\n
1370 e> adding manifests\n
@@ -1457,7 +1437,6 b' Shell hook writing to stderr has output '
1457 o> read(1) -> 1: 0
1437 o> read(1) -> 1: 0
1458 result: 0
1438 result: 0
1459 remote output:
1439 remote output:
1460 o> read(-1) -> 0:
1461 e> read(-1) -> 212:
1440 e> read(-1) -> 212:
1462 e> adding changesets\n
1441 e> adding changesets\n
1463 e> adding manifests\n
1442 e> adding manifests\n
@@ -1515,7 +1494,6 b' Shell hook writing to stderr has output '
1515 o> read(1) -> 1: 0
1494 o> read(1) -> 1: 0
1516 result: 0
1495 result: 0
1517 remote output:
1496 remote output:
1518 o> read(-1) -> 0:
1519 e> read(-1) -> 212:
1497 e> read(-1) -> 212:
1520 e> adding changesets\n
1498 e> adding changesets\n
1521 e> adding manifests\n
1499 e> adding manifests\n
@@ -1590,7 +1568,6 b' Shell hook writing to stdout and stderr '
1590 o> read(1) -> 1: 0
1568 o> read(1) -> 1: 0
1591 result: 0
1569 result: 0
1592 remote output:
1570 remote output:
1593 o> read(-1) -> 0:
1594 e> read(-1) -> 230:
1571 e> read(-1) -> 230:
1595 e> adding changesets\n
1572 e> adding changesets\n
1596 e> adding manifests\n
1573 e> adding manifests\n
@@ -1650,7 +1627,6 b' Shell hook writing to stdout and stderr '
1650 o> read(1) -> 1: 0
1627 o> read(1) -> 1: 0
1651 result: 0
1628 result: 0
1652 remote output:
1629 remote output:
1653 o> read(-1) -> 0:
1654 e> read(-1) -> 230:
1630 e> read(-1) -> 230:
1655 e> adding changesets\n
1631 e> adding changesets\n
1656 e> adding manifests\n
1632 e> adding manifests\n
@@ -1733,7 +1709,6 b' Shell and Python hooks writing to stdout'
1733 o> read(1) -> 1: 0
1709 o> read(1) -> 1: 0
1734 result: 0
1710 result: 0
1735 remote output:
1711 remote output:
1736 o> read(-1) -> 0:
1737 e> read(-1) -> 273:
1712 e> read(-1) -> 273:
1738 e> adding changesets\n
1713 e> adding changesets\n
1739 e> adding manifests\n
1714 e> adding manifests\n
@@ -1797,7 +1772,6 b' Shell and Python hooks writing to stdout'
1797 o> read(1) -> 1: 0
1772 o> read(1) -> 1: 0
1798 result: 0
1773 result: 0
1799 remote output:
1774 remote output:
1800 o> read(-1) -> 0:
1801 e> read(-1) -> 273:
1775 e> read(-1) -> 273:
1802 e> adding changesets\n
1776 e> adding changesets\n
1803 e> adding manifests\n
1777 e> adding manifests\n
@@ -1875,7 +1849,6 b' Pushing a bundle1 with no output'
1875 o> read(1) -> 1: 1
1849 o> read(1) -> 1: 1
1876 result: 1
1850 result: 1
1877 remote output:
1851 remote output:
1878 o> read(-1) -> 0:
1879 e> read(-1) -> 100:
1852 e> read(-1) -> 100:
1880 e> adding changesets\n
1853 e> adding changesets\n
1881 e> adding manifests\n
1854 e> adding manifests\n
@@ -1928,7 +1901,6 b' Pushing a bundle1 with no output'
1928 o> read(1) -> 1: 1
1901 o> read(1) -> 1: 1
1929 result: 1
1902 result: 1
1930 remote output:
1903 remote output:
1931 o> read(-1) -> 0:
1932 e> read(-1) -> 100:
1904 e> read(-1) -> 100:
1933 e> adding changesets\n
1905 e> adding changesets\n
1934 e> adding manifests\n
1906 e> adding manifests\n
@@ -2007,7 +1979,6 b' Pushing a bundle1 with ui.write() and ui'
2007 o> read(1) -> 1: 1
1979 o> read(1) -> 1: 1
2008 result: 1
1980 result: 1
2009 remote output:
1981 remote output:
2010 o> read(-1) -> 0:
2011 e> read(-1) -> 152:
1982 e> read(-1) -> 152:
2012 e> adding changesets\n
1983 e> adding changesets\n
2013 e> adding manifests\n
1984 e> adding manifests\n
@@ -2064,7 +2035,6 b' Pushing a bundle1 with ui.write() and ui'
2064 o> read(1) -> 1: 1
2035 o> read(1) -> 1: 1
2065 result: 1
2036 result: 1
2066 remote output:
2037 remote output:
2067 o> read(-1) -> 0:
2068 e> read(-1) -> 152:
2038 e> read(-1) -> 152:
2069 e> adding changesets\n
2039 e> adding changesets\n
2070 e> adding manifests\n
2040 e> adding manifests\n
@@ -1154,7 +1154,6 b' Multiple upgrades is not allowed'
1154 i> hello\n
1154 i> hello\n
1155 o> readline() -> 1:
1155 o> readline() -> 1:
1156 o> \n
1156 o> \n
1157 o> read(-1) -> 0:
1158 e> read(-1) -> 42:
1157 e> read(-1) -> 42:
1159 e> cannot upgrade protocols multiple times\n
1158 e> cannot upgrade protocols multiple times\n
1160 e> -\n
1159 e> -\n
@@ -1246,7 +1245,6 b' Upgrade request must be followed by hell'
1246 i> invalid\n
1245 i> invalid\n
1247 o> readline() -> 1:
1246 o> readline() -> 1:
1248 o> \n
1247 o> \n
1249 o> read(-1) -> 0:
1250 e> read(-1) -> 46:
1248 e> read(-1) -> 46:
1251 e> malformed handshake protocol: missing hello\n
1249 e> malformed handshake protocol: missing hello\n
1252 e> -\n
1250 e> -\n
@@ -1266,7 +1264,6 b' Upgrade request must be followed by hell'
1266 i> invalid\n
1264 i> invalid\n
1267 o> readline() -> 1:
1265 o> readline() -> 1:
1268 o> \n
1266 o> \n
1269 o> read(-1) -> 0:
1270 e> read(-1) -> 48:
1267 e> read(-1) -> 48:
1271 e> malformed handshake protocol: missing between\n
1268 e> malformed handshake protocol: missing between\n
1272 e> -\n
1269 e> -\n
@@ -1288,7 +1285,6 b' Upgrade request must be followed by hell'
1288 i> invalid\n
1285 i> invalid\n
1289 o> readline() -> 1:
1286 o> readline() -> 1:
1290 o> \n
1287 o> \n
1291 o> read(-1) -> 0:
1292 e> read(-1) -> 49:
1288 e> read(-1) -> 49:
1293 e> malformed handshake protocol: missing pairs 81\n
1289 e> malformed handshake protocol: missing pairs 81\n
1294 e> -\n
1290 e> -\n
General Comments 0
You need to be logged in to leave comments. Login now