##// END OF EJS Templates
test-http-bad-server: highlight each test with section...
marmoute -
r49453:89485747 default
parent child Browse files
Show More
@@ -36,6 +36,7 b' and because debugging partial responses '
36 > EOF
36 > EOF
37
37
38 Failure to accept() socket should result in connection related error message
38 Failure to accept() socket should result in connection related error message
39 ----------------------------------------------------------------------------
39
40
40 $ hg serve --config badserver.close-before-accept=true -p $HGPORT -d --pid-file=hg.pid
41 $ hg serve --config badserver.close-before-accept=true -p $HGPORT -d --pid-file=hg.pid
41 $ cat hg.pid > $DAEMON_PIDS
42 $ cat hg.pid > $DAEMON_PIDS
@@ -50,6 +51,7 b' So ensure the process is dead.)'
50 $ killdaemons.py $DAEMON_PIDS
51 $ killdaemons.py $DAEMON_PIDS
51
52
52 Failure immediately after accept() should yield connection related error message
53 Failure immediately after accept() should yield connection related error message
54 --------------------------------------------------------------------------------
53
55
54 $ hg serve --config badserver.close-after-accept=true -p $HGPORT -d --pid-file=hg.pid
56 $ hg serve --config badserver.close-after-accept=true -p $HGPORT -d --pid-file=hg.pid
55 $ cat hg.pid > $DAEMON_PIDS
57 $ cat hg.pid > $DAEMON_PIDS
@@ -69,6 +71,7 b' The flakiness in this output was observa'
69 $ killdaemons.py $DAEMON_PIDS
71 $ killdaemons.py $DAEMON_PIDS
70
72
71 Failure to read all bytes in initial HTTP request should yield connection related error message
73 Failure to read all bytes in initial HTTP request should yield connection related error message
74 -----------------------------------------------------------------------------------------------
72
75
73 $ hg serve --config badserver.close-after-recv-bytes=1 -p $HGPORT -d --pid-file=hg.pid -E error.log
76 $ hg serve --config badserver.close-after-recv-bytes=1 -p $HGPORT -d --pid-file=hg.pid -E error.log
74 $ cat hg.pid > $DAEMON_PIDS
77 $ cat hg.pid > $DAEMON_PIDS
@@ -86,6 +89,7 b' Failure to read all bytes in initial HTT'
86 $ rm -f error.log
89 $ rm -f error.log
87
90
88 Same failure, but server reads full HTTP request line
91 Same failure, but server reads full HTTP request line
92 -----------------------------------------------------
89
93
90 $ hg serve --config badserver.close-after-recv-bytes=40 -p $HGPORT -d --pid-file=hg.pid -E error.log
94 $ hg serve --config badserver.close-after-recv-bytes=40 -p $HGPORT -d --pid-file=hg.pid -E error.log
91 $ cat hg.pid > $DAEMON_PIDS
95 $ cat hg.pid > $DAEMON_PIDS
@@ -103,6 +107,7 b' Same failure, but server reads full HTTP'
103 $ rm -f error.log
107 $ rm -f error.log
104
108
105 Failure on subsequent HTTP request on the same socket (cmd?batch)
109 Failure on subsequent HTTP request on the same socket (cmd?batch)
110 -----------------------------------------------------------------
106
111
107 $ hg serve --config badserver.close-after-recv-bytes=210,223 -p $HGPORT -d --pid-file=hg.pid -E error.log
112 $ hg serve --config badserver.close-after-recv-bytes=210,223 -p $HGPORT -d --pid-file=hg.pid -E error.log
108 $ cat hg.pid > $DAEMON_PIDS
113 $ cat hg.pid > $DAEMON_PIDS
@@ -145,6 +150,7 b' Failure on subsequent HTTP request on th'
145 $ rm -f error.log
150 $ rm -f error.log
146
151
147 Failure to read getbundle HTTP request
152 Failure to read getbundle HTTP request
153 --------------------------------------
148
154
149 $ hg serve --config badserver.close-after-recv-bytes=308,317,304 -p $HGPORT -d --pid-file=hg.pid -E error.log
155 $ hg serve --config badserver.close-after-recv-bytes=308,317,304 -p $HGPORT -d --pid-file=hg.pid -E error.log
150 $ cat hg.pid > $DAEMON_PIDS
156 $ cat hg.pid > $DAEMON_PIDS
@@ -212,6 +218,7 b' Failure to read getbundle HTTP request'
212 $ rm -f error.log
218 $ rm -f error.log
213
219
214 Now do a variation using POST to send arguments
220 Now do a variation using POST to send arguments
221 ===============================================
215
222
216 $ hg serve --config experimental.httppostargs=true --config badserver.close-after-recv-bytes=329,344 -p $HGPORT -d --pid-file=hg.pid -E error.log
223 $ hg serve --config experimental.httppostargs=true --config badserver.close-after-recv-bytes=329,344 -p $HGPORT -d --pid-file=hg.pid -E error.log
217 $ cat hg.pid > $DAEMON_PIDS
224 $ cat hg.pid > $DAEMON_PIDS
@@ -270,8 +277,10 b' Now do a variation using POST to send ar'
270 $ rm -f error.log
277 $ rm -f error.log
271
278
272 Now move on to partial server responses
279 Now move on to partial server responses
280 =======================================
273
281
274 Server sends a single character from the HTTP response line
282 Server sends a single character from the HTTP response line
283 -----------------------------------------------------------
275
284
276 $ hg serve --config badserver.close-after-send-bytes=1 -p $HGPORT -d --pid-file=hg.pid -E error.log
285 $ hg serve --config badserver.close-after-send-bytes=1 -p $HGPORT -d --pid-file=hg.pid -E error.log
277 $ cat hg.pid > $DAEMON_PIDS
286 $ cat hg.pid > $DAEMON_PIDS
@@ -303,6 +312,7 b' Server sends a single character from the'
303 $ rm -f error.log
312 $ rm -f error.log
304
313
305 Server sends an incomplete capabilities response body
314 Server sends an incomplete capabilities response body
315 -----------------------------------------------------
306
316
307 $ hg serve --config badserver.close-after-send-bytes=180 -p $HGPORT -d --pid-file=hg.pid -E error.log
317 $ hg serve --config badserver.close-after-send-bytes=180 -p $HGPORT -d --pid-file=hg.pid -E error.log
308 $ cat hg.pid > $DAEMON_PIDS
318 $ cat hg.pid > $DAEMON_PIDS
@@ -341,6 +351,7 b' Server sends an incomplete capabilities '
341 $ rm -f error.log
351 $ rm -f error.log
342
352
343 Server sends incomplete headers for batch request
353 Server sends incomplete headers for batch request
354 -------------------------------------------------
344
355
345 $ hg serve --config badserver.close-after-send-bytes=709 -p $HGPORT -d --pid-file=hg.pid -E error.log
356 $ hg serve --config badserver.close-after-send-bytes=709 -p $HGPORT -d --pid-file=hg.pid -E error.log
346 $ cat hg.pid > $DAEMON_PIDS
357 $ cat hg.pid > $DAEMON_PIDS
@@ -401,6 +412,7 b' TODO this output is horrible'
401 $ rm -f error.log
412 $ rm -f error.log
402
413
403 Server sends an incomplete HTTP response body to batch request
414 Server sends an incomplete HTTP response body to batch request
415 --------------------------------------------------------------
404
416
405 $ hg serve --config badserver.close-after-send-bytes=774 -p $HGPORT -d --pid-file=hg.pid -E error.log
417 $ hg serve --config badserver.close-after-send-bytes=774 -p $HGPORT -d --pid-file=hg.pid -E error.log
406 $ cat hg.pid > $DAEMON_PIDS
418 $ cat hg.pid > $DAEMON_PIDS
@@ -463,6 +475,7 b' TODO client spews a stack due to uncaugh'
463 $ rm -f error.log
475 $ rm -f error.log
464
476
465 Server sends incomplete headers for getbundle response
477 Server sends incomplete headers for getbundle response
478 ------------------------------------------------------
466
479
467 $ hg serve --config badserver.close-after-send-bytes=921 -p $HGPORT -d --pid-file=hg.pid -E error.log
480 $ hg serve --config badserver.close-after-send-bytes=921 -p $HGPORT -d --pid-file=hg.pid -E error.log
468 $ cat hg.pid > $DAEMON_PIDS
481 $ cat hg.pid > $DAEMON_PIDS
@@ -544,6 +557,7 b' TODO this output is terrible'
544 $ rm -f error.log
557 $ rm -f error.log
545
558
546 Server stops before it sends transfer encoding
559 Server stops before it sends transfer encoding
560 ----------------------------------------------
547
561
548 $ hg serve --config badserver.close-after-send-bytes=954 -p $HGPORT -d --pid-file=hg.pid -E error.log
562 $ hg serve --config badserver.close-after-send-bytes=954 -p $HGPORT -d --pid-file=hg.pid -E error.log
549 $ cat hg.pid > $DAEMON_PIDS
563 $ cat hg.pid > $DAEMON_PIDS
@@ -573,6 +587,7 b' Server stops before it sends transfer en'
573 $ rm -f error.log
587 $ rm -f error.log
574
588
575 Server sends empty HTTP body for getbundle
589 Server sends empty HTTP body for getbundle
590 ------------------------------------------
576
591
577 $ hg serve --config badserver.close-after-send-bytes=959 -p $HGPORT -d --pid-file=hg.pid -E error.log
592 $ hg serve --config badserver.close-after-send-bytes=959 -p $HGPORT -d --pid-file=hg.pid -E error.log
578 $ cat hg.pid > $DAEMON_PIDS
593 $ cat hg.pid > $DAEMON_PIDS
@@ -651,6 +666,7 b' Server sends empty HTTP body for getbund'
651 $ rm -f error.log
666 $ rm -f error.log
652
667
653 Server sends partial compression string
668 Server sends partial compression string
669 ---------------------------------------
654
670
655 $ hg serve --config badserver.close-after-send-bytes=983 -p $HGPORT -d --pid-file=hg.pid -E error.log
671 $ hg serve --config badserver.close-after-send-bytes=983 -p $HGPORT -d --pid-file=hg.pid -E error.log
656 $ cat hg.pid > $DAEMON_PIDS
672 $ cat hg.pid > $DAEMON_PIDS
@@ -733,6 +749,7 b' Server sends partial compression string'
733 $ rm -f error.log
749 $ rm -f error.log
734
750
735 Server sends partial bundle2 header magic
751 Server sends partial bundle2 header magic
752 -----------------------------------------
736
753
737 $ hg serve --config badserver.close-after-send-bytes=980 -p $HGPORT -d --pid-file=hg.pid -E error.log
754 $ hg serve --config badserver.close-after-send-bytes=980 -p $HGPORT -d --pid-file=hg.pid -E error.log
738 $ cat hg.pid > $DAEMON_PIDS
755 $ cat hg.pid > $DAEMON_PIDS
@@ -778,6 +795,7 b' Server sends partial bundle2 header magi'
778 $ rm -f error.log
795 $ rm -f error.log
779
796
780 Server sends incomplete bundle2 stream params length
797 Server sends incomplete bundle2 stream params length
798 ----------------------------------------------------
781
799
782 $ hg serve --config badserver.close-after-send-bytes=989 -p $HGPORT -d --pid-file=hg.pid -E error.log
800 $ hg serve --config badserver.close-after-send-bytes=989 -p $HGPORT -d --pid-file=hg.pid -E error.log
783 $ cat hg.pid > $DAEMON_PIDS
801 $ cat hg.pid > $DAEMON_PIDS
@@ -825,6 +843,7 b' Server sends incomplete bundle2 stream p'
825 $ rm -f error.log
843 $ rm -f error.log
826
844
827 Servers stops after bundle2 stream params header
845 Servers stops after bundle2 stream params header
846 ------------------------------------------------
828
847
829 $ hg serve --config badserver.close-after-send-bytes=992 -p $HGPORT -d --pid-file=hg.pid -E error.log
848 $ hg serve --config badserver.close-after-send-bytes=992 -p $HGPORT -d --pid-file=hg.pid -E error.log
830 $ cat hg.pid > $DAEMON_PIDS
849 $ cat hg.pid > $DAEMON_PIDS
@@ -871,6 +890,7 b' Servers stops after bundle2 stream param'
871 $ rm -f error.log
890 $ rm -f error.log
872
891
873 Server stops sending after bundle2 part header length
892 Server stops sending after bundle2 part header length
893 -----------------------------------------------------
874
894
875 $ hg serve --config badserver.close-after-send-bytes=1001 -p $HGPORT -d --pid-file=hg.pid -E error.log
895 $ hg serve --config badserver.close-after-send-bytes=1001 -p $HGPORT -d --pid-file=hg.pid -E error.log
876 $ cat hg.pid > $DAEMON_PIDS
896 $ cat hg.pid > $DAEMON_PIDS
@@ -920,6 +940,7 b' Server stops sending after bundle2 part '
920 $ rm -f error.log
940 $ rm -f error.log
921
941
922 Server stops sending after bundle2 part header
942 Server stops sending after bundle2 part header
943 ----------------------------------------------
923
944
924 $ hg serve --config badserver.close-after-send-bytes=1048 -p $HGPORT -d --pid-file=hg.pid -E error.log
945 $ hg serve --config badserver.close-after-send-bytes=1048 -p $HGPORT -d --pid-file=hg.pid -E error.log
925 $ cat hg.pid > $DAEMON_PIDS
946 $ cat hg.pid > $DAEMON_PIDS
@@ -973,6 +994,7 b' Server stops sending after bundle2 part '
973 $ rm -f error.log
994 $ rm -f error.log
974
995
975 Server stops after bundle2 part payload chunk size
996 Server stops after bundle2 part payload chunk size
997 --------------------------------------------------
976
998
977 $ hg serve --config badserver.close-after-send-bytes=1069 -p $HGPORT -d --pid-file=hg.pid -E error.log
999 $ hg serve --config badserver.close-after-send-bytes=1069 -p $HGPORT -d --pid-file=hg.pid -E error.log
978 $ cat hg.pid > $DAEMON_PIDS
1000 $ cat hg.pid > $DAEMON_PIDS
@@ -1029,6 +1051,7 b' Server stops after bundle2 part payload '
1029 $ rm -f error.log
1051 $ rm -f error.log
1030
1052
1031 Server stops sending in middle of bundle2 payload chunk
1053 Server stops sending in middle of bundle2 payload chunk
1054 -------------------------------------------------------
1032
1055
1033 $ hg serve --config badserver.close-after-send-bytes=1530 -p $HGPORT -d --pid-file=hg.pid -E error.log
1056 $ hg serve --config badserver.close-after-send-bytes=1530 -p $HGPORT -d --pid-file=hg.pid -E error.log
1034 $ cat hg.pid > $DAEMON_PIDS
1057 $ cat hg.pid > $DAEMON_PIDS
@@ -1086,6 +1109,7 b' Server stops sending in middle of bundle'
1086 $ rm -f error.log
1109 $ rm -f error.log
1087
1110
1088 Server stops sending after 0 length payload chunk size
1111 Server stops sending after 0 length payload chunk size
1112 ------------------------------------------------------
1089
1113
1090 $ hg serve --config badserver.close-after-send-bytes=1561 -p $HGPORT -d --pid-file=hg.pid -E error.log
1114 $ hg serve --config badserver.close-after-send-bytes=1561 -p $HGPORT -d --pid-file=hg.pid -E error.log
1091 $ cat hg.pid > $DAEMON_PIDS
1115 $ cat hg.pid > $DAEMON_PIDS
@@ -1147,6 +1171,8 b' Server stops sending after 0 length payl'
1147 $ rm -f error.log
1171 $ rm -f error.log
1148
1172
1149 Server stops sending after 0 part bundle part header (indicating end of bundle2 payload)
1173 Server stops sending after 0 part bundle part header (indicating end of bundle2 payload)
1174 ----------------------------------------------------------------------------------------
1175
1150 This is before the 0 size chunked transfer part that signals end of HTTP response.
1176 This is before the 0 size chunked transfer part that signals end of HTTP response.
1151
1177
1152 $ hg serve --config badserver.close-after-send-bytes=1736 -p $HGPORT -d --pid-file=hg.pid -E error.log
1178 $ hg serve --config badserver.close-after-send-bytes=1736 -p $HGPORT -d --pid-file=hg.pid -E error.log
@@ -1216,6 +1242,7 b' This is before the 0 size chunked transf'
1216 $ rm -rf clone
1242 $ rm -rf clone
1217
1243
1218 Server sends a size 0 chunked-transfer size without terminating \r\n
1244 Server sends a size 0 chunked-transfer size without terminating \r\n
1245 --------------------------------------------------------------------
1219
1246
1220 $ hg serve --config badserver.close-after-send-bytes=1739 -p $HGPORT -d --pid-file=hg.pid -E error.log
1247 $ hg serve --config badserver.close-after-send-bytes=1739 -p $HGPORT -d --pid-file=hg.pid -E error.log
1221 $ cat hg.pid > $DAEMON_PIDS
1248 $ cat hg.pid > $DAEMON_PIDS
General Comments 0
You need to be logged in to leave comments. Login now