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

Re: [PATCH 1/9] git p4 test: wait longer for p4d to start

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 26, 2012, 03:46 UTC
Message-ID
<7vbok6enw3.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1340673505-10551-2-git-send-email-pw@padd.com>
Pete Wyckoff <pw@padd.com> writes:
> Running tests at high parallelism on a slow machine, 5 sec is
> not enough to wait for p4d to start.  Change it to 10 sec.
>
> Signed-off-by: Pete Wyckoff <pw@padd.com>

I'd rather not to see this kind of incremental micro-tweaks. The next person who runs on an even slower box or with more excessive parallelism compared to his machine size may complain and send a patch to raise this to 20.

Who are we trying to help, and if you raised this to "forever", whom would such a change be hurting? If there is something wrong with the p4 installation, it may never come up, but an interactive user will eventually end up seeing "waiting for p4d to start" and nothing else in such a case, and will know to kill it with ^C. An automated test spawned from a cron job would definitely be hurt with a timeout of "forever", but to them, 10 seconds or 10 minutes would not make much of practical differences (as long as you do not run such a cron job too often).

My preference would probably be a very long default that can be shortened (or lengthened) with an environment variable, so that a frequent auto-builder that runs the tests every five minutes can tune it down to 30 seconds, or something like that.

Show 16 quoted lines
>  t/lib-git-p4.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh
> index 121e380..0080eae 100644
> --- a/t/lib-git-p4.sh
> +++ b/t/lib-git-p4.sh
> @@ -37,7 +37,7 @@ start_p4d() {
>  		p4d -q -r "$db" -p $P4DPORT &
>  		echo $! >"$pidfile"
>  	) &&
> -	for i in 1 2 3 4 5 ; do
> +	for i in 1 2 3 4 5 6 7 8 9 10 ; do
>  		p4 info >/dev/null 2>&1 && break || true &&
>  		echo waiting for p4d to start &&
>  		sleep 1
Previous: Pete WyckoffNext: Pete Wyckoff
Message 3 of 14 in “git p4 test fixes”
  1. 0/9 git p4 test fixesPete Wyckoff, Jun 26, 2012
  2. 1/9 git p4 test: wait longer for p4d to startPete Wyckoff, Jun 26, 2012
  3. Junio C HamanoJun 26, 2012
  4. 2/9 git p4 test: use real_path to resolve p4 client symlinksPete Wyckoff, Jun 26, 2012
  5. 3/9 git p4 test: simplify quoting involving TRASH_DIRECTORYPete Wyckoff, Jun 26, 2012
  6. Johannes SixtJun 26, 2012
  7. Junio C HamanoJun 26, 2012
  8. Pete WyckoffJun 26, 2012
  9. 4/9 git p4 test: never create default test repoPete Wyckoff, Jun 26, 2012
  10. 5/9 git p4 test: rename some "git-p4 command" stringsPete Wyckoff, Jun 26, 2012
  11. 6/9 git p4 test: check for error message in failed testPete Wyckoff, Jun 26, 2012
  12. 7/9 git p4 test: copy source indeterminatePete Wyckoff, Jun 26, 2012
  13. 8/9 git p4 test: cleanup_git should make a new $gitPete Wyckoff, Jun 26, 2012
  14. 9/9 git p4 test: split up big t9800 testPete Wyckoff, Jun 26, 2012

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.