<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/lib-httpd.sh, branch v2.4.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-03-13T06:25:06Z</updated>
<entry>
<title>t: pass GIT_TRACE through Apache</title>
<updated>2015-03-13T06:25:06Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-03-13T04:51:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=89c57ab3f0168b192d5ccc159972fdb26e0ba80b'/>
<id>urn:sha1:89c57ab3f0168b192d5ccc159972fdb26e0ba80b</id>
<content type='text'>
Apache removes GIT_TRACE from the environment before running
git-http-backend. This can make it hard to debug the server
side of an http session. Let's let it through.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t/lib-httpd: switch SANITY check for NOT_ROOT</title>
<updated>2015-01-16T17:33:46Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-01-16T09:16:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1767c51787f2a9aaf99716a48e8928618c1c9481'/>
<id>urn:sha1:1767c51787f2a9aaf99716a48e8928618c1c9481</id>
<content type='text'>
The SANITY prerequisite is really about whether the
filesystem will respect the permissions we set, and being
root is only one part of that. But the httpd tests really
just care about not being root, as they are trying to avoid
weirdness in apache (see a1a3011 for details).

Let's switch out SANITY for a new NOT_ROOT prerequisite,
which will let us tweak SANITY more freely.

We implement NOT_ROOT by checking `id -u`, which is in POSIX
and seems to be available even on MSYS.  Note that we cannot
just call this "ROOT" and ask for "!ROOT". The possible
outcomes are:

  1. we know we are root

  2. we know we are not root

  3. we could not tell, because `id` was not available

We should conservatively treat (3) as "does not have the
prerequisite", which means that a naive negation would not
work.

Helped-by: Kyle J. McKay &lt;mackyle@gmail.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ep/avoid-test-a-o'</title>
<updated>2014-06-25T19:23:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-25T19:23:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e56857246adbd3ab0ded490f300da8ef34374cbc'/>
<id>urn:sha1:e56857246adbd3ab0ded490f300da8ef34374cbc</id>
<content type='text'>
Update tests and scripts to avoid "test ... -a ...", which is often
more error-prone than "test ... &amp;&amp; test ...".

Squashed misconversion fix-up into git-submodule.sh updates.

* ep/avoid-test-a-o:
  git-submodule.sh: avoid "echo" path-like values
  git-submodule.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  t/test-lib-functions.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  t/t9814-git-p4-rename.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  t/t5538-push-shallow.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  t/t5403-post-checkout-hook.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  t/t5000-tar-tree.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  t/t4102-apply-rename.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  t/t0026-eol-config.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  t/t0025-crlf-auto.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  t/lib-httpd.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  git-rebase--interactive.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  git-mergetool.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  git-bisect.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  contrib/examples/git-resolve.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  contrib/examples/git-repack.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  contrib/examples/git-merge.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  contrib/examples/git-commit.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  contrib/examples/git-clone.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
  check_bindir: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"
</content>
</entry>
<entry>
<title>Merge branch 'jk/http-errors'</title>
<updated>2014-06-16T19:18:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-16T19:18:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2075a0c27fa5cf4f9f03964d407dc015c1749a7e'/>
<id>urn:sha1:2075a0c27fa5cf4f9f03964d407dc015c1749a7e</id>
<content type='text'>
Propagate the error messages from the webserver better to the
client coming over the HTTP transport.

* jk/http-errors:
  http: default text charset to iso-8859-1
  remote-curl: reencode http error messages
  strbuf: add strbuf_reencode helper
  http: optionally extract charset parameter from content-type
  http: extract type/subtype portion of content-type
  t5550: test display of remote http error messages
  t/lib-httpd: use write_script to copy CGI scripts
  test-lib: preserve GIT_CURL_VERBOSE from the environment
</content>
</entry>
<entry>
<title>Merge branch 'jk/do-not-run-httpd-tests-as-root'</title>
<updated>2014-06-16T17:06:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-16T17:06:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fd800214384e60cc72272620bdde58f94746719e'/>
<id>urn:sha1:fd800214384e60cc72272620bdde58f94746719e</id>
<content type='text'>
* jk/do-not-run-httpd-tests-as-root:
  t/lib-httpd: require SANITY prereq
</content>
</entry>
<entry>
<title>t/lib-httpd.sh: avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;"</title>
<updated>2014-06-09T22:53:41Z</updated>
<author>
<name>Elia Pinto</name>
<email>gitter.spiros@gmail.com</email>
</author>
<published>2014-06-06T14:55:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ce5dadb6165c58f6a3a121a9373e6d3ae23b35b4'/>
<id>urn:sha1:ce5dadb6165c58f6a3a121a9373e6d3ae23b35b4</id>
<content type='text'>
The construct is error-prone; "test" being built-in in most modern
shells, the reason to avoid "test &lt;cond&gt; &amp;&amp; test &lt;cond&gt;" spawning
one extra process by using a single "test &lt;cond&gt; -a &lt;cond&gt;" no
longer exists.

Signed-off-by: Elia Pinto &lt;gitter.spiros@gmail.com&gt;
Reviewed-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t5550: test display of remote http error messages</title>
<updated>2014-05-23T19:43:51Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-05-22T09:29:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dbcf2bd3dec1244fdbafb3ec7312ed14d83c0025'/>
<id>urn:sha1:dbcf2bd3dec1244fdbafb3ec7312ed14d83c0025</id>
<content type='text'>
Since commit 426e70d (remote-curl: show server content on
http errors, 2013-04-05), we relay any text/plain error
messages from the remote server to the user. However, we
never tested it.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t/lib-httpd: use write_script to copy CGI scripts</title>
<updated>2014-05-23T19:41:50Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-05-22T09:28:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c7db2d16474874b21aad9141e6856f836f719643'/>
<id>urn:sha1:c7db2d16474874b21aad9141e6856f836f719643</id>
<content type='text'>
Using write_script will set our shebang line appropriately
with $SHELL_PATH. The script that is there now is quite
simple and likely to succeed even with a non-POSIX /bin/sh,
but it does not hurt to be defensive.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t/lib-httpd: require SANITY prereq</title>
<updated>2014-05-12T17:19:23Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-05-10T14:02:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a1a301114e0ba3f60474d857c93d02890d00e65b'/>
<id>urn:sha1:a1a301114e0ba3f60474d857c93d02890d00e65b</id>
<content type='text'>
Our test httpd setup will not generally run as root, because
Apache will want to setuid, and we do not set up the "User"
config directive. On some systems, like current Debian
unstable, Apache fails to start, and we skip the tests:

    $ sudo ./t5539-fetch-http-shallow.sh --debug
    1..0 # SKIP web server setup failed
    $ cat trash*t5539*/httpd/error.log
    [...]
    (22)Invalid argument: AH00024: Couldn't set permissions on
      the rewrite-map mutex; check User and Group directives
    AH00016: Configuration Failed

However, on other systems (reportedly Ubuntu 11.04), Apache
seems to start, and then bails during our tests with:

   getpwuid: couldn't determine user name from uid 4294967295,
     you probably need to modify the User directive
   Child 12037 returned a Fatal error...  Apache is exiting!

This may be related to the pre-fork/threading model in use
(note that the second one complains of the child dying).
However, it's not even worth investigating; in either case
we just want to skip the tests, and we already recommend
against running the test suite as root. Let's just
explicitly check this condition and skip the tests rather
than expecting Apache to do the right thing.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/run-network-tests-by-default'</title>
<updated>2014-03-05T23:06:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-05T23:06:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ee3a81e69cde27add025e206cd9dd2937c80f230'/>
<id>urn:sha1:ee3a81e69cde27add025e206cd9dd2937c80f230</id>
<content type='text'>
Teach "make test" to run networking tests when possible by default.

* jk/run-network-tests-by-default:
  tests: turn on network daemon tests by default
</content>
</entry>
</feed>
