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

Re: [PATCH 2/6] t5538: fix default http port

From
Duy Nguyen <pclouds@gmail.com>
Date
Feb 8, 2014, 07:36 UTC
Message-ID
<CACsJy8CLR4qerWPWs+0TWxnTWidm_VLtYExjKqAOLOSNK0chaA@mail.gmail.com>
In-Reply-To
<20140207234727.GA17520@sigill.intra.peff.net>
On Sat, Feb 8, 2014 at 6:47 AM, Jeff King <peff@peff.net> wrote:
Show 26 quoted lines
> Thinking on this more, I wonder if we should just do something like
> this:
>
> diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
> index bfdff2a..c82b4ee 100644
> --- a/t/lib-httpd.sh
> +++ b/t/lib-httpd.sh
> @@ -64,7 +64,9 @@ case $(uname) in
>  esac
>
>  LIB_HTTPD_PATH=${LIB_HTTPD_PATH-"$DEFAULT_HTTPD_PATH"}
> -LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'8111'}
> +if test -z "$LIB_HTTPD_PORT"; then
> +       LIB_HTTPD_PORT=${this_test#t}
> +fi
>
>  TEST_PATH="$TEST_DIRECTORY"/lib-httpd
>  HTTPD_ROOT_PATH="$PWD"/httpd
>
> and drop the manual LIB_HTTPD_PORT setting in each of the test scripts.
> That would prevent this type of error in the future, and people can
> still override if they want to.
>
> Any test scripts that are not numbered would need to set it, but we
> should not have any of those (and if we did, the failure mode would be
> OK, as Apache would barf on the bogus port number).

Yes! Next stop, attempt to start httpd at start_httpd regardless of GIT_TEST_HTTPD. If successful, test_set_prereq HTTPD or something that the following tests can use. If GIT_TEST_HTTPD is set and start_httpd fails, error out, not set prereq.

-- 
Duy
Previous: Jeff KingNext: Jeff King
Message 7 of 44 in “Fix the shallow deepen bug with no-done”
  1. 0/6 Fix the shallow deepen bug with no-doneNguyễn Thái Ngọc Duy, Feb 6, 2014
  2. 1/6 test: rename http fetch and push test filesNguyễn Thái Ngọc Duy, Feb 6, 2014
  3. Jeff KingFeb 6, 2014
  4. 2/6 t5538: fix default http portNguyễn Thái Ngọc Duy, Feb 6, 2014
  5. Jeff KingFeb 6, 2014
  6. Jeff KingFeb 7, 2014
  7. Duy NguyenFeb 8, 2014
  8. Jeff KingFeb 10, 2014
  9. Junio C HamanoFeb 10, 2014
  10. Jeff KingFeb 10, 2014
  11. Jeff KingFeb 10, 2014
  12. tests: turn on network daemon tests by defaultJeff King, Feb 10, 2014
  13. Junio C HamanoFeb 11, 2014
  14. Jeff KingFeb 11, 2014
  15. Junio C HamanoFeb 11, 2014
  16. Jeff KingFeb 12, 2014
  17. Junio C HamanoFeb 12, 2014
  18. Junio C HamanoFeb 13, 2014
  19. Jeff KingFeb 14, 2014
  20. Junio C HamanoFeb 14, 2014
  21. Junio C HamanoFeb 12, 2014
  22. Jeff KingFeb 12, 2014
  23. Duy NguyenFeb 13, 2014
  24. t5537: move http tests out to t5539Nguyễn Thái Ngọc Duy, Feb 13, 2014
  25. Junio C HamanoFeb 13, 2014
  26. 3/6 pack-protocol.txt: clarify 'obj-id' in the last ACK after 'done'Nguyễn Thái Ngọc Duy, Feb 6, 2014
  27. Junio C HamanoFeb 6, 2014
  28. 4/6 protocol-capabilities.txt: refer multi_ack_detailed back to pack-protocol.txtNguyễn Thái Ngọc Duy, Feb 6, 2014
  29. 5/6 protocol-capabilities.txt: document no-doneNguyễn Thái Ngọc Duy, Feb 6, 2014
  30. Junio C HamanoFeb 6, 2014
  31. Jeff KingFeb 6, 2014
  32. 6/6 fetch-pack: fix deepen shallow over smart http with no-done capNguyễn Thái Ngọc Duy, Feb 6, 2014
  33. Junio C HamanoFeb 6, 2014
  34. Duy NguyenFeb 7, 2014
  35. Eric SunshineFeb 6, 2014
  36. Jeff KingFeb 6, 2014
  37. Junio C HamanoFeb 7, 2014
  38. Duy NguyenFeb 7, 2014
  39. Junio C HamanoFeb 10, 2014
  40. Junio C HamanoFeb 6, 2014
  41. Jeff KingFeb 6, 2014
  42. Duy NguyenFeb 7, 2014
  43. Jonathan NiederFeb 7, 2014
  44. Junio C HamanoFeb 7, 2014

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.