{"thread":{"id":"45778","subject":"git v2.13.0-rc0 test failures on cygwin","startedAt":"2017-04-23T14:44:59Z","lastAt":"2017-05-04T14:27:39Z","messageCount":4,"participants":["Ramsay Jones","Adam Dinwoodie","Devin Lehmacher"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"317560","messageId":"bf7db655-d90f-e711-afc8-6565b71373d2@ramsayjones.plus.com","threadId":"45778","inReplyTo":null,"subject":"git v2.13.0-rc0 test failures on cygwin","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2017-04-23T14:44:06Z","receivedAt":"2017-04-23T14:44:59Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Hi Junio, Adam,\n\n[Adam, if you are no longer the git package maintainer for cygwin, then\nplease ignore this email and sorry for the noise!]\n\nOn thursday evening, I ran the test-suite on the newly minted v2.13.0-rc0\nrelease on cygwin, which unfortunately failed (the 'test-out' files are\nfrom the most recent test runs for v2.13.0-rc0, v2.12.0-rc0, v2.12.0-rc1\nand v2.12.0 - I missed the v2.12.0-rc2 release!):\n\n$ ls -l test-out*\n-rw-r--r-- 1 ramsay None 104K Apr 20 22:29 test-out\n-rw-r--r-- 1 ramsay None 103K Feb  5 00:57 test-out.old1\n-rw-r--r-- 1 ramsay None 103K Feb 12 00:29 test-out.old2\n-rw-r--r-- 1 ramsay None 103K Feb 25 01:14 test-out.old3\n$ \n$ grep FAIL test-out*\ntest-out:Result: FAIL\n$ \n$ tail -15 test-out\n[22:29:51]\n\nTest Summary Report\n-------------------\nt0301-credential-cache.sh                        (Wstat: 256 Tests: 29 Failed: 6)\n  Failed tests:  12, 24-28\n  Non-zero exit status: 1\nt8010-cat-file-filters.sh                        (Wstat: 256 Tests: 8 Failed: 1)\n  Failed test:  8\n  Non-zero exit status: 1\nFiles=780, Tests=14700, 10398 wallclock secs ( 1.27 usr  0.78 sys + 1265.08 cusr 4076.38 csys = 5343.50 CPU)\nResult: FAIL\nmake[1]: *** [Makefile:45: prove] Error 1\nmake[1]: Leaving directory '/home/ramsay/git/t'\nmake: *** [Makefile:2313: test] Error 2\n$\n\nI was a bit surprised about the 'credential-cache' failures (I didn't think\nthey were being run on cygwin!), but I haven't spent any time looking at\nthat yet. So, looking at the t8010 test failure:\n\n$ grep t8010 test-out*\ntest-out:[22:20:20] t8010-cat-file-filters.sh ..........................\ntest-out:t8010-cat-file-filters.sh                        (Wstat: 256 Tests: 8 Failed: 1)\ntest-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)\ntest-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)\ntest-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)\n$\n\nSo, this test was passing on the three previous runs and nothing seems to\nhave changed in the interval. Hmm, except that the previous evening I had\nupdated my cygwin installation (according to my setup.log file, the cygwin\ndll version went from 2.7.0-1 to 2.8.0-1). As a quick test, I rebuilt the\nv2.12.0 version, which has previously worked, and ran the t8010 test\nrepeatedly; it failed consistently. Hmm, back to the v2.13.0-rc0 failure:\n\n$ cd t\n$ ./t8010-cat-file-filters.sh -i -v\n\n...\n\nok 7 - --path=<path> complains without --textconv/--filters\n\nexpecting success:\n        sha1=$(git rev-parse -q --verify HEAD:world.txt) &&\n        test_config diff.txt.textconv \"tr A-Za-z N-ZA-Mn-za-m <\" &&\n        printf \"%s hello.txt\\n%s hello\\n\" $sha1 $sha1 |\n        git cat-file --textconv --batch >actual &&\n        printf \"%s blob 6\\nuryyb\\r\\n\\n%s blob 6\\nhello\\n\\n\" \\\n                $sha1 $sha1 >expect &&\n        test_cmp expect actual\n\n--- expect      2017-04-23 12:40:07.899086200 +0000\n+++ actual      2017-04-23 12:40:07.883459900 +0000\n@@ -1,6 +1,3 @@\n ce013625030ba8dba906f756967f9e9ca394464a blob 6\n uryyb\n\n-ce013625030ba8dba906f756967f9e9ca394464a blob 6\n-hello\n-\nnot ok 8 - cat-file --textconv --batch works\n#\n#               sha1=$(git rev-parse -q --verify HEAD:world.txt) &&\n#               test_config diff.txt.textconv \"tr A-Za-z N-ZA-Mn-za-m <\" &&\n#               printf \"%s hello.txt\\n%s hello\\n\" $sha1 $sha1 |\n#               git cat-file --textconv --batch >actual &&\n#               printf \"%s blob 6\\nuryyb\\r\\n\\n%s blob 6\\nhello\\n\\n\" \\\n#                       $sha1 $sha1 >expect &&\n#               test_cmp expect actual\n#\n$\n\nOK, lets go run it by hand:\n\n$ cd trash\\ directory.t8010-cat-file-filters/\n$ sha1=$(git rev-parse -q --verify HEAD:world.txt)\n$ printf \"%s hello.txt\\n%s hello\\n\" $sha1 $sha1 |\n> git cat-file --textconv --batch\nce013625030ba8dba906f756967f9e9ca394464a blob 6\nuryyb\n\n$\n\nHaving run it in the debugger, the loop in batch_objects() (builtin/cat-file.c\nlines #489-505) only reads one line from stdin, then gets EOF on the stream.\n\n$ printf \"%s hello.txt\\n%s hello\\n\" $sha1 $sha1 | cat\nce013625030ba8dba906f756967f9e9ca394464a hello.txt\nce013625030ba8dba906f756967f9e9ca394464a hello\n$\n\n$ printf \"%s hello.txt\\n%s hello\\n\" $sha1 $sha1 |\n> git cat-file --batch\nce013625030ba8dba906f756967f9e9ca394464a hello.txt missing\nce013625030ba8dba906f756967f9e9ca394464a hello missing\n$\n\n$ printf \"%s hello.txt\\n%s hello\\n\" $sha1 $sha1 >input\n$ git cat-file --textconv --batch <input\nce013625030ba8dba906f756967f9e9ca394464a blob 6\nuryyb\n\nce013625030ba8dba906f756967f9e9ca394464a blob 6\nhello\n\n$\n\nAh, so it looks like running the textconv filter program is somehow causing\nthe standard input stream of the 'git-cat-file' process to be closed (or\notherwise truncated). Hmm, somewhat odd! ;-)\n\nAlso, I have the cygwin git package installed (which was updated to a newer\nversion than my current ~/bin version):\n\n$ /usr/bin/git version\ngit version 2.12.2\n$ printf \"%s hello.txt\\n%s hello\\n\" $sha1 $sha1 | /usr/bin/git cat-file --textconv --batch\nce013625030ba8dba906f756967f9e9ca394464a blob 6\nuryyb\n\n$\n\n... which also suffers from this problem (with the 2.8.0-1 version of the\ncygwin dll, anyway).\n\nSo, I hacked up a version of 'cat-file' (diff given below), which slurped up\nall of the input into an array of strbuf's, before passing each line to the\nbatch_one_object() function for processing (possibly by the external textconv\nprocess). This version passes the test.\n\nThis is _not_ the solution, of course. It simply sidesteps the issue, which\nseems to be caused by an update to the cygwin dll. I don't want to call this\na bug, because I have no evidence of that, rather than an unfortunate change\nin behaviour. (git stresses the cygwin posix fork/exec implementation rather\na lot!).\n\nI'm not sure how to proceed from here. (I don't know if it is even possible\nto 'downgrade' my cygwin installation in order to confirm that the current\ngit-cat-file would work with the 2.7.0-1 version of the cygwin dll).\n\nHopefully, someone more clueful than me can tackle this from the cygwin api\nside of things. (Also, I suppose this could possibly affect Msys2, if they\nport the cygwin dll change).\n\nATB,\nRamsay Jones\n \n-- >8 --\n\ndiff --git a/builtin/cat-file.c b/builtin/cat-file.c\nindex 1890d7a63..da5e45d75 100644\n--- a/builtin/cat-file.c\n+++ b/builtin/cat-file.c\n@@ -426,12 +426,31 @@ static int batch_packed_object(const struct object_id *oid,\n \treturn 0;\n }\n \n+static struct strbuf **strbuf_getlines(FILE *fp)\n+{\n+\tstruct strbuf **ret = NULL;\n+\tsize_t nr = 0, alloc = 0;\n+\tstruct strbuf *t, b = STRBUF_INIT;\n+\n+\twhile (strbuf_getline(&b, fp) != EOF) {\n+\t\tt = xmalloc(sizeof(struct strbuf));\n+\t\tstrbuf_init(t, b.len);\n+\t\tstrbuf_addbuf(t, &b);\n+\t\tALLOC_GROW(ret, nr + 1, alloc);\n+\t\tret[nr++] = t;\n+\t}\n+\tALLOC_GROW(ret, nr + 1, alloc);\n+\tret[nr] = NULL;\n+\treturn ret;\n+}\n+\n static int batch_objects(struct batch_options *opt)\n {\n \tstruct strbuf buf = STRBUF_INIT;\n \tstruct expand_data data;\n \tint save_warning;\n \tint retval = 0;\n+\tstruct strbuf **lines, **l;\n \n \tif (!opt->format)\n \t\topt->format = \"%(objectname) %(objecttype) %(objectsize)\";\n@@ -486,7 +505,13 @@ static int batch_objects(struct batch_options *opt)\n \tsave_warning = warn_on_object_refname_ambiguity;\n \twarn_on_object_refname_ambiguity = 0;\n \n-\twhile (strbuf_getline(&buf, stdin) != EOF) {\n+\tstrbuf_release(&buf);\n+\tlines = strbuf_getlines(stdin);\n+\n+\tfor (l = lines; *l; l++) {\n+\t\tstrbuf_reset(&buf);\n+\t\tstrbuf_addbuf(&buf, *l);\n+\n \t\tif (data.split_on_whitespace) {\n \t\t\t/*\n \t\t\t * Split at first whitespace, tying off the beginning\n@@ -503,6 +528,7 @@ static int batch_objects(struct batch_options *opt)\n \n \t\tbatch_one_object(buf.buf, opt, &data);\n \t}\n+\tstrbuf_list_free(lines);\n \n \tstrbuf_release(&buf);\n \twarn_on_object_refname_ambiguity = save_warning;\n"},{"id":"318148","messageId":"CA+kUOanMdez0Gu1z=bULMm0vMnFx8p12nt-e7v5LvyAiLu_45Q@mail.gmail.com","threadId":"45778","inReplyTo":"bf7db655-d90f-e711-afc8-6565b71373d2@ramsayjones.plus.com","subject":"Re: git v2.13.0-rc0 test failures on cygwin","fromName":"Adam Dinwoodie","fromEmail":"adam@dinwoodie.org","sentAt":"2017-04-28T11:44:48Z","receivedAt":"2017-04-28T11:45:37Z","isPatch":false,"sender":{"key":"adam@dinwoodie.org","avatar":"https://avatars.githubusercontent.com/u/1397507?v=4"},"body":"On 23 April 2017 at 15:44, Ramsay Jones wrote:\n> [Adam, if you are no longer the git package maintainer for cygwin, then\n> please ignore this email and sorry for the noise!]\n\nI am still the Cygwin Git package maintainer; I've been quiet of late\nbecause of personal health issues, but I'm now picking things back up\nagain.\n\n> Test Summary Report\n> -------------------\n> t0301-credential-cache.sh                        (Wstat: 256 Tests: 29 Failed: 6)\n>   Failed tests:  12, 24-28\n>   Non-zero exit status: 1\n\nConfirmed I'm seeing this on v2.13.0-rc1, and this passed in v2.12.2.\n`git bisect` tells me this failure was introduced by commit\nv2.12.0-267-g612c49e94, added by Devin Lehmacher (added to the CC\nlist).\n\n> t8010-cat-file-filters.sh                        (Wstat: 256 Tests: 8 Failed: 1)\n>   Failed test:  8\n>   Non-zero exit status: 1\n> Files=780, Tests=14700, 10398 wallclock secs ( 1.27 usr  0.78 sys + 1265.08 cusr 4076.38 csys = 5343.50 CPU)\n> Result: FAIL\n> make[1]: *** [Makefile:45: prove] Error 1\n> make[1]: Leaving directory '/home/ramsay/git/t'\n> make: *** [Makefile:2313: test] Error 2\n\nI also see this failure; `git bisect` tells me it was introduced by\nv2.10.0-rc1-4-g321459439, added by Johannes Schindelin.\n\n> I'm not sure how to proceed from here. (I don't know if it is even possible\n> to 'downgrade' my cygwin installation in order to confirm that the current\n> git-cat-file would work with the 2.7.0-1 version of the cygwin dll).\n\nI believe (although I've never done it myself) you can get old\nversions of Cygwin packages via the Cygwin Time Machine at\nhttp://www.crouchingtigerhiddenfruitbat.org/Cygwin/timemachine.html.\n\nI'm sufficiently over-committed at the moment that I'm unlikely to be\nable to spend time investigating these problems myself, but I'm happy\nto test patches &c on my local installation if that would be valuable.\n\nAdam\n"},{"id":"318196","messageId":"20170428192020.GA17052@mango1","threadId":"45778","inReplyTo":"CA+kUOanMdez0Gu1z=bULMm0vMnFx8p12nt-e7v5LvyAiLu_45Q@mail.gmail.com","subject":"Re: git v2.13.0-rc0 test failures on cygwin","fromName":"Devin Lehmacher","fromEmail":"lehmacdj@gmail.com","sentAt":"2017-04-28T19:20:21Z","receivedAt":"2017-04-28T19:20:33Z","isPatch":false,"sender":{"key":"lehmacdj@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13156983?v=4"},"body":"> > Test Summary Report\n> > -------------------\n> > t0301-credential-cache.sh                        (Wstat: 256 Tests: 29 Failed: 6)\n> >   Failed tests:  12, 24-28\n> >   Non-zero exit status: 1\n>\n> Confirmed I'm seeing this on v2.13.0-rc1, and this passed in v2.12.2.\n> `git bisect` tells me this failure was introduced by commit\n> v2.12.0-267-g612c49e94, added by Devin Lehmacher (added to the CC\n> list).\n\nCan someone with cygwin check that `test -S` works on cygwin?\n\nThe only that tests that failed are those that use `test -S` to check\nfor the existence of a socket.\n\nI'll also take a look at verbose test output (maybe with a trace too)\nfor t0301 if someone sends me that.\n\n-Devin\n"},{"id":"318787","messageId":"20170504142645.GC3238@dinwoodie.org","threadId":"45778","inReplyTo":"20170428192020.GA17052@mango1","subject":"Re: git v2.13.0-rc0 test failures on cygwin","fromName":"Adam Dinwoodie","fromEmail":"adam@dinwoodie.org","sentAt":"2017-05-04T14:26:45Z","receivedAt":"2017-05-04T14:27:39Z","isPatch":false,"sender":{"key":"adam@dinwoodie.org","avatar":"https://avatars.githubusercontent.com/u/1397507?v=4"},"body":"On Fri, Apr 28, 2017 at 03:20:21PM -0400, Devin Lehmacher wrote:\n> > > Test Summary Report\n> > > -------------------\n> > > t0301-credential-cache.sh                        (Wstat: 256 Tests: 29 Failed: 6)\n> > >   Failed tests:  12, 24-28\n> > >   Non-zero exit status: 1\n> >\n> > Confirmed I'm seeing this on v2.13.0-rc1, and this passed in v2.12.2.\n> > `git bisect` tells me this failure was introduced by commit\n> > v2.12.0-267-g612c49e94, added by Devin Lehmacher (added to the CC\n> > list).\n> \n> Can someone with cygwin check that `test -S` works on cygwin?\n\nSeems to work for me, using both Bash's built-in `test` and `/bin/test`:\n\n    $ socat UNIX-LISTEN:socket-file LISTEN:socket-file &\n    [1] 2976\n\n    $ ls -l socket-file\n    srw-r--r-- 1 add Domain Users 0 May  4 15:08 socket-file\n\n    $ type test\n    test is a shell builtin\n\n    $ test -S socket-file && echo success\n    success\n\n    $ /bin/test -S socket-file && echo success\n    success\n\n    $ touch regular-file\n\n    $ test -S regular-file && echo success\n\n    $ /bin/test -S regular-file && echo success\n\n    $ test -S non-existant-file && echo success\n\n    $ /bin/test -S non-existant-file && echo success\n\n> I'll also take a look at verbose test output (maybe with a trace too)\n> for t0301 if someone sends me that.\n\nThe verbose t0301.12 output is below; the verbose test output from the other\nfailing tests is more-or-less identical.  I've attached the full trace\noutput, too: it looks like the fatal error below is on the `git\ncredential-cache exit` commands.\n\n    fatal: read error from cache daemon: Connection reset by peer\n    not ok 12 - socket defaults to ~/.cache/git/credential/socket\n    #\n    #               test_when_finished \"\n    #                       git credential-cache exit &&\n    #                       rmdir -p .cache/git/credential/\n    #               \" &&\n    #               test_path_is_missing \"$HOME/.git-credential-cache\" &&\n    #               test -S \"$HOME/.cache/git/credential/socket\"\n    #\n\nThis specific output came from v2.13.0-rc1 on an up-to-date 64-bit\nCygwin installation.  I'm happy to experiment with other build options /\npatches / environments / &c. if that would be useful.\n\nAdam\n\n\nInitialized 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/\nexpecting success: \n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=example.com\n\t\t--\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=askpass-username\n\t\tpassword=askpass-password\n\t\t--\n\t\taskpass: Username for 'https://example.com':\n\t\taskpass: Password for 'https://askpass-username@example.com':\n\t\tEOF\n\t\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=askpass-username\n++ read line\n++ case \"$line\" in\n++ echo password=askpass-password\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Username for '\\''https://example.com'\\'':'\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Password for '\\''https://askpass-username@example.com'\\'':'\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 1 - helper (cache) has no existing data\n\nexpecting success: \n\t\tcheck approve $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=store-user\n\t\tpassword=store-pass\n\t\tEOF\n\t\n++ check approve cache\n++ credential_opts=\n++ credential_cmd=approve\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=store-user\n++ read line\n++ case \"$line\" in\n++ echo password=store-pass\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential approve <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential approve\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 2 - helper (cache) stores password\n\nexpecting success: \n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=example.com\n\t\t--\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=store-user\n\t\tpassword=store-pass\n\t\t--\n\t\tEOF\n\t\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=store-user\n++ read line\n++ case \"$line\" in\n++ echo password=store-pass\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 3 - helper (cache) can retrieve password\n\nexpecting success: \n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=http\n\t\thost=example.com\n\t\t--\n\t\tprotocol=http\n\t\thost=example.com\n\t\tusername=askpass-username\n\t\tpassword=askpass-password\n\t\t--\n\t\taskpass: Username for 'http://example.com':\n\t\taskpass: Password for 'http://askpass-username@example.com':\n\t\tEOF\n\t\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=http\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=http\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=askpass-username\n++ read line\n++ case \"$line\" in\n++ echo password=askpass-password\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Username for '\\''http://example.com'\\'':'\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Password for '\\''http://askpass-username@example.com'\\'':'\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 4 - helper (cache) requires matching protocol\n\nexpecting success: \n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=other.tld\n\t\t--\n\t\tprotocol=https\n\t\thost=other.tld\n\t\tusername=askpass-username\n\t\tpassword=askpass-password\n\t\t--\n\t\taskpass: Username for 'https://other.tld':\n\t\taskpass: Password for 'https://askpass-username@other.tld':\n\t\tEOF\n\t\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=other.tld\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=other.tld\n++ read line\n++ case \"$line\" in\n++ echo username=askpass-username\n++ read line\n++ case \"$line\" in\n++ echo password=askpass-password\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Username for '\\''https://other.tld'\\'':'\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Password for '\\''https://askpass-username@other.tld'\\'':'\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 5 - helper (cache) requires matching host\n\nexpecting success: \n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=other\n\t\t--\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=other\n\t\tpassword=askpass-password\n\t\t--\n\t\taskpass: Password for 'https://other@example.com':\n\t\tEOF\n\t\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=other\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=other\n++ read line\n++ case \"$line\" in\n++ echo password=askpass-password\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Password for '\\''https://other@example.com'\\'':'\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 6 - helper (cache) requires matching username\n\nexpecting success: \n\t\ttest_config credential.usehttppath true &&\n\t\tcheck approve $HELPER <<-\\EOF &&\n\t\tprotocol=http\n\t\thost=path.tld\n\t\tpath=foo.git\n\t\tusername=user\n\t\tpassword=pass\n\t\tEOF\n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=http\n\t\thost=path.tld\n\t\tpath=bar.git\n\t\t--\n\t\tprotocol=http\n\t\thost=path.tld\n\t\tpath=bar.git\n\t\tusername=askpass-username\n\t\tpassword=askpass-password\n\t\t--\n\t\taskpass: Username for 'http://path.tld/bar.git':\n\t\taskpass: Password for 'http://askpass-username@path.tld/bar.git':\n\t\tEOF\n\t\n++ test_config credential.usehttppath true\n++ config_dir=\n++ test credential.usehttppath = -C\n++ test_when_finished 'test_unconfig  '\\''credential.usehttppath'\\'''\n++ test 0 = 0\n++ test_cleanup='{ test_unconfig  '\\''credential.usehttppath'\\''\n\t\t} && (exit \"$eval_ret\"); eval_ret=$?; :'\n++ git config credential.usehttppath true\n++ check approve cache\n++ credential_opts=\n++ credential_cmd=approve\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=http\n++ read line\n++ case \"$line\" in\n++ echo host=path.tld\n++ read line\n++ case \"$line\" in\n++ echo path=foo.git\n++ read line\n++ case \"$line\" in\n++ echo username=user\n++ read line\n++ case \"$line\" in\n++ echo password=pass\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential approve <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential approve\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=http\n++ read line\n++ case \"$line\" in\n++ echo host=path.tld\n++ read line\n++ case \"$line\" in\n++ echo path=bar.git\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=http\n++ read line\n++ case \"$line\" in\n++ echo host=path.tld\n++ read line\n++ case \"$line\" in\n++ echo path=bar.git\n++ read line\n++ case \"$line\" in\n++ echo username=askpass-username\n++ read line\n++ case \"$line\" in\n++ echo password=askpass-password\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Username for '\\''http://path.tld/bar.git'\\'':'\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Password for '\\''http://askpass-username@path.tld/bar.git'\\'':'\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\n++ test_unconfig credential.usehttppath\n++ config_dir=\n++ test credential.usehttppath = -C\n++ git config --unset-all credential.usehttppath\n++ config_status=0\n++ case \"$config_status\" in\n++ return 0\n++ exit 0\n++ eval_ret=0\n++ :\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 7 - helper (cache) requires matching path\n\nexpecting success: \n\t\tcheck reject $HELPER <<-\\EOF &&\n\t\tprotocol=https\n\t\thost=example.com\n\t\tEOF\n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=example.com\n\t\t--\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=askpass-username\n\t\tpassword=askpass-password\n\t\t--\n\t\taskpass: Username for 'https://example.com':\n\t\taskpass: Password for 'https://askpass-username@example.com':\n\t\tEOF\n\t\n++ check reject cache\n++ credential_opts=\n++ credential_cmd=reject\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential reject <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential reject\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=askpass-username\n++ read line\n++ case \"$line\" in\n++ echo password=askpass-password\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Username for '\\''https://example.com'\\'':'\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Password for '\\''https://askpass-username@example.com'\\'':'\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 8 - helper (cache) can forget host\n\nexpecting success: \n\t\tcheck approve $HELPER <<-\\EOF &&\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user1\n\t\tpassword=pass1\n\t\tEOF\n\t\tcheck approve $HELPER <<-\\EOF &&\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user2\n\t\tpassword=pass2\n\t\tEOF\n\t\tcheck fill $HELPER <<-\\EOF &&\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user1\n\t\t--\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user1\n\t\tpassword=pass1\n\t\tEOF\n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user2\n\t\t--\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user2\n\t\tpassword=pass2\n\t\tEOF\n\t\n++ check approve cache\n++ credential_opts=\n++ credential_cmd=approve\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user1\n++ read line\n++ case \"$line\" in\n++ echo password=pass1\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential approve <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential approve\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ check approve cache\n++ credential_opts=\n++ credential_cmd=approve\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user2\n++ read line\n++ case \"$line\" in\n++ echo password=pass2\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential approve <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential approve\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user1\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user1\n++ read line\n++ case \"$line\" in\n++ echo password=pass1\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user2\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user2\n++ read line\n++ case \"$line\" in\n++ echo password=pass2\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 9 - helper (cache) can store multiple users\n\nexpecting success: \n\t\tcheck reject $HELPER <<-\\EOF &&\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user1\n\t\tEOF\n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user1\n\t\t--\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user1\n\t\tpassword=askpass-password\n\t\t--\n\t\taskpass: Password for 'https://user1@example.com':\n\t\tEOF\n\t\n++ check reject cache\n++ credential_opts=\n++ credential_cmd=reject\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user1\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential reject <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential reject\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user1\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user1\n++ read line\n++ case \"$line\" in\n++ echo password=askpass-password\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Password for '\\''https://user1@example.com'\\'':'\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 10 - helper (cache) can forget user\n\nexpecting success: \n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user2\n\t\t--\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user2\n\t\tpassword=pass2\n\t\tEOF\n\t\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user2\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user2\n++ read line\n++ case \"$line\" in\n++ echo password=pass2\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 11 - helper (cache) remembers other user\n\nexpecting success: \n\ttest_when_finished \"\n\t\tgit credential-cache exit &&\n\t\trmdir -p .cache/git/credential/\n\t\" &&\n\ttest_path_is_missing \"$HOME/.git-credential-cache\" &&\n\ttest -S \"$HOME/.cache/git/credential/socket\"\n\n++ test_when_finished '\n\t\tgit credential-cache exit &&\n\t\trmdir -p .cache/git/credential/\n\t'\n++ test 0 = 0\n++ test_cleanup='{ \n\t\tgit credential-cache exit &&\n\t\trmdir -p .cache/git/credential/\n\t\n\t\t} && (exit \"$eval_ret\"); eval_ret=$?; :'\n++ 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'\n++ 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'\n++ 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'\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\n++ git credential-cache exit\nfatal: read error from cache daemon: Connection reset by peer\n++ eval_ret=128\n++ :\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nnot ok 12 - socket defaults to ~/.cache/git/credential/socket\n#\t\n#\t\ttest_when_finished \"\n#\t\t\tgit credential-cache exit &&\n#\t\t\trmdir -p .cache/git/credential/\n#\t\t\" &&\n#\t\ttest_path_is_missing \"$HOME/.git-credential-cache\" &&\n#\t\ttest -S \"$HOME/.cache/git/credential/socket\"\n#\t\n\nexpecting success: \n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=example.com\n\t\t--\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=askpass-username\n\t\tpassword=askpass-password\n\t\t--\n\t\taskpass: Username for 'https://example.com':\n\t\taskpass: Password for 'https://askpass-username@example.com':\n\t\tEOF\n\t\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=askpass-username\n++ read line\n++ case \"$line\" in\n++ echo password=askpass-password\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Username for '\\''https://example.com'\\'':'\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Password for '\\''https://askpass-username@example.com'\\'':'\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 13 - helper (cache) has no existing data\n\nexpecting success: \n\t\tcheck approve $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=store-user\n\t\tpassword=store-pass\n\t\tEOF\n\t\n++ check approve cache\n++ credential_opts=\n++ credential_cmd=approve\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=store-user\n++ read line\n++ case \"$line\" in\n++ echo password=store-pass\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential approve <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential approve\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 14 - helper (cache) stores password\n\nexpecting success: \n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=example.com\n\t\t--\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=store-user\n\t\tpassword=store-pass\n\t\t--\n\t\tEOF\n\t\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=store-user\n++ read line\n++ case \"$line\" in\n++ echo password=store-pass\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 15 - helper (cache) can retrieve password\n\nexpecting success: \n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=http\n\t\thost=example.com\n\t\t--\n\t\tprotocol=http\n\t\thost=example.com\n\t\tusername=askpass-username\n\t\tpassword=askpass-password\n\t\t--\n\t\taskpass: Username for 'http://example.com':\n\t\taskpass: Password for 'http://askpass-username@example.com':\n\t\tEOF\n\t\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=http\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=http\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=askpass-username\n++ read line\n++ case \"$line\" in\n++ echo password=askpass-password\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Username for '\\''http://example.com'\\'':'\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Password for '\\''http://askpass-username@example.com'\\'':'\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 16 - helper (cache) requires matching protocol\n\nexpecting success: \n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=other.tld\n\t\t--\n\t\tprotocol=https\n\t\thost=other.tld\n\t\tusername=askpass-username\n\t\tpassword=askpass-password\n\t\t--\n\t\taskpass: Username for 'https://other.tld':\n\t\taskpass: Password for 'https://askpass-username@other.tld':\n\t\tEOF\n\t\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=other.tld\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=other.tld\n++ read line\n++ case \"$line\" in\n++ echo username=askpass-username\n++ read line\n++ case \"$line\" in\n++ echo password=askpass-password\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Username for '\\''https://other.tld'\\'':'\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Password for '\\''https://askpass-username@other.tld'\\'':'\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 17 - helper (cache) requires matching host\n\nexpecting success: \n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=other\n\t\t--\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=other\n\t\tpassword=askpass-password\n\t\t--\n\t\taskpass: Password for 'https://other@example.com':\n\t\tEOF\n\t\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=other\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=other\n++ read line\n++ case \"$line\" in\n++ echo password=askpass-password\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Password for '\\''https://other@example.com'\\'':'\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 18 - helper (cache) requires matching username\n\nexpecting success: \n\t\ttest_config credential.usehttppath true &&\n\t\tcheck approve $HELPER <<-\\EOF &&\n\t\tprotocol=http\n\t\thost=path.tld\n\t\tpath=foo.git\n\t\tusername=user\n\t\tpassword=pass\n\t\tEOF\n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=http\n\t\thost=path.tld\n\t\tpath=bar.git\n\t\t--\n\t\tprotocol=http\n\t\thost=path.tld\n\t\tpath=bar.git\n\t\tusername=askpass-username\n\t\tpassword=askpass-password\n\t\t--\n\t\taskpass: Username for 'http://path.tld/bar.git':\n\t\taskpass: Password for 'http://askpass-username@path.tld/bar.git':\n\t\tEOF\n\t\n++ test_config credential.usehttppath true\n++ config_dir=\n++ test credential.usehttppath = -C\n++ test_when_finished 'test_unconfig  '\\''credential.usehttppath'\\'''\n++ test 0 = 0\n++ test_cleanup='{ test_unconfig  '\\''credential.usehttppath'\\''\n\t\t} && (exit \"$eval_ret\"); eval_ret=$?; :'\n++ git config credential.usehttppath true\n++ check approve cache\n++ credential_opts=\n++ credential_cmd=approve\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=http\n++ read line\n++ case \"$line\" in\n++ echo host=path.tld\n++ read line\n++ case \"$line\" in\n++ echo path=foo.git\n++ read line\n++ case \"$line\" in\n++ echo username=user\n++ read line\n++ case \"$line\" in\n++ echo password=pass\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential approve <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential approve\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=http\n++ read line\n++ case \"$line\" in\n++ echo host=path.tld\n++ read line\n++ case \"$line\" in\n++ echo path=bar.git\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=http\n++ read line\n++ case \"$line\" in\n++ echo host=path.tld\n++ read line\n++ case \"$line\" in\n++ echo path=bar.git\n++ read line\n++ case \"$line\" in\n++ echo username=askpass-username\n++ read line\n++ case \"$line\" in\n++ echo password=askpass-password\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Username for '\\''http://path.tld/bar.git'\\'':'\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Password for '\\''http://askpass-username@path.tld/bar.git'\\'':'\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\n++ test_unconfig credential.usehttppath\n++ config_dir=\n++ test credential.usehttppath = -C\n++ git config --unset-all credential.usehttppath\n++ config_status=0\n++ case \"$config_status\" in\n++ return 0\n++ exit 0\n++ eval_ret=0\n++ :\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 19 - helper (cache) requires matching path\n\nexpecting success: \n\t\tcheck reject $HELPER <<-\\EOF &&\n\t\tprotocol=https\n\t\thost=example.com\n\t\tEOF\n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=example.com\n\t\t--\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=askpass-username\n\t\tpassword=askpass-password\n\t\t--\n\t\taskpass: Username for 'https://example.com':\n\t\taskpass: Password for 'https://askpass-username@example.com':\n\t\tEOF\n\t\n++ check reject cache\n++ credential_opts=\n++ credential_cmd=reject\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential reject <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential reject\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=askpass-username\n++ read line\n++ case \"$line\" in\n++ echo password=askpass-password\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Username for '\\''https://example.com'\\'':'\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Password for '\\''https://askpass-username@example.com'\\'':'\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 20 - helper (cache) can forget host\n\nexpecting success: \n\t\tcheck approve $HELPER <<-\\EOF &&\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user1\n\t\tpassword=pass1\n\t\tEOF\n\t\tcheck approve $HELPER <<-\\EOF &&\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user2\n\t\tpassword=pass2\n\t\tEOF\n\t\tcheck fill $HELPER <<-\\EOF &&\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user1\n\t\t--\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user1\n\t\tpassword=pass1\n\t\tEOF\n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user2\n\t\t--\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user2\n\t\tpassword=pass2\n\t\tEOF\n\t\n++ check approve cache\n++ credential_opts=\n++ credential_cmd=approve\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user1\n++ read line\n++ case \"$line\" in\n++ echo password=pass1\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential approve <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential approve\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ check approve cache\n++ credential_opts=\n++ credential_cmd=approve\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user2\n++ read line\n++ case \"$line\" in\n++ echo password=pass2\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential approve <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential approve\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user1\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user1\n++ read line\n++ case \"$line\" in\n++ echo password=pass1\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user2\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user2\n++ read line\n++ case \"$line\" in\n++ echo password=pass2\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 21 - helper (cache) can store multiple users\n\nexpecting success: \n\t\tcheck reject $HELPER <<-\\EOF &&\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user1\n\t\tEOF\n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user1\n\t\t--\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user1\n\t\tpassword=askpass-password\n\t\t--\n\t\taskpass: Password for 'https://user1@example.com':\n\t\tEOF\n\t\n++ check reject cache\n++ credential_opts=\n++ credential_cmd=reject\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user1\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential reject <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential reject\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user1\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user1\n++ read line\n++ case \"$line\" in\n++ echo password=askpass-password\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Password for '\\''https://user1@example.com'\\'':'\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 22 - helper (cache) can forget user\n\nexpecting success: \n\t\tcheck fill $HELPER <<-\\EOF\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user2\n\t\t--\n\t\tprotocol=https\n\t\thost=example.com\n\t\tusername=user2\n\t\tpassword=pass2\n\t\tEOF\n\t\n++ check fill cache\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user2\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=user2\n++ read line\n++ case \"$line\" in\n++ echo password=pass2\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 23 - helper (cache) remembers other user\n\nexpecting success: \n\ttest_when_finished \"git credential-cache exit\" &&\n\ttest -S \"$XDG_CACHE_HOME/git/credential/socket\" &&\n\ttest_path_is_missing \"$HOME/.git-credential-cache/socket\" &&\n\ttest_path_is_missing \"$HOME/.cache/git/credential/socket\"\n\n++ test_when_finished 'git credential-cache exit'\n++ test 0 = 0\n++ test_cleanup='{ git credential-cache exit\n\t\t} && (exit \"$eval_ret\"); eval_ret=$?; :'\n++ 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'\n++ 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'\n++ 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'\n++ 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'\n++ 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'\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\n++ git credential-cache exit\nfatal: read error from cache daemon: Connection reset by peer\n++ eval_ret=128\n++ :\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nnot ok 24 - use custom XDG_CACHE_HOME if set and default sockets are not created\n#\t\n#\t\ttest_when_finished \"git credential-cache exit\" &&\n#\t\ttest -S \"$XDG_CACHE_HOME/git/credential/socket\" &&\n#\t\ttest_path_is_missing \"$HOME/.git-credential-cache/socket\" &&\n#\t\ttest_path_is_missing \"$HOME/.cache/git/credential/socket\"\n#\t\n\nexpecting success: \n\ttest_when_finished \"\n\t\tgit credential-cache exit --socket \\\"\\$HOME/dir/socket\\\" &&\n\t\trmdir \\\"\\$HOME/dir\\\"\n\t\" &&\n\tcheck approve \"cache --socket \\\"\\$HOME/dir/socket\\\"\" <<-\\EOF &&\n\tprotocol=https\n\thost=example.com\n\tusername=store-user\n\tpassword=store-pass\n\tEOF\n\ttest -S \"$HOME/dir/socket\"\n\n++ test_when_finished '\n\t\tgit credential-cache exit --socket \"$HOME/dir/socket\" &&\n\t\trmdir \"$HOME/dir\"\n\t'\n++ test 0 = 0\n++ test_cleanup='{ \n\t\tgit credential-cache exit --socket \"$HOME/dir/socket\" &&\n\t\trmdir \"$HOME/dir\"\n\t\n\t\t} && (exit \"$eval_ret\"); eval_ret=$?; :'\n++ check approve 'cache --socket \"$HOME/dir/socket\"'\n++ credential_opts=\n++ credential_cmd=approve\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache --socket \"$HOME/dir/socket\"'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=store-user\n++ read line\n++ case \"$line\" in\n++ echo password=store-pass\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache --socket \"$HOME/dir/socket\"'\\'' credential approve <stdin >stdout 2>stderr'\n+++ git -c 'credential.helper=cache --socket \"$HOME/dir/socket\"' credential approve\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ test -S '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/dir/socket'\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\n++ 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'\nfatal: read error from cache daemon: Connection reset by peer\n++ eval_ret=128\n++ :\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nnot ok 25 - credential-cache --socket option overrides default location\n#\t\n#\t\ttest_when_finished \"\n#\t\t\tgit credential-cache exit --socket \\\"\\$HOME/dir/socket\\\" &&\n#\t\t\trmdir \\\"\\$HOME/dir\\\"\n#\t\t\" &&\n#\t\tcheck approve \"cache --socket \\\"\\$HOME/dir/socket\\\"\" <<-\\EOF &&\n#\t\tprotocol=https\n#\t\thost=example.com\n#\t\tusername=store-user\n#\t\tpassword=store-pass\n#\t\tEOF\n#\t\ttest -S \"$HOME/dir/socket\"\n#\t\n\nexpecting success: \n\ttest_when_finished \"\n\t\tgit credential-cache exit &&\n\t\tsane_unset XDG_CACHE_HOME\n\t\" &&\n\tcheck approve cache <<-\\EOF &&\n\tprotocol=https\n\thost=example.com\n\tusername=store-user\n\tpassword=store-pass\n\tEOF\n\ttest -S \"$HOME/.cache/git/credential/socket\" &&\n\tXDG_CACHE_HOME=\"$HOME/xdg\" &&\n\texport XDG_CACHE_HOME &&\n\tcheck approve cache <<-\\EOF &&\n\tprotocol=https\n\thost=example.com\n\tusername=store-user\n\tpassword=store-pass\n\tEOF\n\ttest -S \"$XDG_CACHE_HOME/git/credential/socket\"\n\n++ test_when_finished '\n\t\tgit credential-cache exit &&\n\t\tsane_unset XDG_CACHE_HOME\n\t'\n++ test 0 = 0\n++ test_cleanup='{ \n\t\tgit credential-cache exit &&\n\t\tsane_unset XDG_CACHE_HOME\n\t\n\t\t} && (exit \"$eval_ret\"); eval_ret=$?; :'\n++ check approve cache\n++ credential_opts=\n++ credential_cmd=approve\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=store-user\n++ read line\n++ case \"$line\" in\n++ echo password=store-pass\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential approve <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential approve\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ 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'\n++ XDG_CACHE_HOME='/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/xdg'\n++ export XDG_CACHE_HOME\n++ check approve cache\n++ credential_opts=\n++ credential_cmd=approve\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=store-user\n++ read line\n++ case \"$line\" in\n++ echo password=store-pass\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential approve <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential approve\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ 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'\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\n++ git credential-cache exit\nfatal: read error from cache daemon: Connection reset by peer\n++ eval_ret=128\n++ :\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nnot ok 26 - use custom XDG_CACHE_HOME even if xdg socket exists\n#\t\n#\t\ttest_when_finished \"\n#\t\t\tgit credential-cache exit &&\n#\t\t\tsane_unset XDG_CACHE_HOME\n#\t\t\" &&\n#\t\tcheck approve cache <<-\\EOF &&\n#\t\tprotocol=https\n#\t\thost=example.com\n#\t\tusername=store-user\n#\t\tpassword=store-pass\n#\t\tEOF\n#\t\ttest -S \"$HOME/.cache/git/credential/socket\" &&\n#\t\tXDG_CACHE_HOME=\"$HOME/xdg\" &&\n#\t\texport XDG_CACHE_HOME &&\n#\t\tcheck approve cache <<-\\EOF &&\n#\t\tprotocol=https\n#\t\thost=example.com\n#\t\tusername=store-user\n#\t\tpassword=store-pass\n#\t\tEOF\n#\t\ttest -S \"$XDG_CACHE_HOME/git/credential/socket\"\n#\t\n\nexpecting success: \n\ttest_when_finished \"\n\t\tgit credential-cache exit &&\n\t\trmdir \\\"\\$HOME/.git-credential-cache/\\\"\n\t\" &&\n\tmkdir -p -m 700 \"$HOME/.git-credential-cache/\" &&\n\tcheck approve cache <<-\\EOF &&\n\tprotocol=https\n\thost=example.com\n\tusername=store-user\n\tpassword=store-pass\n\tEOF\n\ttest -S \"$HOME/.git-credential-cache/socket\"\n\n++ test_when_finished '\n\t\tgit credential-cache exit &&\n\t\trmdir \"$HOME/.git-credential-cache/\"\n\t'\n++ test 0 = 0\n++ test_cleanup='{ \n\t\tgit credential-cache exit &&\n\t\trmdir \"$HOME/.git-credential-cache/\"\n\t\n\t\t} && (exit \"$eval_ret\"); eval_ret=$?; :'\n++ 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/'\n++ check approve cache\n++ credential_opts=\n++ credential_cmd=approve\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=store-user\n++ read line\n++ case \"$line\" in\n++ echo password=store-pass\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential approve <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential approve\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ 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'\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\n++ git credential-cache exit\nfatal: read error from cache daemon: Connection reset by peer\n++ eval_ret=128\n++ :\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nnot ok 27 - use user socket if user directory exists\n#\t\n#\t\ttest_when_finished \"\n#\t\t\tgit credential-cache exit &&\n#\t\t\trmdir \\\"\\$HOME/.git-credential-cache/\\\"\n#\t\t\" &&\n#\t\tmkdir -p -m 700 \"$HOME/.git-credential-cache/\" &&\n#\t\tcheck approve cache <<-\\EOF &&\n#\t\tprotocol=https\n#\t\thost=example.com\n#\t\tusername=store-user\n#\t\tpassword=store-pass\n#\t\tEOF\n#\t\ttest -S \"$HOME/.git-credential-cache/socket\"\n#\t\n\nchecking prerequisite: SYMLINKS\n\nmkdir -p \"$TRASH_DIRECTORY/prereq-test-dir\" &&\n(\n\tcd \"$TRASH_DIRECTORY/prereq-test-dir\" &&\n\t# test whether the filesystem supports symbolic links\n\tln -s x y && test -h y\n\n)\n++ 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'\n++ cd '/home/add/vcs/cygwin/git/git-2.13.0-rc1-1.x86_64/build/t/trash directory.t0301-credential-cache/prereq-test-dir'\n++ ln -s x y\n++ test -h y\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nprerequisite SYMLINKS ok\nexpecting success: \n\ttest_when_finished \"\n\t\tgit credential-cache exit &&\n\t\trmdir \\\"\\$HOME/dir/\\\" &&\n\t\trm \\\"\\$HOME/.git-credential-cache\\\"\n\t\" &&\n\tmkdir -p -m 700 \"$HOME/dir/\" &&\n\tln -s \"$HOME/dir\" \"$HOME/.git-credential-cache\" &&\n\tcheck approve cache <<-\\EOF &&\n\tprotocol=https\n\thost=example.com\n\tusername=store-user\n\tpassword=store-pass\n\tEOF\n\ttest -S \"$HOME/.git-credential-cache/socket\"\n\n++ test_when_finished '\n\t\tgit credential-cache exit &&\n\t\trmdir \"$HOME/dir/\" &&\n\t\trm \"$HOME/.git-credential-cache\"\n\t'\n++ test 0 = 0\n++ test_cleanup='{ \n\t\tgit credential-cache exit &&\n\t\trmdir \"$HOME/dir/\" &&\n\t\trm \"$HOME/.git-credential-cache\"\n\t\n\t\t} && (exit \"$eval_ret\"); eval_ret=$?; :'\n++ 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/'\n++ 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'\n++ check approve cache\n++ credential_opts=\n++ credential_cmd=approve\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=example.com\n++ read line\n++ case \"$line\" in\n++ echo username=store-user\n++ read line\n++ case \"$line\" in\n++ echo password=store-pass\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache'\\'' credential approve <stdin >stdout 2>stderr'\n+++ git -c credential.helper=cache credential approve\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ 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'\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\n++ git credential-cache exit\nfatal: read error from cache daemon: Connection reset by peer\n++ eval_ret=128\n++ :\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nnot ok 28 - use user socket if user directory is a symlink to a directory\n#\t\n#\t\ttest_when_finished \"\n#\t\t\tgit credential-cache exit &&\n#\t\t\trmdir \\\"\\$HOME/dir/\\\" &&\n#\t\t\trm \\\"\\$HOME/.git-credential-cache\\\"\n#\t\t\" &&\n#\t\tmkdir -p -m 700 \"$HOME/dir/\" &&\n#\t\tln -s \"$HOME/dir\" \"$HOME/.git-credential-cache\" &&\n#\t\tcheck approve cache <<-\\EOF &&\n#\t\tprotocol=https\n#\t\thost=example.com\n#\t\tusername=store-user\n#\t\tpassword=store-pass\n#\t\tEOF\n#\t\ttest -S \"$HOME/.git-credential-cache/socket\"\n#\t\n\nexpecting success: \n\t\tcheck approve \"$HELPER\" <<-\\EOF &&\n\t\tprotocol=https\n\t\thost=timeout.tld\n\t\tusername=user\n\t\tpassword=pass\n\t\tEOF\n\t\tsleep 2 &&\n\t\tcheck fill \"$HELPER\" <<-\\EOF\n\t\tprotocol=https\n\t\thost=timeout.tld\n\t\t--\n\t\tprotocol=https\n\t\thost=timeout.tld\n\t\tusername=askpass-username\n\t\tpassword=askpass-password\n\t\t--\n\t\taskpass: Username for 'https://timeout.tld':\n\t\taskpass: Password for 'https://askpass-username@timeout.tld':\n\t\tEOF\n\t\n++ check approve 'cache --timeout=1'\n++ credential_opts=\n++ credential_cmd=approve\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache --timeout=1'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=timeout.tld\n++ read line\n++ case \"$line\" in\n++ echo username=user\n++ read line\n++ case \"$line\" in\n++ echo password=pass\n++ read line\n++ read_chunk\n++ read line\n++ read_chunk\n++ read line\n++ eval 'git  -c credential.helper='\\''cache --timeout=1'\\'' credential approve <stdin >stdout 2>stderr'\n+++ git -c 'credential.helper=cache --timeout=1' credential approve\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n++ sleep 2\n++ check fill 'cache --timeout=1'\n++ credential_opts=\n++ credential_cmd=fill\n++ shift\n++ for arg in \"$@\"\n++ credential_opts=' -c credential.helper='\\''cache --timeout=1'\\'''\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=timeout.tld\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo protocol=https\n++ read line\n++ case \"$line\" in\n++ echo host=timeout.tld\n++ read line\n++ case \"$line\" in\n++ echo username=askpass-username\n++ read line\n++ case \"$line\" in\n++ echo password=askpass-password\n++ read line\n++ case \"$line\" in\n++ break\n++ read_chunk\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Username for '\\''https://timeout.tld'\\'':'\n++ read line\n++ case \"$line\" in\n++ echo 'askpass: Password for '\\''https://askpass-username@timeout.tld'\\'':'\n++ read line\n++ eval 'git  -c credential.helper='\\''cache --timeout=1'\\'' credential fill <stdin >stdout 2>stderr'\n+++ git -c 'credential.helper=cache --timeout=1' credential fill\n++ test_cmp expect-stdout stdout\n++ diff -u expect-stdout stdout\n++ test_cmp expect-stderr stderr\n++ diff -u expect-stderr stderr\n+ test_eval_ret_=0\n+ want_trace\n+ test t = t\n+ test t = t\n+ set +x\nok 29 - helper (cache --timeout=1) times out\n\nfatal: read error from cache daemon: Connection reset by peer\n# failed 6 among 29 test(s)\n1..29\n"}]}