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

Re: [RFC PATCH] t5538: move http push tests out to t5542

From
Jeff King <peff@peff.net>
Date
May 30, 2014, 17:20 UTC
Message-ID
<20140530172051.GB25443@sigill.intra.peff.net>
In-Reply-To
<87lhtj8sqx.fsf_-_@spindle.srvr.nix>
On Fri, May 30, 2014 at 11:29:10AM +0100, Nix wrote:
> As 0232852b, but for the push tests instead: this avoids a start_httpd
> in the middle of the file, which fails under GIT_TEST_HTTPD=false.
> 
> Signed-off-by: Nick Alcock <nick.alcock@oracle.com>

Thanks, this makes sense. I'm really not sure why we didn't notice this at the same time as t5537.

I'm cc-ing Duy, who wrote the original test, to give input on the new test setup.

Show 10 quoted lines
> ---
> On 30 May 2014, Jeff King said:
> > diff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh
> > index be951a4..a980574 100755
> > --- a/t/t5537-fetch-shallow.sh
> > +++ b/t/t5537-fetch-shallow.sh
> 
> btw, t5538-push-shallow.sh has the same bug but was not fixed up that I
> can see. (Though I can't see the original fix in the history of master
> either: was it squashed away somehow?)
I don't think so. As far as I can tell, it was never fixed.
Show 8 quoted lines
> +test_description='push from/to a shallow clone over http'
> +
> +. ./test-lib.sh
> +
> +if test -n "$NO_CURL" -o -z "$GIT_TEST_HTTPD"; then
> +	say 'skipping test, git built without http support'
> +	test_done
> +fi

Ah, this may be why we missed it. We should leave the handling of $GIT_TEST_HTTPD to lib-httpd.sh. I think the topic to refactor lib-httpd setup and this shallow topic were developed in isolation, and we never noticed the semantic conflict during the merge, because there's no textual conflict.

So when I tested with a broken apache, we silently skipped this test (but setting GIT_TEST_HTTPD=false does not trigger the above skip).

Show 8 quoted lines
> +test_expect_success 'push from shallow repo via http' '
> +	mv "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" shallow-upstream.git &&
> +	git clone --bare --no-local full "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
> +	(
> +	cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
> +	git config http.receivepack true
> +	) &&
> +	commit 1s0 &&
This is a typo, no? The original is just "commit 10".
With that fix, the test still fails:
    --- expect      2014-05-30 17:18:08.638496558 +0000
    +++ actual      2014-05-30 17:18:08.638496558 +0000
    @@ -1,5 +1,4 @@
     10
    -1
     4
     3
     2
    not ok 3 - push from shallow repo via http

I think we can just drop that "1" from the expected output, though. It was created in the original by the "push from full to shallow" test (and is rather confusing, anyway, as it shares a name with the original "1").

-Peff
Previous: NixNext: Jeff King
Message 5 of 12 in “git 2.0.0 PROFILE=BUILD check-phase problems with ./t5561-http-backend.sh; GIT_TEST_HTTPD=false problems with t5537-fetch-shallow.sh”
  1. NixMay 29, 2014
  2. Jeff KingMay 30, 2014
  3. t5537: re-drop http testsJeff King, May 30, 2014
  4. t5538: move http push tests out to t5542Nix, May 30, 2014
  5. Jeff KingMay 30, 2014
  6. t5538: move http push tests out to t5542Jeff King, May 30, 2014
  7. Duy NguyenMay 31, 2014
  8. NixMay 30, 2014
  9. Junio C HamanoMay 30, 2014
  10. NixMay 30, 2014
  11. Junio C HamanoMay 30, 2014
  12. NixMay 30, 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.