[PATCH 3 of 6] tests: add tests for poorly behaving HTTP server
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Mon Apr 17 15:11:09 EDT 2017
On 04/14/2017 09:44 AM, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1492147168 25200
> # Thu Apr 13 22:19:28 2017 -0700
> # Node ID 80bd24abcf67d5dc8b5f5bf83c796e1f71fc5bd9
> # Parent 283a95fe4ce5b91af4e2ed8ed1d3fe18ef3544bb
> tests: add tests for poorly behaving HTTP server
I'm seeing failure for the test introduced by this test. I had no time
to investigated further, the machine is a power8 running centos7:
Linux gcc2-power8.osuosl.org 3.10.0-514.10.2.el7.ppc64le #1 SMP Fri Mar
3 16:16:38 GMT 2017 ppc64le ppc64le ppc64le GNU/Linux
Observed failure:
> --- /home/marmoute/mercurial-testing/tests/test-http-bad-server.t
> +++ /home/marmoute/mercurial-testing/tests/test-http-bad-server.t.err
> @@ -105,9 +105,9 @@
> readline(210 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
> readline(177 from -1) -> (27) Accept-Encoding: identity\r\n
> readline(150 from -1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(115 from -1) -> (23) host: localhost:$HGPORT\r\n
> - readline(92 from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> - readline(43 from -1) -> (2) \r\n
> + readline(115 from -1) -> (22) host: localhost:$HGPORT\r\n
> + readline(93 from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> + readline(44 from -1) -> (2) \r\n
> write(36) -> HTTP/1.1 200 Script output follows\r\n
> write(23) -> Server: badhttpserver\r\n
> write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
> @@ -115,8 +115,8 @@
> write(21) -> Content-Length: 405\r\n
> write(2) -> \r\n
> write(405) -> lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
> - readline(41 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
> - readline(15 from -1) -> (15) Accept-Encoding
> + readline(42 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
> + readline(16 from -1) -> (16) Accept-Encoding:
> read limit reached; closing socket
> readline(210 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
> readline(184 from -1) -> (27) Accept-Encoding: identity\r\n
> @@ -144,9 +144,9 @@
> readline(292 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
> readline(259 from -1) -> (27) Accept-Encoding: identity\r\n
> readline(232 from -1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(197 from -1) -> (23) host: localhost:$HGPORT\r\n
> - readline(174 from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> - readline(125 from -1) -> (2) \r\n
> + readline(197 from -1) -> (22) host: localhost:$HGPORT\r\n
> + readline(175 from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> + readline(126 from -1) -> (2) \r\n
> write(36) -> HTTP/1.1 200 Script output follows\r\n
> write(23) -> Server: badhttpserver\r\n
> write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
> @@ -154,10 +154,11 @@
> write(21) -> Content-Length: 405\r\n
> write(2) -> \r\n
> write(405) -> lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
> - readline(123 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
> - readline(97 from -1) -> (27) Accept-Encoding: identity\r\n
> - readline(70 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
> - readline(41 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
> + readline(124 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
> + readline(98 from -1) -> (27) Accept-Encoding: identity\r\n
> + readline(71 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
> + readline(42 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
> + readline(1 from -1) -> (1) x
> read limit reached; closing socket
> readline(292 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
> readline(266 from -1) -> (27) Accept-Encoding: identity\r\n
> @@ -165,9 +166,9 @@
> readline(210 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
> readline(169 from -1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
> readline(121 from -1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(86 from -1) -> (23) host: localhost:$HGPORT\r\n
> - readline(63 from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> - readline(14 from -1) -> (2) \r\n
> + readline(86 from -1) -> (22) host: localhost:$HGPORT\r\n
> + readline(64 from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> + readline(15 from -1) -> (2) \r\n
> write(36) -> HTTP/1.1 200 Script output follows\r\n
> write(23) -> Server: badhttpserver\r\n
> write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
> @@ -175,7 +176,7 @@
> write(20) -> Content-Length: 42\r\n
> write(2) -> \r\n
> write(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
> - readline(12 from 65537) -> (12) GET /?cmd=ge
> + readline(13 from 65537) -> (13) GET /?cmd=get
> read limit reached; closing socket
> readline(292 from 65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
> readline(262 from -1) -> (27) Accept-Encoding: identity\r\n
> @@ -200,9 +201,9 @@
> readline(315 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
> readline(282 from -1) -> (27) Accept-Encoding: identity\r\n
> readline(255 from -1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(220 from -1) -> (23) host: localhost:$HGPORT\r\n
> - readline(197 from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> - readline(148 from -1) -> (2) \r\n
> + readline(220 from -1) -> (22) host: localhost:$HGPORT\r\n
> + readline(198 from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> + readline(149 from -1) -> (2) \r\n
> write(36) -> HTTP/1.1 200 Script output follows\r\n
> write(23) -> Server: badhttpserver\r\n
> write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
> @@ -210,12 +211,12 @@
> write(21) -> Content-Length: 418\r\n
> write(2) -> \r\n
> write(418) -> lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httppostargs httpmediatype=0.1rx,0.1tx,0.2tx compression=none
> - readline(146 from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n
> - readline(119 from -1) -> (27) Accept-Encoding: identity\r\n
> - readline(92 from -1) -> (41) content-type: application/mercurial-0.1\r\n
> - readline(51 from -1) -> (19) vary: X-HgProto-1\r\n
> - readline(32 from -1) -> (19) x-hgargs-post: 28\r\n
> - readline(13 from -1) -> (13) x-hgproto-1:
> + readline(147 from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n
> + readline(120 from -1) -> (27) Accept-Encoding: identity\r\n
> + readline(93 from -1) -> (41) content-type: application/mercurial-0.1\r\n
> + readline(52 from -1) -> (19) vary: X-HgProto-1\r\n
> + readline(33 from -1) -> (19) x-hgargs-post: 28\r\n
> + readline(14 from -1) -> (14) x-hgproto-1: 0
> read limit reached; closing socket
> readline(315 from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n
> readline(288 from -1) -> (27) Accept-Encoding: identity\r\n
> @@ -225,10 +226,10 @@
> readline(182 from -1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
> readline(134 from -1) -> (35) accept: application/mercurial-0.1\r\n
> readline(99 from -1) -> (20) content-length: 28\r\n
> - readline(79 from -1) -> (23) host: localhost:$HGPORT\r\n
> - readline(56 from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> - readline(7 from -1) -> (2) \r\n
> - read(5 from 28) -> (5) cmds=
> + readline(79 from -1) -> (22) host: localhost:$HGPORT\r\n
> + readline(57 from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> + readline(8 from -1) -> (2) \r\n
> + read(6 from 28) -> (6) cmds=h
> read limit reached, closing socket
> write(36) -> HTTP/1.1 500 Internal Server Error\r\n
>
> @@ -251,7 +252,7 @@
> readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
> readline(-1) -> (27) Accept-Encoding: identity\r\n
> readline(-1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(-1) -> (23) host: localhost:$HGPORT\r\n
> + readline(-1) -> (22) host: localhost:$HGPORT\r\n
> readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> readline(-1) -> (2) \r\n
> write(1 from 36) -> (0) H
> @@ -276,7 +277,7 @@
> readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
> readline(-1) -> (27) Accept-Encoding: identity\r\n
> readline(-1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(-1) -> (23) host: localhost:$HGPORT\r\n
> + readline(-1) -> (22) host: localhost:$HGPORT\r\n
> readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> readline(-1) -> (2) \r\n
> write(36 from 36) -> (144) HTTP/1.1 200 Script output follows\r\n
> @@ -311,7 +312,7 @@
> readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
> readline(-1) -> (27) Accept-Encoding: identity\r\n
> readline(-1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(-1) -> (23) host: localhost:$HGPORT\r\n
> + readline(-1) -> (22) host: localhost:$HGPORT\r\n
> readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> readline(-1) -> (2) \r\n
> write(36 from 36) -> (659) HTTP/1.1 200 Script output follows\r\n
> @@ -327,7 +328,7 @@
> readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
> readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
> readline(-1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(-1) -> (23) host: localhost:$HGPORT\r\n
> + readline(-1) -> (22) host: localhost:$HGPORT\r\n
> readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> readline(-1) -> (2) \r\n
> write(36 from 36) -> (94) HTTP/1.1 200 Script output follows\r\n
> @@ -354,7 +355,7 @@
> readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
> readline(-1) -> (27) Accept-Encoding: identity\r\n
> readline(-1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(-1) -> (23) host: localhost:$HGPORT\r\n
> + readline(-1) -> (22) host: localhost:$HGPORT\r\n
> readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> readline(-1) -> (2) \r\n
> write(36 from 36) -> (724) HTTP/1.1 200 Script output follows\r\n
> @@ -370,7 +371,7 @@
> readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
> readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
> readline(-1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(-1) -> (23) host: localhost:$HGPORT\r\n
> + readline(-1) -> (22) host: localhost:$HGPORT\r\n
> readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> readline(-1) -> (2) \r\n
> write(36 from 36) -> (159) HTTP/1.1 200 Script output follows\r\n
> @@ -406,7 +407,7 @@
> readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
> readline(-1) -> (27) Accept-Encoding: identity\r\n
> readline(-1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(-1) -> (23) host: localhost:$HGPORT\r\n
> + readline(-1) -> (22) host: localhost:$HGPORT\r\n
> readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> readline(-1) -> (2) \r\n
> write(36 from 36) -> (859) HTTP/1.1 200 Script output follows\r\n
> @@ -422,7 +423,7 @@
> readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
> readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
> readline(-1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(-1) -> (23) host: localhost:$HGPORT\r\n
> + readline(-1) -> (22) host: localhost:$HGPORT\r\n
> readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> readline(-1) -> (2) \r\n
> write(36 from 36) -> (294) HTTP/1.1 200 Script output follows\r\n
> @@ -438,7 +439,7 @@
> readline(-1) -> (396) x-hgarg-1: bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
> readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
> readline(-1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(-1) -> (23) host: localhost:$HGPORT\r\n
> + readline(-1) -> (22) host: localhost:$HGPORT\r\n
> readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> readline(-1) -> (2) \r\n
> write(36 from 36) -> (93) HTTP/1.1 200 Script output follows\r\n
> @@ -467,7 +468,7 @@
> readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
> readline(-1) -> (27) Accept-Encoding: identity\r\n
> readline(-1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(-1) -> (23) host: localhost:$HGPORT\r\n
> + readline(-1) -> (22) host: localhost:$HGPORT\r\n
> readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> readline(-1) -> (2) \r\n
> write(36 from 36) -> (897) HTTP/1.1 200 Script output follows\r\n
> @@ -483,7 +484,7 @@
> readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
> readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
> readline(-1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(-1) -> (23) host: localhost:$HGPORT\r\n
> + readline(-1) -> (22) host: localhost:$HGPORT\r\n
> readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> readline(-1) -> (2) \r\n
> write(36 from 36) -> (332) HTTP/1.1 200 Script output follows\r\n
> @@ -499,7 +500,7 @@
> readline(-1) -> (396) x-hgarg-1: bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
> readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
> readline(-1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(-1) -> (23) host: localhost:$HGPORT\r\n
> + readline(-1) -> (22) host: localhost:$HGPORT\r\n
> readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> readline(-1) -> (2) \r\n
> write(36 from 36) -> (131) HTTP/1.1 200 Script output follows\r\n
> @@ -530,7 +531,7 @@
> readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
> readline(-1) -> (27) Accept-Encoding: identity\r\n
> readline(-1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(-1) -> (23) host: localhost:$HGPORT\r\n
> + readline(-1) -> (22) host: localhost:$HGPORT\r\n
> readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> readline(-1) -> (2) \r\n
> write(36 from 36) -> (909) HTTP/1.1 200 Script output follows\r\n
> @@ -546,7 +547,7 @@
> readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
> readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
> readline(-1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(-1) -> (23) host: localhost:$HGPORT\r\n
> + readline(-1) -> (22) host: localhost:$HGPORT\r\n
> readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> readline(-1) -> (2) \r\n
> write(36 from 36) -> (344) HTTP/1.1 200 Script output follows\r\n
> @@ -562,7 +563,7 @@
> readline(-1) -> (396) x-hgarg-1: bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
> readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n
> readline(-1) -> (35) accept: application/mercurial-0.1\r\n
> - readline(-1) -> (23) host: localhost:$HGPORT\r\n
> + readline(-1) -> (22) host: localhost:$HGPORT\r\n
> readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
> readline(-1) -> (2) \r\n
> write(36 from 36) -> (143) HTTP/1.1 200 Script output follows\r\n
>
> ERROR: test-http-bad-server.t output changed
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list