git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git v2.13.0-rc0 test failures on cygwin
@ 2017-04-23 14:44 Ramsay Jones
  2017-04-28 11:44 ` Adam Dinwoodie
  0 siblings, 1 reply; 4+ messages in thread
From: Ramsay Jones @ 2017-04-23 14:44 UTC (permalink / raw)
  To: Junio C Hamano, Adam Dinwoodie
  Cc: Jeff King, GIT Mailing-list, Johannes Schindelin

Hi Junio, Adam,

[Adam, if you are no longer the git package maintainer for cygwin, then
please ignore this email and sorry for the noise!]

On thursday evening, I ran the test-suite on the newly minted v2.13.0-rc0
release on cygwin, which unfortunately failed (the 'test-out' files are
from the most recent test runs for v2.13.0-rc0, v2.12.0-rc0, v2.12.0-rc1
and v2.12.0 - I missed the v2.12.0-rc2 release!):

$ ls -l test-out*
-rw-r--r-- 1 ramsay None 104K Apr 20 22:29 test-out
-rw-r--r-- 1 ramsay None 103K Feb  5 00:57 test-out.old1
-rw-r--r-- 1 ramsay None 103K Feb 12 00:29 test-out.old2
-rw-r--r-- 1 ramsay None 103K Feb 25 01:14 test-out.old3
$ 
$ grep FAIL test-out*
test-out:Result: FAIL
$ 
$ tail -15 test-out
[22:29:51]

Test Summary Report
-------------------
t0301-credential-cache.sh                        (Wstat: 256 Tests: 29 Failed: 6)
  Failed tests:  12, 24-28
  Non-zero exit status: 1
t8010-cat-file-filters.sh                        (Wstat: 256 Tests: 8 Failed: 1)
  Failed test:  8
  Non-zero exit status: 1
Files=780, Tests=14700, 10398 wallclock secs ( 1.27 usr  0.78 sys + 1265.08 cusr 4076.38 csys = 5343.50 CPU)
Result: FAIL
make[1]: *** [Makefile:45: prove] Error 1
make[1]: Leaving directory '/home/ramsay/git/t'
make: *** [Makefile:2313: test] Error 2
$

I was a bit surprised about the 'credential-cache' failures (I didn't think
they were being run on cygwin!), but I haven't spent any time looking at
that yet. So, looking at the t8010 test failure:

$ grep t8010 test-out*
test-out:[22:20:20] t8010-cat-file-filters.sh ..........................
test-out:t8010-cat-file-filters.sh                        (Wstat: 256 Tests: 8 Failed: 1)
test-out.old1:[00:46:05] t8010-cat-file-filters.sh .......................... ok     2169 ms ( 0.00 usr  0.00 sys +  0.21 cusr  0.54 csys =  0.75 CPU)
test-out.old2:[00:20:09] t8010-cat-file-filters.sh .......................... ok     1831 ms ( 0.00 usr  0.00 sys +  0.32 cusr  0.74 csys =  1.06 CPU)
test-out.old3:[01:05:04] t8010-cat-file-filters.sh .......................... ok     1845 ms ( 0.00 usr  0.00 sys +  0.44 cusr  0.59 csys =  1.03 CPU)
$

So, this test was passing on the three previous runs and nothing seems to
have changed in the interval. Hmm, except that the previous evening I had
updated my cygwin installation (according to my setup.log file, the cygwin
dll version went from 2.7.0-1 to 2.8.0-1). As a quick test, I rebuilt the
v2.12.0 version, which has previously worked, and ran the t8010 test
repeatedly; it failed consistently. Hmm, back to the v2.13.0-rc0 failure:

$ cd t
$ ./t8010-cat-file-filters.sh -i -v

...

ok 7 - --path=<path> complains without --textconv/--filters

expecting success:
        sha1=$(git rev-parse -q --verify HEAD:world.txt) &&
        test_config diff.txt.textconv "tr A-Za-z N-ZA-Mn-za-m <" &&
        printf "%s hello.txt\n%s hello\n" $sha1 $sha1 |
        git cat-file --textconv --batch >actual &&
        printf "%s blob 6\nuryyb\r\n\n%s blob 6\nhello\n\n" \
                $sha1 $sha1 >expect &&
        test_cmp expect actual

--- expect      2017-04-23 12:40:07.899086200 +0000
+++ actual      2017-04-23 12:40:07.883459900 +0000
@@ -1,6 +1,3 @@
 ce013625030ba8dba906f756967f9e9ca394464a blob 6
 uryyb

-ce013625030ba8dba906f756967f9e9ca394464a blob 6
-hello
-
not ok 8 - cat-file --textconv --batch works
#
#               sha1=$(git rev-parse -q --verify HEAD:world.txt) &&
#               test_config diff.txt.textconv "tr A-Za-z N-ZA-Mn-za-m <" &&
#               printf "%s hello.txt\n%s hello\n" $sha1 $sha1 |
#               git cat-file --textconv --batch >actual &&
#               printf "%s blob 6\nuryyb\r\n\n%s blob 6\nhello\n\n" \
#                       $sha1 $sha1 >expect &&
#               test_cmp expect actual
#
$

OK, lets go run it by hand:

$ cd trash\ directory.t8010-cat-file-filters/
$ sha1=$(git rev-parse -q --verify HEAD:world.txt)
$ printf "%s hello.txt\n%s hello\n" $sha1 $sha1 |
> git cat-file --textconv --batch
ce013625030ba8dba906f756967f9e9ca394464a blob 6
uryyb

$

Having run it in the debugger, the loop in batch_objects() (builtin/cat-file.c
lines #489-505) only reads one line from stdin, then gets EOF on the stream.

$ printf "%s hello.txt\n%s hello\n" $sha1 $sha1 | cat
ce013625030ba8dba906f756967f9e9ca394464a hello.txt
ce013625030ba8dba906f756967f9e9ca394464a hello
$

$ printf "%s hello.txt\n%s hello\n" $sha1 $sha1 |
> git cat-file --batch
ce013625030ba8dba906f756967f9e9ca394464a hello.txt missing
ce013625030ba8dba906f756967f9e9ca394464a hello missing
$

$ printf "%s hello.txt\n%s hello\n" $sha1 $sha1 >input
$ git cat-file --textconv --batch <input
ce013625030ba8dba906f756967f9e9ca394464a blob 6
uryyb

ce013625030ba8dba906f756967f9e9ca394464a blob 6
hello

$

Ah, so it looks like running the textconv filter program is somehow causing
the standard input stream of the 'git-cat-file' process to be closed (or
otherwise truncated). Hmm, somewhat odd! ;-)

Also, I have the cygwin git package installed (which was updated to a newer
version than my current ~/bin version):

$ /usr/bin/git version
git version 2.12.2
$ printf "%s hello.txt\n%s hello\n" $sha1 $sha1 | /usr/bin/git cat-file --textconv --batch
ce013625030ba8dba906f756967f9e9ca394464a blob 6
uryyb

$

... which also suffers from this problem (with the 2.8.0-1 version of the
cygwin dll, anyway).

So, I hacked up a version of 'cat-file' (diff given below), which slurped up
all of the input into an array of strbuf's, before passing each line to the
batch_one_object() function for processing (possibly by the external textconv
process). This version passes the test.

This is _not_ the solution, of course. It simply sidesteps the issue, which
seems to be caused by an update to the cygwin dll. I don't want to call this
a bug, because I have no evidence of that, rather than an unfortunate change
in behaviour. (git stresses the cygwin posix fork/exec implementation rather
a lot!).

I'm not sure how to proceed from here. (I don't know if it is even possible
to 'downgrade' my cygwin installation in order to confirm that the current
git-cat-file would work with the 2.7.0-1 version of the cygwin dll).

Hopefully, someone more clueful than me can tackle this from the cygwin api
side of things. (Also, I suppose this could possibly affect Msys2, if they
port the cygwin dll change).

ATB,
Ramsay Jones
 
-- >8 --

diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index 1890d7a63..da5e45d75 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -426,12 +426,31 @@ static int batch_packed_object(const struct object_id *oid,
 	return 0;
 }
 
+static struct strbuf **strbuf_getlines(FILE *fp)
+{
+	struct strbuf **ret = NULL;
+	size_t nr = 0, alloc = 0;
+	struct strbuf *t, b = STRBUF_INIT;
+
+	while (strbuf_getline(&b, fp) != EOF) {
+		t = xmalloc(sizeof(struct strbuf));
+		strbuf_init(t, b.len);
+		strbuf_addbuf(t, &b);
+		ALLOC_GROW(ret, nr + 1, alloc);
+		ret[nr++] = t;
+	}
+	ALLOC_GROW(ret, nr + 1, alloc);
+	ret[nr] = NULL;
+	return ret;
+}
+
 static int batch_objects(struct batch_options *opt)
 {
 	struct strbuf buf = STRBUF_INIT;
 	struct expand_data data;
 	int save_warning;
 	int retval = 0;
+	struct strbuf **lines, **l;
 
 	if (!opt->format)
 		opt->format = "%(objectname) %(objecttype) %(objectsize)";
@@ -486,7 +505,13 @@ static int batch_objects(struct batch_options *opt)
 	save_warning = warn_on_object_refname_ambiguity;
 	warn_on_object_refname_ambiguity = 0;
 
-	while (strbuf_getline(&buf, stdin) != EOF) {
+	strbuf_release(&buf);
+	lines = strbuf_getlines(stdin);
+
+	for (l = lines; *l; l++) {
+		strbuf_reset(&buf);
+		strbuf_addbuf(&buf, *l);
+
 		if (data.split_on_whitespace) {
 			/*
 			 * Split at first whitespace, tying off the beginning
@@ -503,6 +528,7 @@ static int batch_objects(struct batch_options *opt)
 
 		batch_one_object(buf.buf, opt, &data);
 	}
+	strbuf_list_free(lines);
 
 	strbuf_release(&buf);
 	warn_on_object_refname_ambiguity = save_warning;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: git v2.13.0-rc0 test failures on cygwin
  2017-04-23 14:44 git v2.13.0-rc0 test failures on cygwin Ramsay Jones
@ 2017-04-28 11:44 ` Adam Dinwoodie
  2017-04-28 19:20   ` Devin Lehmacher
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Dinwoodie @ 2017-04-28 11:44 UTC (permalink / raw)
  To: Ramsay Jones
  Cc: Junio C Hamano, Jeff King, GIT Mailing-list, Johannes Schindelin,
	Devin Lehmacher

On 23 April 2017 at 15:44, Ramsay Jones wrote:
> [Adam, if you are no longer the git package maintainer for cygwin, then
> please ignore this email and sorry for the noise!]

I am still the Cygwin Git package maintainer; I've been quiet of late
because of personal health issues, but I'm now picking things back up
again.

> Test Summary Report
> -------------------
> t0301-credential-cache.sh                        (Wstat: 256 Tests: 29 Failed: 6)
>   Failed tests:  12, 24-28
>   Non-zero exit status: 1

Confirmed I'm seeing this on v2.13.0-rc1, and this passed in v2.12.2.
`git bisect` tells me this failure was introduced by commit
v2.12.0-267-g612c49e94, added by Devin Lehmacher (added to the CC
list).

> t8010-cat-file-filters.sh                        (Wstat: 256 Tests: 8 Failed: 1)
>   Failed test:  8
>   Non-zero exit status: 1
> Files=780, Tests=14700, 10398 wallclock secs ( 1.27 usr  0.78 sys + 1265.08 cusr 4076.38 csys = 5343.50 CPU)
> Result: FAIL
> make[1]: *** [Makefile:45: prove] Error 1
> make[1]: Leaving directory '/home/ramsay/git/t'
> make: *** [Makefile:2313: test] Error 2

I also see this failure; `git bisect` tells me it was introduced by
v2.10.0-rc1-4-g321459439, added by Johannes Schindelin.

> I'm not sure how to proceed from here. (I don't know if it is even possible
> to 'downgrade' my cygwin installation in order to confirm that the current
> git-cat-file would work with the 2.7.0-1 version of the cygwin dll).

I believe (although I've never done it myself) you can get old
versions of Cygwin packages via the Cygwin Time Machine at
http://www.crouchingtigerhiddenfruitbat.org/Cygwin/timemachine.html.

I'm sufficiently over-committed at the moment that I'm unlikely to be
able to spend time investigating these problems myself, but I'm happy
to test patches &c on my local installation if that would be valuable.

Adam

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git v2.13.0-rc0 test failures on cygwin
  2017-04-28 11:44 ` Adam Dinwoodie
@ 2017-04-28 19:20   ` Devin Lehmacher
  2017-05-04 14:26     ` Adam Dinwoodie
  0 siblings, 1 reply; 4+ messages in thread
From: Devin Lehmacher @ 2017-04-28 19:20 UTC (permalink / raw)
  To: Adam Dinwoodie
  Cc: Ramsay Jones, Junio C Hamano, Jeff King, GIT Mailing-list,
	Johannes Schindelin

> > Test Summary Report
> > -------------------
> > t0301-credential-cache.sh                        (Wstat: 256 Tests: 29 Failed: 6)
> >   Failed tests:  12, 24-28
> >   Non-zero exit status: 1
>
> Confirmed I'm seeing this on v2.13.0-rc1, and this passed in v2.12.2.
> `git bisect` tells me this failure was introduced by commit
> v2.12.0-267-g612c49e94, added by Devin Lehmacher (added to the CC
> list).

Can someone with cygwin check that `test -S` works on cygwin?

The only that tests that failed are those that use `test -S` to check
for the existence of a socket.

I'll also take a look at verbose test output (maybe with a trace too)
for t0301 if someone sends me that.

-Devin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git v2.13.0-rc0 test failures on cygwin
  2017-04-28 19:20   ` Devin Lehmacher
@ 2017-05-04 14:26     ` Adam Dinwoodie
  0 siblings, 0 replies; 4+ messages in thread
From: Adam Dinwoodie @ 2017-05-04 14:26 UTC (permalink / raw)
  To: Devin Lehmacher
  Cc: Ramsay Jones, Junio C Hamano, Jeff King, GIT Mailing-list,
	Johannes Schindelin

[-- Attachment #1: Type: text/plain, Size: 2198 bytes --]

On Fri, Apr 28, 2017 at 03:20:21PM -0400, Devin Lehmacher wrote:
> > > Test Summary Report
> > > -------------------
> > > t0301-credential-cache.sh                        (Wstat: 256 Tests: 29 Failed: 6)
> > >   Failed tests:  12, 24-28
> > >   Non-zero exit status: 1
> >
> > Confirmed I'm seeing this on v2.13.0-rc1, and this passed in v2.12.2.
> > `git bisect` tells me this failure was introduced by commit
> > v2.12.0-267-g612c49e94, added by Devin Lehmacher (added to the CC
> > list).
> 
> Can someone with cygwin check that `test -S` works on cygwin?

Seems to work for me, using both Bash's built-in `test` and `/bin/test`:

    $ socat UNIX-LISTEN:socket-file LISTEN:socket-file &
    [1] 2976

    $ ls -l socket-file
    srw-r--r-- 1 add Domain Users 0 May  4 15:08 socket-file

    $ type test
    test is a shell builtin

    $ test -S socket-file && echo success
    success

    $ /bin/test -S socket-file && echo success
    success

    $ touch regular-file

    $ test -S regular-file && echo success

    $ /bin/test -S regular-file && echo success

    $ test -S non-existant-file && echo success

    $ /bin/test -S non-existant-file && echo success

> I'll also take a look at verbose test output (maybe with a trace too)
> for t0301 if someone sends me that.

The verbose t0301.12 output is below; the verbose test output from the other
failing tests is more-or-less identical.  I've attached the full trace
output, too: it looks like the fatal error below is on the `git
credential-cache exit` commands.

    fatal: read error from cache daemon: Connection reset by peer
    not ok 12 - socket defaults to ~/.cache/git/credential/socket
    #
    #               test_when_finished "
    #                       git credential-cache exit &&
    #                       rmdir -p .cache/git/credential/
    #               " &&
    #               test_path_is_missing "$HOME/.git-credential-cache" &&
    #               test -S "$HOME/.cache/git/credential/socket"
    #

This specific output came from v2.13.0-rc1 on an up-to-date 64-bit
Cygwin installation.  I'm happy to experiment with other build options /
patches / environments / &c. if that would be useful.

Adam

[-- Attachment #2: t0301-trace-output.log --]
[-- Type: text/plain, Size: 59085 bytes --]

Initialized empty Git repository in /home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git/
expecting success: 
		check fill $HELPER <<-\EOF
		protocol=https
		host=example.com
		--
		protocol=https
		host=example.com
		username=askpass-username
		password=askpass-password
		--
		askpass: Username for 'https://example.com':
		askpass: Password for 'https://askpass-username@example.com':
		EOF
	
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=askpass-username
++ read line
++ case "$line" in
++ echo password=askpass-password
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo 'askpass: Username for '\''https://example.com'\'':'
++ read line
++ case "$line" in
++ echo 'askpass: Password for '\''https://askpass-username@example.com'\'':'
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 1 - helper (cache) has no existing data

expecting success: 
		check approve $HELPER <<-\EOF
		protocol=https
		host=example.com
		username=store-user
		password=store-pass
		EOF
	
++ check approve cache
++ credential_opts=
++ credential_cmd=approve
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=store-user
++ read line
++ case "$line" in
++ echo password=store-pass
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential approve <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential approve
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 2 - helper (cache) stores password

expecting success: 
		check fill $HELPER <<-\EOF
		protocol=https
		host=example.com
		--
		protocol=https
		host=example.com
		username=store-user
		password=store-pass
		--
		EOF
	
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=store-user
++ read line
++ case "$line" in
++ echo password=store-pass
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 3 - helper (cache) can retrieve password

expecting success: 
		check fill $HELPER <<-\EOF
		protocol=http
		host=example.com
		--
		protocol=http
		host=example.com
		username=askpass-username
		password=askpass-password
		--
		askpass: Username for 'http://example.com':
		askpass: Password for 'http://askpass-username@example.com':
		EOF
	
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=http
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=http
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=askpass-username
++ read line
++ case "$line" in
++ echo password=askpass-password
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo 'askpass: Username for '\''http://example.com'\'':'
++ read line
++ case "$line" in
++ echo 'askpass: Password for '\''http://askpass-username@example.com'\'':'
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 4 - helper (cache) requires matching protocol

expecting success: 
		check fill $HELPER <<-\EOF
		protocol=https
		host=other.tld
		--
		protocol=https
		host=other.tld
		username=askpass-username
		password=askpass-password
		--
		askpass: Username for 'https://other.tld':
		askpass: Password for 'https://askpass-username@other.tld':
		EOF
	
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=other.tld
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=other.tld
++ read line
++ case "$line" in
++ echo username=askpass-username
++ read line
++ case "$line" in
++ echo password=askpass-password
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo 'askpass: Username for '\''https://other.tld'\'':'
++ read line
++ case "$line" in
++ echo 'askpass: Password for '\''https://askpass-username@other.tld'\'':'
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 5 - helper (cache) requires matching host

expecting success: 
		check fill $HELPER <<-\EOF
		protocol=https
		host=example.com
		username=other
		--
		protocol=https
		host=example.com
		username=other
		password=askpass-password
		--
		askpass: Password for 'https://other@example.com':
		EOF
	
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=other
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=other
++ read line
++ case "$line" in
++ echo password=askpass-password
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo 'askpass: Password for '\''https://other@example.com'\'':'
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 6 - helper (cache) requires matching username

expecting success: 
		test_config credential.usehttppath true &&
		check approve $HELPER <<-\EOF &&
		protocol=http
		host=path.tld
		path=foo.git
		username=user
		password=pass
		EOF
		check fill $HELPER <<-\EOF
		protocol=http
		host=path.tld
		path=bar.git
		--
		protocol=http
		host=path.tld
		path=bar.git
		username=askpass-username
		password=askpass-password
		--
		askpass: Username for 'http://path.tld/bar.git':
		askpass: Password for 'http://askpass-username@path.tld/bar.git':
		EOF
	
++ test_config credential.usehttppath true
++ config_dir=
++ test credential.usehttppath = -C
++ test_when_finished 'test_unconfig  '\''credential.usehttppath'\'''
++ test 0 = 0
++ test_cleanup='{ test_unconfig  '\''credential.usehttppath'\''
		} && (exit "$eval_ret"); eval_ret=$?; :'
++ git config credential.usehttppath true
++ check approve cache
++ credential_opts=
++ credential_cmd=approve
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=http
++ read line
++ case "$line" in
++ echo host=path.tld
++ read line
++ case "$line" in
++ echo path=foo.git
++ read line
++ case "$line" in
++ echo username=user
++ read line
++ case "$line" in
++ echo password=pass
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential approve <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential approve
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=http
++ read line
++ case "$line" in
++ echo host=path.tld
++ read line
++ case "$line" in
++ echo path=bar.git
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=http
++ read line
++ case "$line" in
++ echo host=path.tld
++ read line
++ case "$line" in
++ echo path=bar.git
++ read line
++ case "$line" in
++ echo username=askpass-username
++ read line
++ case "$line" in
++ echo password=askpass-password
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo 'askpass: Username for '\''http://path.tld/bar.git'\'':'
++ read line
++ case "$line" in
++ echo 'askpass: Password for '\''http://askpass-username@path.tld/bar.git'\'':'
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
++ test_unconfig credential.usehttppath
++ config_dir=
++ test credential.usehttppath = -C
++ git config --unset-all credential.usehttppath
++ config_status=0
++ case "$config_status" in
++ return 0
++ exit 0
++ eval_ret=0
++ :
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 7 - helper (cache) requires matching path

expecting success: 
		check reject $HELPER <<-\EOF &&
		protocol=https
		host=example.com
		EOF
		check fill $HELPER <<-\EOF
		protocol=https
		host=example.com
		--
		protocol=https
		host=example.com
		username=askpass-username
		password=askpass-password
		--
		askpass: Username for 'https://example.com':
		askpass: Password for 'https://askpass-username@example.com':
		EOF
	
++ check reject cache
++ credential_opts=
++ credential_cmd=reject
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential reject <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential reject
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=askpass-username
++ read line
++ case "$line" in
++ echo password=askpass-password
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo 'askpass: Username for '\''https://example.com'\'':'
++ read line
++ case "$line" in
++ echo 'askpass: Password for '\''https://askpass-username@example.com'\'':'
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 8 - helper (cache) can forget host

expecting success: 
		check approve $HELPER <<-\EOF &&
		protocol=https
		host=example.com
		username=user1
		password=pass1
		EOF
		check approve $HELPER <<-\EOF &&
		protocol=https
		host=example.com
		username=user2
		password=pass2
		EOF
		check fill $HELPER <<-\EOF &&
		protocol=https
		host=example.com
		username=user1
		--
		protocol=https
		host=example.com
		username=user1
		password=pass1
		EOF
		check fill $HELPER <<-\EOF
		protocol=https
		host=example.com
		username=user2
		--
		protocol=https
		host=example.com
		username=user2
		password=pass2
		EOF
	
++ check approve cache
++ credential_opts=
++ credential_cmd=approve
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user1
++ read line
++ case "$line" in
++ echo password=pass1
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential approve <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential approve
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ check approve cache
++ credential_opts=
++ credential_cmd=approve
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user2
++ read line
++ case "$line" in
++ echo password=pass2
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential approve <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential approve
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user1
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user1
++ read line
++ case "$line" in
++ echo password=pass1
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user2
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user2
++ read line
++ case "$line" in
++ echo password=pass2
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 9 - helper (cache) can store multiple users

expecting success: 
		check reject $HELPER <<-\EOF &&
		protocol=https
		host=example.com
		username=user1
		EOF
		check fill $HELPER <<-\EOF
		protocol=https
		host=example.com
		username=user1
		--
		protocol=https
		host=example.com
		username=user1
		password=askpass-password
		--
		askpass: Password for 'https://user1@example.com':
		EOF
	
++ check reject cache
++ credential_opts=
++ credential_cmd=reject
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user1
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential reject <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential reject
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user1
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user1
++ read line
++ case "$line" in
++ echo password=askpass-password
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo 'askpass: Password for '\''https://user1@example.com'\'':'
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 10 - helper (cache) can forget user

expecting success: 
		check fill $HELPER <<-\EOF
		protocol=https
		host=example.com
		username=user2
		--
		protocol=https
		host=example.com
		username=user2
		password=pass2
		EOF
	
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user2
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user2
++ read line
++ case "$line" in
++ echo password=pass2
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 11 - helper (cache) remembers other user

expecting success: 
	test_when_finished "
		git credential-cache exit &&
		rmdir -p .cache/git/credential/
	" &&
	test_path_is_missing "$HOME/.git-credential-cache" &&
	test -S "$HOME/.cache/git/credential/socket"

++ test_when_finished '
		git credential-cache exit &&
		rmdir -p .cache/git/credential/
	'
++ test 0 = 0
++ test_cleanup='{ 
		git credential-cache exit &&
		rmdir -p .cache/git/credential/
	
		} && (exit "$eval_ret"); eval_ret=$?; :'
++ test_path_is_missing '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git-credential-cache'
++ test -e '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git-credential-cache'
++ test -S '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.cache/git/credential/socket'
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
++ git credential-cache exit
fatal: read error from cache daemon: Connection reset by peer
++ eval_ret=128
++ :
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
not ok 12 - socket defaults to ~/.cache/git/credential/socket
#	
#		test_when_finished "
#			git credential-cache exit &&
#			rmdir -p .cache/git/credential/
#		" &&
#		test_path_is_missing "$HOME/.git-credential-cache" &&
#		test -S "$HOME/.cache/git/credential/socket"
#	

expecting success: 
		check fill $HELPER <<-\EOF
		protocol=https
		host=example.com
		--
		protocol=https
		host=example.com
		username=askpass-username
		password=askpass-password
		--
		askpass: Username for 'https://example.com':
		askpass: Password for 'https://askpass-username@example.com':
		EOF
	
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=askpass-username
++ read line
++ case "$line" in
++ echo password=askpass-password
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo 'askpass: Username for '\''https://example.com'\'':'
++ read line
++ case "$line" in
++ echo 'askpass: Password for '\''https://askpass-username@example.com'\'':'
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 13 - helper (cache) has no existing data

expecting success: 
		check approve $HELPER <<-\EOF
		protocol=https
		host=example.com
		username=store-user
		password=store-pass
		EOF
	
++ check approve cache
++ credential_opts=
++ credential_cmd=approve
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=store-user
++ read line
++ case "$line" in
++ echo password=store-pass
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential approve <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential approve
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 14 - helper (cache) stores password

expecting success: 
		check fill $HELPER <<-\EOF
		protocol=https
		host=example.com
		--
		protocol=https
		host=example.com
		username=store-user
		password=store-pass
		--
		EOF
	
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=store-user
++ read line
++ case "$line" in
++ echo password=store-pass
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 15 - helper (cache) can retrieve password

expecting success: 
		check fill $HELPER <<-\EOF
		protocol=http
		host=example.com
		--
		protocol=http
		host=example.com
		username=askpass-username
		password=askpass-password
		--
		askpass: Username for 'http://example.com':
		askpass: Password for 'http://askpass-username@example.com':
		EOF
	
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=http
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=http
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=askpass-username
++ read line
++ case "$line" in
++ echo password=askpass-password
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo 'askpass: Username for '\''http://example.com'\'':'
++ read line
++ case "$line" in
++ echo 'askpass: Password for '\''http://askpass-username@example.com'\'':'
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 16 - helper (cache) requires matching protocol

expecting success: 
		check fill $HELPER <<-\EOF
		protocol=https
		host=other.tld
		--
		protocol=https
		host=other.tld
		username=askpass-username
		password=askpass-password
		--
		askpass: Username for 'https://other.tld':
		askpass: Password for 'https://askpass-username@other.tld':
		EOF
	
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=other.tld
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=other.tld
++ read line
++ case "$line" in
++ echo username=askpass-username
++ read line
++ case "$line" in
++ echo password=askpass-password
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo 'askpass: Username for '\''https://other.tld'\'':'
++ read line
++ case "$line" in
++ echo 'askpass: Password for '\''https://askpass-username@other.tld'\'':'
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 17 - helper (cache) requires matching host

expecting success: 
		check fill $HELPER <<-\EOF
		protocol=https
		host=example.com
		username=other
		--
		protocol=https
		host=example.com
		username=other
		password=askpass-password
		--
		askpass: Password for 'https://other@example.com':
		EOF
	
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=other
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=other
++ read line
++ case "$line" in
++ echo password=askpass-password
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo 'askpass: Password for '\''https://other@example.com'\'':'
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 18 - helper (cache) requires matching username

expecting success: 
		test_config credential.usehttppath true &&
		check approve $HELPER <<-\EOF &&
		protocol=http
		host=path.tld
		path=foo.git
		username=user
		password=pass
		EOF
		check fill $HELPER <<-\EOF
		protocol=http
		host=path.tld
		path=bar.git
		--
		protocol=http
		host=path.tld
		path=bar.git
		username=askpass-username
		password=askpass-password
		--
		askpass: Username for 'http://path.tld/bar.git':
		askpass: Password for 'http://askpass-username@path.tld/bar.git':
		EOF
	
++ test_config credential.usehttppath true
++ config_dir=
++ test credential.usehttppath = -C
++ test_when_finished 'test_unconfig  '\''credential.usehttppath'\'''
++ test 0 = 0
++ test_cleanup='{ test_unconfig  '\''credential.usehttppath'\''
		} && (exit "$eval_ret"); eval_ret=$?; :'
++ git config credential.usehttppath true
++ check approve cache
++ credential_opts=
++ credential_cmd=approve
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=http
++ read line
++ case "$line" in
++ echo host=path.tld
++ read line
++ case "$line" in
++ echo path=foo.git
++ read line
++ case "$line" in
++ echo username=user
++ read line
++ case "$line" in
++ echo password=pass
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential approve <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential approve
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=http
++ read line
++ case "$line" in
++ echo host=path.tld
++ read line
++ case "$line" in
++ echo path=bar.git
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=http
++ read line
++ case "$line" in
++ echo host=path.tld
++ read line
++ case "$line" in
++ echo path=bar.git
++ read line
++ case "$line" in
++ echo username=askpass-username
++ read line
++ case "$line" in
++ echo password=askpass-password
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo 'askpass: Username for '\''http://path.tld/bar.git'\'':'
++ read line
++ case "$line" in
++ echo 'askpass: Password for '\''http://askpass-username@path.tld/bar.git'\'':'
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
++ test_unconfig credential.usehttppath
++ config_dir=
++ test credential.usehttppath = -C
++ git config --unset-all credential.usehttppath
++ config_status=0
++ case "$config_status" in
++ return 0
++ exit 0
++ eval_ret=0
++ :
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 19 - helper (cache) requires matching path

expecting success: 
		check reject $HELPER <<-\EOF &&
		protocol=https
		host=example.com
		EOF
		check fill $HELPER <<-\EOF
		protocol=https
		host=example.com
		--
		protocol=https
		host=example.com
		username=askpass-username
		password=askpass-password
		--
		askpass: Username for 'https://example.com':
		askpass: Password for 'https://askpass-username@example.com':
		EOF
	
++ check reject cache
++ credential_opts=
++ credential_cmd=reject
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential reject <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential reject
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=askpass-username
++ read line
++ case "$line" in
++ echo password=askpass-password
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo 'askpass: Username for '\''https://example.com'\'':'
++ read line
++ case "$line" in
++ echo 'askpass: Password for '\''https://askpass-username@example.com'\'':'
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 20 - helper (cache) can forget host

expecting success: 
		check approve $HELPER <<-\EOF &&
		protocol=https
		host=example.com
		username=user1
		password=pass1
		EOF
		check approve $HELPER <<-\EOF &&
		protocol=https
		host=example.com
		username=user2
		password=pass2
		EOF
		check fill $HELPER <<-\EOF &&
		protocol=https
		host=example.com
		username=user1
		--
		protocol=https
		host=example.com
		username=user1
		password=pass1
		EOF
		check fill $HELPER <<-\EOF
		protocol=https
		host=example.com
		username=user2
		--
		protocol=https
		host=example.com
		username=user2
		password=pass2
		EOF
	
++ check approve cache
++ credential_opts=
++ credential_cmd=approve
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user1
++ read line
++ case "$line" in
++ echo password=pass1
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential approve <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential approve
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ check approve cache
++ credential_opts=
++ credential_cmd=approve
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user2
++ read line
++ case "$line" in
++ echo password=pass2
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential approve <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential approve
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user1
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user1
++ read line
++ case "$line" in
++ echo password=pass1
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user2
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user2
++ read line
++ case "$line" in
++ echo password=pass2
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 21 - helper (cache) can store multiple users

expecting success: 
		check reject $HELPER <<-\EOF &&
		protocol=https
		host=example.com
		username=user1
		EOF
		check fill $HELPER <<-\EOF
		protocol=https
		host=example.com
		username=user1
		--
		protocol=https
		host=example.com
		username=user1
		password=askpass-password
		--
		askpass: Password for 'https://user1@example.com':
		EOF
	
++ check reject cache
++ credential_opts=
++ credential_cmd=reject
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user1
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential reject <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential reject
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user1
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user1
++ read line
++ case "$line" in
++ echo password=askpass-password
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo 'askpass: Password for '\''https://user1@example.com'\'':'
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 22 - helper (cache) can forget user

expecting success: 
		check fill $HELPER <<-\EOF
		protocol=https
		host=example.com
		username=user2
		--
		protocol=https
		host=example.com
		username=user2
		password=pass2
		EOF
	
++ check fill cache
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user2
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=user2
++ read line
++ case "$line" in
++ echo password=pass2
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 23 - helper (cache) remembers other user

expecting success: 
	test_when_finished "git credential-cache exit" &&
	test -S "$XDG_CACHE_HOME/git/credential/socket" &&
	test_path_is_missing "$HOME/.git-credential-cache/socket" &&
	test_path_is_missing "$HOME/.cache/git/credential/socket"

++ test_when_finished 'git credential-cache exit'
++ test 0 = 0
++ test_cleanup='{ git credential-cache exit
		} && (exit "$eval_ret"); eval_ret=$?; :'
++ test -S '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/xdg/git/credential/socket'
++ test_path_is_missing '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git-credential-cache/socket'
++ test -e '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git-credential-cache/socket'
++ test_path_is_missing '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.cache/git/credential/socket'
++ test -e '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.cache/git/credential/socket'
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
++ git credential-cache exit
fatal: read error from cache daemon: Connection reset by peer
++ eval_ret=128
++ :
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
not ok 24 - use custom XDG_CACHE_HOME if set and default sockets are not created
#	
#		test_when_finished "git credential-cache exit" &&
#		test -S "$XDG_CACHE_HOME/git/credential/socket" &&
#		test_path_is_missing "$HOME/.git-credential-cache/socket" &&
#		test_path_is_missing "$HOME/.cache/git/credential/socket"
#	

expecting success: 
	test_when_finished "
		git credential-cache exit --socket \"\$HOME/dir/socket\" &&
		rmdir \"\$HOME/dir\"
	" &&
	check approve "cache --socket \"\$HOME/dir/socket\"" <<-\EOF &&
	protocol=https
	host=example.com
	username=store-user
	password=store-pass
	EOF
	test -S "$HOME/dir/socket"

++ test_when_finished '
		git credential-cache exit --socket "$HOME/dir/socket" &&
		rmdir "$HOME/dir"
	'
++ test 0 = 0
++ test_cleanup='{ 
		git credential-cache exit --socket "$HOME/dir/socket" &&
		rmdir "$HOME/dir"
	
		} && (exit "$eval_ret"); eval_ret=$?; :'
++ check approve 'cache --socket "$HOME/dir/socket"'
++ credential_opts=
++ credential_cmd=approve
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache --socket "$HOME/dir/socket"'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=store-user
++ read line
++ case "$line" in
++ echo password=store-pass
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache --socket "$HOME/dir/socket"'\'' credential approve <stdin >stdout 2>stderr'
+++ git -c 'credential.helper=cache --socket "$HOME/dir/socket"' credential approve
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ test -S '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/dir/socket'
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
++ git credential-cache exit --socket '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/dir/socket'
fatal: read error from cache daemon: Connection reset by peer
++ eval_ret=128
++ :
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
not ok 25 - credential-cache --socket option overrides default location
#	
#		test_when_finished "
#			git credential-cache exit --socket \"\$HOME/dir/socket\" &&
#			rmdir \"\$HOME/dir\"
#		" &&
#		check approve "cache --socket \"\$HOME/dir/socket\"" <<-\EOF &&
#		protocol=https
#		host=example.com
#		username=store-user
#		password=store-pass
#		EOF
#		test -S "$HOME/dir/socket"
#	

expecting success: 
	test_when_finished "
		git credential-cache exit &&
		sane_unset XDG_CACHE_HOME
	" &&
	check approve cache <<-\EOF &&
	protocol=https
	host=example.com
	username=store-user
	password=store-pass
	EOF
	test -S "$HOME/.cache/git/credential/socket" &&
	XDG_CACHE_HOME="$HOME/xdg" &&
	export XDG_CACHE_HOME &&
	check approve cache <<-\EOF &&
	protocol=https
	host=example.com
	username=store-user
	password=store-pass
	EOF
	test -S "$XDG_CACHE_HOME/git/credential/socket"

++ test_when_finished '
		git credential-cache exit &&
		sane_unset XDG_CACHE_HOME
	'
++ test 0 = 0
++ test_cleanup='{ 
		git credential-cache exit &&
		sane_unset XDG_CACHE_HOME
	
		} && (exit "$eval_ret"); eval_ret=$?; :'
++ check approve cache
++ credential_opts=
++ credential_cmd=approve
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=store-user
++ read line
++ case "$line" in
++ echo password=store-pass
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential approve <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential approve
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ test -S '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.cache/git/credential/socket'
++ XDG_CACHE_HOME='/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/xdg'
++ export XDG_CACHE_HOME
++ check approve cache
++ credential_opts=
++ credential_cmd=approve
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=store-user
++ read line
++ case "$line" in
++ echo password=store-pass
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential approve <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential approve
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ test -S '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/xdg/git/credential/socket'
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
++ git credential-cache exit
fatal: read error from cache daemon: Connection reset by peer
++ eval_ret=128
++ :
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
not ok 26 - use custom XDG_CACHE_HOME even if xdg socket exists
#	
#		test_when_finished "
#			git credential-cache exit &&
#			sane_unset XDG_CACHE_HOME
#		" &&
#		check approve cache <<-\EOF &&
#		protocol=https
#		host=example.com
#		username=store-user
#		password=store-pass
#		EOF
#		test -S "$HOME/.cache/git/credential/socket" &&
#		XDG_CACHE_HOME="$HOME/xdg" &&
#		export XDG_CACHE_HOME &&
#		check approve cache <<-\EOF &&
#		protocol=https
#		host=example.com
#		username=store-user
#		password=store-pass
#		EOF
#		test -S "$XDG_CACHE_HOME/git/credential/socket"
#	

expecting success: 
	test_when_finished "
		git credential-cache exit &&
		rmdir \"\$HOME/.git-credential-cache/\"
	" &&
	mkdir -p -m 700 "$HOME/.git-credential-cache/" &&
	check approve cache <<-\EOF &&
	protocol=https
	host=example.com
	username=store-user
	password=store-pass
	EOF
	test -S "$HOME/.git-credential-cache/socket"

++ test_when_finished '
		git credential-cache exit &&
		rmdir "$HOME/.git-credential-cache/"
	'
++ test 0 = 0
++ test_cleanup='{ 
		git credential-cache exit &&
		rmdir "$HOME/.git-credential-cache/"
	
		} && (exit "$eval_ret"); eval_ret=$?; :'
++ mkdir -p -m 700 '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git-credential-cache/'
++ check approve cache
++ credential_opts=
++ credential_cmd=approve
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=store-user
++ read line
++ case "$line" in
++ echo password=store-pass
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential approve <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential approve
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ test -S '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git-credential-cache/socket'
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
++ git credential-cache exit
fatal: read error from cache daemon: Connection reset by peer
++ eval_ret=128
++ :
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
not ok 27 - use user socket if user directory exists
#	
#		test_when_finished "
#			git credential-cache exit &&
#			rmdir \"\$HOME/.git-credential-cache/\"
#		" &&
#		mkdir -p -m 700 "$HOME/.git-credential-cache/" &&
#		check approve cache <<-\EOF &&
#		protocol=https
#		host=example.com
#		username=store-user
#		password=store-pass
#		EOF
#		test -S "$HOME/.git-credential-cache/socket"
#	

checking prerequisite: SYMLINKS

mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
	cd "$TRASH_DIRECTORY/prereq-test-dir" &&
	# test whether the filesystem supports symbolic links
	ln -s x y && test -h y

)
++ mkdir -p '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/prereq-test-dir'
++ cd '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/prereq-test-dir'
++ ln -s x y
++ test -h y
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
prerequisite SYMLINKS ok
expecting success: 
	test_when_finished "
		git credential-cache exit &&
		rmdir \"\$HOME/dir/\" &&
		rm \"\$HOME/.git-credential-cache\"
	" &&
	mkdir -p -m 700 "$HOME/dir/" &&
	ln -s "$HOME/dir" "$HOME/.git-credential-cache" &&
	check approve cache <<-\EOF &&
	protocol=https
	host=example.com
	username=store-user
	password=store-pass
	EOF
	test -S "$HOME/.git-credential-cache/socket"

++ test_when_finished '
		git credential-cache exit &&
		rmdir "$HOME/dir/" &&
		rm "$HOME/.git-credential-cache"
	'
++ test 0 = 0
++ test_cleanup='{ 
		git credential-cache exit &&
		rmdir "$HOME/dir/" &&
		rm "$HOME/.git-credential-cache"
	
		} && (exit "$eval_ret"); eval_ret=$?; :'
++ mkdir -p -m 700 '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/dir/'
++ ln -s '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/dir' '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git-credential-cache'
++ check approve cache
++ credential_opts=
++ credential_cmd=approve
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=example.com
++ read line
++ case "$line" in
++ echo username=store-user
++ read line
++ case "$line" in
++ echo password=store-pass
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache'\'' credential approve <stdin >stdout 2>stderr'
+++ git -c credential.helper=cache credential approve
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ test -S '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/.git-credential-cache/socket'
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
++ git credential-cache exit
fatal: read error from cache daemon: Connection reset by peer
++ eval_ret=128
++ :
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
not ok 28 - use user socket if user directory is a symlink to a directory
#	
#		test_when_finished "
#			git credential-cache exit &&
#			rmdir \"\$HOME/dir/\" &&
#			rm \"\$HOME/.git-credential-cache\"
#		" &&
#		mkdir -p -m 700 "$HOME/dir/" &&
#		ln -s "$HOME/dir" "$HOME/.git-credential-cache" &&
#		check approve cache <<-\EOF &&
#		protocol=https
#		host=example.com
#		username=store-user
#		password=store-pass
#		EOF
#		test -S "$HOME/.git-credential-cache/socket"
#	

expecting success: 
		check approve "$HELPER" <<-\EOF &&
		protocol=https
		host=timeout.tld
		username=user
		password=pass
		EOF
		sleep 2 &&
		check fill "$HELPER" <<-\EOF
		protocol=https
		host=timeout.tld
		--
		protocol=https
		host=timeout.tld
		username=askpass-username
		password=askpass-password
		--
		askpass: Username for 'https://timeout.tld':
		askpass: Password for 'https://askpass-username@timeout.tld':
		EOF
	
++ check approve 'cache --timeout=1'
++ credential_opts=
++ credential_cmd=approve
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache --timeout=1'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=timeout.tld
++ read line
++ case "$line" in
++ echo username=user
++ read line
++ case "$line" in
++ echo password=pass
++ read line
++ read_chunk
++ read line
++ read_chunk
++ read line
++ eval 'git  -c credential.helper='\''cache --timeout=1'\'' credential approve <stdin >stdout 2>stderr'
+++ git -c 'credential.helper=cache --timeout=1' credential approve
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
++ sleep 2
++ check fill 'cache --timeout=1'
++ credential_opts=
++ credential_cmd=fill
++ shift
++ for arg in "$@"
++ credential_opts=' -c credential.helper='\''cache --timeout=1'\'''
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=timeout.tld
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo protocol=https
++ read line
++ case "$line" in
++ echo host=timeout.tld
++ read line
++ case "$line" in
++ echo username=askpass-username
++ read line
++ case "$line" in
++ echo password=askpass-password
++ read line
++ case "$line" in
++ break
++ read_chunk
++ read line
++ case "$line" in
++ echo 'askpass: Username for '\''https://timeout.tld'\'':'
++ read line
++ case "$line" in
++ echo 'askpass: Password for '\''https://askpass-username@timeout.tld'\'':'
++ read line
++ eval 'git  -c credential.helper='\''cache --timeout=1'\'' credential fill <stdin >stdout 2>stderr'
+++ git -c 'credential.helper=cache --timeout=1' credential fill
++ test_cmp expect-stdout stdout
++ diff -u expect-stdout stdout
++ test_cmp expect-stderr stderr
++ diff -u expect-stderr stderr
+ test_eval_ret_=0
+ want_trace
+ test t = t
+ test t = t
+ set +x
ok 29 - helper (cache --timeout=1) times out

fatal: read error from cache daemon: Connection reset by peer
# failed 6 among 29 test(s)
1..29

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-04 14:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-23 14:44 git v2.13.0-rc0 test failures on cygwin Ramsay Jones
2017-04-28 11:44 ` Adam Dinwoodie
2017-04-28 19:20   ` Devin Lehmacher
2017-05-04 14:26     ` Adam Dinwoodie

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).