<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/lib-httpd.sh, branch v2.2.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.2.0</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.2.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-06-25T19:23:56Z</updated>
<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>
<entry>
<title>tests: turn on network daemon tests by default</title>
<updated>2014-02-14T16:13:51Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-02-10T21:29:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=83d842dc8ce4380aa365485b4d9845762f80c6db'/>
<id>urn:sha1:83d842dc8ce4380aa365485b4d9845762f80c6db</id>
<content type='text'>
We do not run the httpd nor git-daemon tests by default, as
they are rather heavyweight and require network access
(albeit over localhost). However, it would be nice if more
pepole ran them, for two reasons:

  1. We would get more test coverage on more systems.

  2. The point of the test suite is to find regressions. It
     is very easy to change some of the underlying code and
     break the httpd code without realizing you are even
     affecting it. Running the httpd tests helps find these
     problems sooner (ideally before the patches even hit
     the list).

We still want to leave an "out", though, for people who really do
not want to run them. For that reason, the GIT_TEST_HTTPD and
GIT_TEST_GIT_DAEMON variables are now tri-state booleans
(true/false/auto), so you can say GIT_TEST_HTTPD=false to turn the
tests back off.  To support those who want a stable single way to
disable these tests across versions of Git before and after this
change, an empty string explicitly set to these variables is also
taken as "false", so the behaviour changes only for those who:

  a. did not express any preference by leaving these variables
     unset.  They did not test these features before, but now they
     do; or

  b. did express that they want to test these features by setting
     GIT_TEST_FEATURE=false (or any equivalent other ways to tell
     "false" to Git, e.g. "0"), which has been a valid but funny way
     to say that they do want to test the feature only because we
     used to interpret any non-empty string to mean "yes please
     test".  They no longer test that feature.

In addition, we are forgiving of common setup failures (e.g., you do
not have apache installed, or have an old version) when the
tri-state is "auto" (or unset), but report an error when it is
"true". This makes "auto" a sane default, as we should not cause
failures on setups where the tests cannot run. But it allows people
who use "true" to catch regressions in their system (e.g., they
uninstalled apache, but were expecting their automated test runs to
test git-httpd, and would want to be notified).

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>tests: auto-set LIB_HTTPD_PORT from test name</title>
<updated>2014-02-10T18:20:45Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-02-10T14:39:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3bb486e4397415e1855e5edbf28d8e50c3d45265'/>
<id>urn:sha1:3bb486e4397415e1855e5edbf28d8e50c3d45265</id>
<content type='text'>
We set the default apache port for each of the httpd tests
to the 4-digit test number of the test script. We want these
to remain unique so that the tests do not conflict with each
other when run in parallel.

Instead of doing it manually in each test script, let's just
set it from the test name at run time. This is simpler, and
is one less thing to be updated when test scripts are
renamed (e.g., when being re-rolled or when conflicting
after being merged with another topic).

Incidentally, this fixes a case where t5537 and t5538 used
the same port number (5537), and could conflict with each
other when run in parallel.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
