git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/16] http test bug potpourri

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 23, 2023, 23:37 UTC
Message-ID
<xmqq8rgo3qe6.fsf@gitster.g>
In-Reply-To
<Y/dEYYWKy/o96vBG@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 43 quoted lines
> So all I wanted to do was this one-liner:
>
> diff --git a/t/t5559-http-fetch-smart-http2.sh b/t/t5559-http-fetch-smart-http2.sh
> index 9eece71c2c..54aa9d3bff 100755
> --- a/t/t5559-http-fetch-smart-http2.sh
> +++ b/t/t5559-http-fetch-smart-http2.sh
> @@ -1,4 +1,5 @@
>  #!/bin/sh
>  
>  HTTP_PROTO=HTTP/2
> +LIB_HTTPD_SSL=1
>  . ./t5551-http-fetch-smart.sh
>
> but somehow I'm 16 patches deep. Let me back up.
>
> I got bit once again by the "oops, HTTP/2 tests in t5559 are sometimes
> flaky" bug. One thing that came up in earlier discussion is that HTTP/2
> over TLS should be much more reliable, because it doesn't have to go
> through the funny HTTP-upgrade path.
>
> Hence the patch above, which is also patch 16 here. And it does make the
> consistent failure of t5551.30 go away. And it even makes --stress work
> longer before a racy failure, though it still fails for me pretty
> consistently within a few dozen runs.
>
> But in doing so, I found out all sorts of neat things, like:
>
>   - when I tested with HTTP/2 and TLS before, I was accidentally not
>     using HTTP/2!
>
>   - we even have a test that should detect which version is used, but
>     it's a silent noop unless you set GIT_TEST_PROTOCOL_VERSION=0, which
>     clearly nobody does
>
>   - it turns out there are a bunch of tests which are skipped (some of
>     which even fail!) unless you set that variable
>
> So this series fixes the broken tests, adapts them to work with both v0
> and v2 Git protocol, makes them work with HTTP/2 when needed, sprinkles
> in a couple other fixes, and then finally does that one-liner.
>
> I'm actually not sure if the final patch is a good idea or not, but
> certainly all of the fixes leading up to it are worth doing.

Thanks; this must have been a lot of work. From the "test what the end users use, or at least something close to it" standpoint, 16/16 certainly is the right thing to do, I would think.

Previous: Jeff KingNext: Jeff King
Message 22 of 24 in “http test bug potpourri”
  1. 0/16 http test bug potpourriJeff King, Feb 23, 2023
  2. 01/16 t5541: run "used receive-pack service" test earlierJeff King, Feb 23, 2023
  3. 02/16 t5541: stop marking "used receive-pack service" test as v0 onlyJeff King, Feb 23, 2023
  4. 03/16 t5541: simplify and move "no empty path components" testJeff King, Feb 23, 2023
  5. Junio C HamanoFeb 23, 2023
  6. Jeff KingFeb 24, 2023
  7. 04/16 t5551: drop redundant grep for Accept-LanguageJeff King, Feb 23, 2023
  8. Junio C HamanoFeb 23, 2023
  9. 05/16 t5551: lower-case headers in expected curl traceJeff King, Feb 23, 2023
  10. 06/16 t5551: handle HTTP/2 when checking curl traceJeff King, Feb 23, 2023
  11. 07/16 t5551: stop forcing clone to run with v0 protocolJeff King, Feb 23, 2023
  12. 08/16 t5551: handle v2 protocol when checking curl traceJeff King, Feb 23, 2023
  13. 09/16 t5551: handle v2 protocol in upload-pack service testJeff King, Feb 23, 2023
  14. 10/16 t5551: simplify expected cookie fileJeff King, Feb 23, 2023
  15. 11/16 t5551: handle v2 protocol in cookie testJeff King, Feb 23, 2023
  16. 12/16 t5551: drop curl trace lines without headersJeff King, Feb 23, 2023
  17. 13/16 t/lib-httpd: respect $HTTPD_PROTO in expect_askpass()Jeff King, Feb 23, 2023
  18. 14/16 t/lib-httpd: enable HTTP/2 "h2" protocol, not just h2cJeff King, Feb 23, 2023
  19. Junio C HamanoFeb 23, 2023
  20. 15/16 t5559: fix test failures with LIB_HTTPD_SSLJeff King, Feb 23, 2023
  21. 16/16 t5559: make SSL/TLS the defaultJeff King, Feb 23, 2023
  22. Junio C HamanoFeb 23, 2023
  23. Jeff KingFeb 24, 2023
  24. Junio C HamanoFeb 24, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.