<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/lib-httpd, branch v2.30.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.30.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.30.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-05-24T23:26:00Z</updated>
<entry>
<title>remote-curl: error on incomplete packet</title>
<updated>2020-05-24T23:26:00Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2020-05-19T10:53:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=74b082ad34fe2c727c676dac5c33d5e1e5f5ca56'/>
<id>urn:sha1:74b082ad34fe2c727c676dac5c33d5e1e5f5ca56</id>
<content type='text'>
Currently, remote-curl acts as a proxy and blindly forwards packets
between an HTTP server and fetch-pack. In the case of a stateless RPC
connection where the connection is terminated with a partially written
packet, remote-curl will blindly send the partially written packet
before waiting on more input from fetch-pack. Meanwhile, fetch-pack will
read the partial packet and continue reading, expecting more input. This
results in a deadlock between the two processes.

For a stateless connection, inspect packets before sending them and
error out if a packet line packet is incomplete.

Helped-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t/lib-httpd: avoid using macOS' sed</title>
<updated>2020-02-27T17:58:41Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2020-02-27T13:23:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eafff6e41e6a16c23764dcd31373bedd61572cf1'/>
<id>urn:sha1:eafff6e41e6a16c23764dcd31373bedd61572cf1</id>
<content type='text'>
Among other differences relative to GNU sed, macOS' sed always ends its
output with a trailing newline, even if the input did not have such a
trailing newline.

Surprisingly, this makes three httpd-based tests fail on macOS: t5616,
t5702 and t5703. ("Surprisingly" because those tests have been around
for some time, but apparently nobody runs them on macOS with a working
Apache2 setup.)

The reason is that we use `sed` in those tests to filter the response of
the web server. Apart from the fact that we use GNU constructs (such as
using a space after the `c` command instead of a backslash and a
newline), we have another problem: macOS' sed LF-only newlines while
webservers are supposed to use CR/LF ones.

Even worse, t5616 uses `sed` to replace a binary part of the response
with a new binary part (kind of hoping that the replaced binary part
does not contain a 0x0a byte which would be interpreted as a newline).

To that end, it calls on Perl to read the binary pack file and
hex-encode it, then calls on `sed` to prefix every hex digit pair with a
`\x` in order to construct the text that the `c` statement of the `sed`
invocation is supposed to insert. So we call Perl and sed to construct a
sed statement. The final nail in the coffin is that macOS' sed does not
even interpret those `\x&lt;hex&gt;` constructs.

Let's just replace all of that by Perl snippets. With Perl, at least, we
do not have to deal with GNU vs macOS semantics, we do not have to worry
about unwanted trailing newlines, and we do not have to spawn commands
to construct arguments for other commands to be spawned (i.e. we can
avoid a whole lot of shell scripting complexity).

The upshot is that this fixes t5616, t5702 and t5703 on macOS with
Apache2.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>apply-one-time-sed.sh: modernize style</title>
<updated>2019-11-29T21:20:14Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-11-27T19:53:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=77a946be98f4cf2947f9aefac924c0ee78a042c7'/>
<id>urn:sha1:77a946be98f4cf2947f9aefac924c0ee78a042c7</id>
<content type='text'>
Convert `[ ... ]` to use `test` and test for the existence of a regular
file (`-f`) instead of any file (`-e`).

Move the `then`s onto their own lines so that it conforms with the
general test style.

Instead of redirecting input into sed, allow it to open its own input.

Use `cmp -s` instead of `diff` since we only care about whether the two
files are equal and `diff` is overkill for this.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t/lib-httpd: pass LSAN_OPTIONS through apache</title>
<updated>2019-05-08T04:21:23Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-05-07T22:30:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d9ef573837f4054b26f792c0ffd7cbb662cb38a6'/>
<id>urn:sha1:d9ef573837f4054b26f792c0ffd7cbb662cb38a6</id>
<content type='text'>
Just as we instruct Apache to pass through ASAN_OPTIONS (so that
server-side Git programs it spawns will respect our options while
running the tests), we should do the same with LSAN_OPTIONS. Otherwise
trying to collect a list of leaks like:

    export LSAN_OPTIONS=exitcode=0:log_path=/tmp/lsan
    make SANITIZE=leak test

won't work for http tests (the server-side programs won't log their
leaks to the right place, and they'll prematurely die, producing a
spurious test failure).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Acked-by: Josh Steadmon &lt;steadmon@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t5551: test server-side ERR packet</title>
<updated>2019-02-06T20:20:23Z</updated>
<author>
<name>Josh Steadmon</name>
<email>steadmon@google.com</email>
</author>
<published>2019-02-06T19:19:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=30dea56536e78ad8a9533d51ad1d8c9c85c3c7bd'/>
<id>urn:sha1:30dea56536e78ad8a9533d51ad1d8c9c85c3c7bd</id>
<content type='text'>
When a smart HTTP server sends an error message via pkt-line, we detect
the error due to using PACKET_READ_DIE_ON_ERR_PACKET. This case was
added by 2d103c31c2 (pack-protocol.txt: accept error packets in any
context, 2018-12-29), but not covered by tests.

Signed-off-by: Josh Steadmon &lt;steadmon@google.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 'jt/fetch-v2-sideband'</title>
<updated>2019-02-05T22:26:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-02-05T22:26:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5f8b86db94e789bc07258f98cc5ba25d18273d83'/>
<id>urn:sha1:5f8b86db94e789bc07258f98cc5ba25d18273d83</id>
<content type='text'>
"git fetch" and "git upload-pack" learned to send all exchange over
the sideband channel while talking the v2 protocol.

* jt/fetch-v2-sideband:
  tests: define GIT_TEST_SIDEBAND_ALL
  {fetch,upload}-pack: sideband v2 fetch response
  sideband: reverse its dependency on pkt-line
  pkt-line: introduce struct packet_writer
  pack-protocol.txt: accept error packets in any context
  Use packet_reader instead of packet_read_line
</content>
</entry>
<entry>
<title>tests: define GIT_TEST_SIDEBAND_ALL</title>
<updated>2019-01-17T19:25:07Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2019-01-16T19:28:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=07c3c2aa16370fd97551b7d1aa6af3d051e7cf8f'/>
<id>urn:sha1:07c3c2aa16370fd97551b7d1aa6af3d051e7cf8f</id>
<content type='text'>
Define a GIT_TEST_SIDEBAND_ALL environment variable meant to be used
from tests. When set to true, this overrides uploadpack.allowsidebandall
to true, allowing the entire test suite to be run as if this
configuration is in place for all repositories.

As of this patch, all tests pass whether GIT_TEST_SIDEBAND_ALL is unset
or set to 1.

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>test: test GIT_CURL_VERBOSE=1 shows an error</title>
<updated>2019-01-10T23:00:56Z</updated>
<author>
<name>Masaya Suzuki</name>
<email>masayasuzuki@google.com</email>
</author>
<published>2019-01-10T19:33:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e4871cd50c87610469a08b7fa8ef46677d2b8b7b'/>
<id>urn:sha1:e4871cd50c87610469a08b7fa8ef46677d2b8b7b</id>
<content type='text'>
This tests GIT_CURL_VERBOSE shows an error when an URL returns 500. This
exercises the code in remote_curl.

Signed-off-by: Masaya Suzuki &lt;masayasuzuki@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>upload-pack: test negotiation with changing repository</title>
<updated>2018-06-28T16:33:29Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2018-06-27T22:30:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3374292e55564fa6107b31a63a5e5432cd8c2265'/>
<id>urn:sha1:3374292e55564fa6107b31a63a5e5432cd8c2265</id>
<content type='text'>
Add tests to check the behavior of fetching from a repository which
changes between rounds of negotiation (for example, when different
servers in a load-balancing agreement participate in the same stateless
RPC negotiation). This forms a baseline of comparison to the ref-in-want
functionality (which will be introduced to the client in subsequent
commits), and ensures that subsequent commits do not change existing
behavior.

As part of this effort, a mechanism to substitute strings in a single
HTTP response is added.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http: fix v1 protocol tests with apache httpd &lt; 2.4</title>
<updated>2018-01-04T18:45:57Z</updated>
<author>
<name>Todd Zullinger</name>
<email>tmz@pobox.com</email>
</author>
<published>2017-12-31T02:32:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a812952aab1c889528ce941c99e0d8a6db05a754'/>
<id>urn:sha1:a812952aab1c889528ce941c99e0d8a6db05a754</id>
<content type='text'>
The apache config used by tests was updated to use the SetEnvIf
directive to set the Git-Protocol header in 19113a26b6 ("http: tell
server that the client understands v1", 2017-10-16).

Setting the Git-Protocol header is restricted to httpd &gt;= 2.4, but
mod_setenvif and the SetEnvIf directive work with lower versions, at
least as far back as 2.0, according to the httpd documentation:

    https://httpd.apache.org/docs/2.0/mod/mod_setenvif.html

Drop the restriction.  Tested with httpd 2.2 and 2.4.

Signed-off-by: Todd Zullinger &lt;tmz@pobox.com&gt;
Acked-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
