{"thread":{"id":"44718","subject":"test failure","startedAt":"2016-12-16T20:32:25Z","lastAt":"2016-12-19T20:01:32Z","messageCount":6,"participants":["Ramsay Jones","Lars Schneider","larsxschneider@gmail.com","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"307917","messageId":"dd8decbc-f856-4f68-6d77-7ea9d5f9d126@ramsayjones.plus.com","threadId":"44718","inReplyTo":null,"subject":"test failure","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2016-12-16T20:32:11Z","receivedAt":"2016-12-16T20:32:25Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Hi Lars,\n\nFor the last two days, I've noticed t0021.15 on the 'pu' branch has been failing intermittently (well it fails with: 'make test >ptest-out', but\nwhen run by hand, it fails only say 1-in-6, 1-in-18, etc.).\n\n[yes, it's a bit strange; this hasn't changed in a couple of weeks!]\n\nI don't have time to investigate further tonight and, since I had not\nheard anyone else complain, I thought I should let you know.\n\nSee below for the output from a failing run. [Note: this is on Linux\nMint 18, tonight's pu branch @7c7984401].\n\nATB,\nRamsay Jones\n\n$ ./t0021-conversion.sh -i -v\n\n...\n\nok 14 - diff does not reuse worktree files that need cleaning\n\nexpecting success: \n\ttest_config_global filter.protocol.process \"rot13-filter.pl clean smudge\" &&\n\ttest_config_global filter.protocol.required true &&\n\trm -rf repo &&\n\tmkdir repo &&\n\t(\n\t\tcd repo &&\n\t\tgit init &&\n\n\t\techo \"*.r filter=protocol\" >.gitattributes &&\n\t\tgit add . &&\n\t\tgit commit -m \"test commit 1\" &&\n\t\tgit branch empty-branch &&\n\n\t\tcp \"$TEST_ROOT/test.o\" test.r &&\n\t\tcp \"$TEST_ROOT/test2.o\" test2.r &&\n\t\tmkdir testsubdir &&\n\t\tcp \"$TEST_ROOT/test3 'sq',\\$x=.o\" \"testsubdir/test3 'sq',\\$x=.r\" &&\n\t\t>test4-empty.r &&\n\n\t\tS=$(file_size test.r) &&\n\t\tS2=$(file_size test2.r) &&\n\t\tS3=$(file_size \"testsubdir/test3 'sq',\\$x=.r\") &&\n\n\t\tfilter_git add . &&\n\t\tcat >expected.log <<-EOF &&\n\t\t\tSTART\n\t\t\tinit handshake complete\n\t\t\tIN: clean test.r $S [OK] -- OUT: $S . [OK]\n\t\t\tIN: clean test2.r $S2 [OK] -- OUT: $S2 . [OK]\n\t\t\tIN: clean test4-empty.r 0 [OK] -- OUT: 0  [OK]\n\t\t\tIN: clean testsubdir/test3 'sq',\\$x=.r $S3 [OK] -- OUT: $S3 . [OK]\n\t\t\tSTOP\n\t\tEOF\n\t\ttest_cmp_count expected.log rot13-filter.log &&\n\n\t\tfilter_git commit -m \"test commit 2\" &&\n\t\tcat >expected.log <<-EOF &&\n\t\t\tSTART\n\t\t\tinit handshake complete\n\t\t\tIN: clean test.r $S [OK] -- OUT: $S . [OK]\n\t\t\tIN: clean test2.r $S2 [OK] -- OUT: $S2 . [OK]\n\t\t\tIN: clean test4-empty.r 0 [OK] -- OUT: 0  [OK]\n\t\t\tIN: clean testsubdir/test3 'sq',\\$x=.r $S3 [OK] -- OUT: $S3 . [OK]\n\t\t\tIN: clean test.r $S [OK] -- OUT: $S . [OK]\n\t\t\tIN: clean test2.r $S2 [OK] -- OUT: $S2 . [OK]\n\t\t\tIN: clean test4-empty.r 0 [OK] -- OUT: 0  [OK]\n\t\t\tIN: clean testsubdir/test3 'sq',\\$x=.r $S3 [OK] -- OUT: $S3 . [OK]\n\t\t\tSTOP\n\t\tEOF\n\t\ttest_cmp_count expected.log rot13-filter.log &&\n\n\t\trm -f test2.r \"testsubdir/test3 'sq',\\$x=.r\" &&\n\n\t\tfilter_git checkout --quiet --no-progress . &&\n\t\tcat >expected.log <<-EOF &&\n\t\t\tSTART\n\t\t\tinit handshake complete\n\t\t\tIN: smudge test2.r $S2 [OK] -- OUT: $S2 . [OK]\n\t\t\tIN: smudge testsubdir/test3 'sq',\\$x=.r $S3 [OK] -- OUT: $S3 . [OK]\n\t\t\tSTOP\n\t\tEOF\n\t\ttest_cmp_exclude_clean expected.log rot13-filter.log &&\n\n\t\tfilter_git checkout --quiet --no-progress empty-branch &&\n\t\tcat >expected.log <<-EOF &&\n\t\t\tSTART\n\t\t\tinit handshake complete\n\t\t\tIN: clean test.r $S [OK] -- OUT: $S . [OK]\n\t\t\tSTOP\n\t\tEOF\n\t\ttest_cmp_exclude_clean expected.log rot13-filter.log &&\n\n\t\tfilter_git checkout --quiet --no-progress master &&\n\t\tcat >expected.log <<-EOF &&\n\t\t\tSTART\n\t\t\tinit handshake complete\n\t\t\tIN: smudge test.r $S [OK] -- OUT: $S . [OK]\n\t\t\tIN: smudge test2.r $S2 [OK] -- OUT: $S2 . [OK]\n\t\t\tIN: smudge test4-empty.r 0 [OK] -- OUT: 0  [OK]\n\t\t\tIN: smudge testsubdir/test3 'sq',\\$x=.r $S3 [OK] -- OUT: $S3 . [OK]\n\t\t\tSTOP\n\t\tEOF\n\t\ttest_cmp_exclude_clean expected.log rot13-filter.log &&\n\n\t\ttest_cmp_committed_rot13 \"$TEST_ROOT/test.o\" test.r &&\n\t\ttest_cmp_committed_rot13 \"$TEST_ROOT/test2.o\" test2.r &&\n\t\ttest_cmp_committed_rot13 \"$TEST_ROOT/test3 'sq',\\$x=.o\" \"testsubdir/test3 'sq',\\$x=.r\"\n\t)\n\nInitialized empty Git repository in /home/ramsay/git/t/trash directory.t0021-conversion/repo/.git/\n[master (root-commit) 56d459b] test commit 1\n Author: A U Thor <author@example.com>\n 1 file changed, 1 insertion(+)\n create mode 100644 .gitattributes\n[master 9ea74df] test commit 2\n Author: A U Thor <author@example.com>\n 4 files changed, 5 insertions(+)\n create mode 100644 test.r\n create mode 100644 test2.r\n create mode 100644 test4-empty.r\n create mode 100644 testsubdir/test3 'sq',$x=.r\nsort: cannot read: rot13-filter.log: No such file or directory\n--- expected.log\t2016-12-16 20:14:29.037426091 +0000\n+++ rot13-filter.log\t2016-12-16 20:14:29.041426091 +0000\n@@ -1,7 +0,0 @@\n-x IN: clean test.r 57 [OK] -- OUT: 57 . [OK]\n-x IN: clean test2.r 14 [OK] -- OUT: 14 . [OK]\n-x IN: clean test4-empty.r 0 [OK] -- OUT: 0  [OK]\n-x IN: clean testsubdir/test3 'sq',$x=.r 49 [OK] -- OUT: 49 . [OK]\n-      1 START\n-      1 STOP\n-      1 init handshake complete\nnot ok 15 - required process filter should filter data\n#\t\n#\t\ttest_config_global filter.protocol.process \"rot13-filter.pl clean smudge\" &&\n#\t\ttest_config_global filter.protocol.required true &&\n#\t\trm -rf repo &&\n#\t\tmkdir repo &&\n#\t\t(\n#\t\t\tcd repo &&\n#\t\t\tgit init &&\n#\t\n#\t\t\techo \"*.r filter=protocol\" >.gitattributes &&\n#\t\t\tgit add . &&\n#\t\t\tgit commit -m \"test commit 1\" &&\n#\t\t\tgit branch empty-branch &&\n#\t\n#\t\t\tcp \"$TEST_ROOT/test.o\" test.r &&\n#\t\t\tcp \"$TEST_ROOT/test2.o\" test2.r &&\n#\t\t\tmkdir testsubdir &&\n#\t\t\tcp \"$TEST_ROOT/test3 'sq',\\$x=.o\" \"testsubdir/test3 'sq',\\$x=.r\" &&\n#\t\t\t>test4-empty.r &&\n#\t\n#\t\t\tS=$(file_size test.r) &&\n#\t\t\tS2=$(file_size test2.r) &&\n#\t\t\tS3=$(file_size \"testsubdir/test3 'sq',\\$x=.r\") &&\n#\t\n#\t\t\tfilter_git add . &&\n#\t\t\tcat >expected.log <<-EOF &&\n#\t\t\t\tSTART\n#\t\t\t\tinit handshake complete\n#\t\t\t\tIN: clean test.r $S [OK] -- OUT: $S . [OK]\n#\t\t\t\tIN: clean test2.r $S2 [OK] -- OUT: $S2 . [OK]\n#\t\t\t\tIN: clean test4-empty.r 0 [OK] -- OUT: 0  [OK]\n#\t\t\t\tIN: clean testsubdir/test3 'sq',\\$x=.r $S3 [OK] -- OUT: $S3 . [OK]\n#\t\t\t\tSTOP\n#\t\t\tEOF\n#\t\t\ttest_cmp_count expected.log rot13-filter.log &&\n#\t\n#\t\t\tfilter_git commit -m \"test commit 2\" &&\n#\t\t\tcat >expected.log <<-EOF &&\n#\t\t\t\tSTART\n#\t\t\t\tinit handshake complete\n#\t\t\t\tIN: clean test.r $S [OK] -- OUT: $S . [OK]\n#\t\t\t\tIN: clean test2.r $S2 [OK] -- OUT: $S2 . [OK]\n#\t\t\t\tIN: clean test4-empty.r 0 [OK] -- OUT: 0  [OK]\n#\t\t\t\tIN: clean testsubdir/test3 'sq',\\$x=.r $S3 [OK] -- OUT: $S3 . [OK]\n#\t\t\t\tIN: clean test.r $S [OK] -- OUT: $S . [OK]\n#\t\t\t\tIN: clean test2.r $S2 [OK] -- OUT: $S2 . [OK]\n#\t\t\t\tIN: clean test4-empty.r 0 [OK] -- OUT: 0  [OK]\n#\t\t\t\tIN: clean testsubdir/test3 'sq',\\$x=.r $S3 [OK] -- OUT: $S3 . [OK]\n#\t\t\t\tSTOP\n#\t\t\tEOF\n#\t\t\ttest_cmp_count expected.log rot13-filter.log &&\n#\t\n#\t\t\trm -f test2.r \"testsubdir/test3 'sq',\\$x=.r\" &&\n#\t\n#\t\t\tfilter_git checkout --quiet --no-progress . &&\n#\t\t\tcat >expected.log <<-EOF &&\n#\t\t\t\tSTART\n#\t\t\t\tinit handshake complete\n#\t\t\t\tIN: smudge test2.r $S2 [OK] -- OUT: $S2 . [OK]\n#\t\t\t\tIN: smudge testsubdir/test3 'sq',\\$x=.r $S3 [OK] -- OUT: $S3 . [OK]\n#\t\t\t\tSTOP\n#\t\t\tEOF\n#\t\t\ttest_cmp_exclude_clean expected.log rot13-filter.log &&\n#\t\n#\t\t\tfilter_git checkout --quiet --no-progress empty-branch &&\n#\t\t\tcat >expected.log <<-EOF &&\n#\t\t\t\tSTART\n#\t\t\t\tinit handshake complete\n#\t\t\t\tIN: clean test.r $S [OK] -- OUT: $S . [OK]\n#\t\t\t\tSTOP\n#\t\t\tEOF\n#\t\t\ttest_cmp_exclude_clean expected.log rot13-filter.log &&\n#\t\n#\t\t\tfilter_git checkout --quiet --no-progress master &&\n#\t\t\tcat >expected.log <<-EOF &&\n#\t\t\t\tSTART\n#\t\t\t\tinit handshake complete\n#\t\t\t\tIN: smudge test.r $S [OK] -- OUT: $S . [OK]\n#\t\t\t\tIN: smudge test2.r $S2 [OK] -- OUT: $S2 . [OK]\n#\t\t\t\tIN: smudge test4-empty.r 0 [OK] -- OUT: 0  [OK]\n#\t\t\t\tIN: smudge testsubdir/test3 'sq',\\$x=.r $S3 [OK] -- OUT: $S3 . [OK]\n#\t\t\t\tSTOP\n#\t\t\tEOF\n#\t\t\ttest_cmp_exclude_clean expected.log rot13-filter.log &&\n#\t\n#\t\t\ttest_cmp_committed_rot13 \"$TEST_ROOT/test.o\" test.r &&\n#\t\t\ttest_cmp_committed_rot13 \"$TEST_ROOT/test2.o\" test2.r &&\n#\t\t\ttest_cmp_committed_rot13 \"$TEST_ROOT/test3 'sq',\\$x=.o\" \"testsubdir/test3 'sq',\\$x=.r\"\n#\t\t)\n#\t\n$ \n"},{"id":"307957","messageId":"50C75781-FE3B-410F-9866-63342607707B@gmail.com","threadId":"44718","inReplyTo":"dd8decbc-f856-4f68-6d77-7ea9d5f9d126@ramsayjones.plus.com","subject":"Re: test failure","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-12-17T14:28:43Z","receivedAt":"2016-12-17T14:28:21Z","isPatch":false,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\n> On 16 Dec 2016, at 21:32, Ramsay Jones <ramsay@ramsayjones.plus.com> wrote:\n> \n> Hi Lars,\n> \n> For the last two days, I've noticed t0021.15 on the 'pu' branch has been failing intermittently (well it fails with: 'make test >ptest-out', but\n> when run by hand, it fails only say 1-in-6, 1-in-18, etc.).\n> \n> [yes, it's a bit strange; this hasn't changed in a couple of weeks!]\n> \n> I don't have time to investigate further tonight and, since I had not\n> heard anyone else complain, I thought I should let you know.\n> \n> See below for the output from a failing run. [Note: this is on Linux\n> Mint 18, tonight's pu branch @7c7984401].\n\nThanks Ramsay! \n\nI was able to reproduce the problem with this test:\n\n\ttest_expect_success 'ramsay-report' '\n\t\ttest_config_global filter.protocol.clean cat &&\n\t\tgit init &&\n\t\techo \"*.r filter=protocol\" >.gitattributes &&\n\t\techo \"bla\" >test.r &&\n\t\tgit add . &&\n\t\tGIT_TRACE=1 git commit -m \"test commit 2\" > trace 2>&1 &&\n\t\tgrep \"run_command\" trace\n\t'\n\nIt looks like as if Git occasionally forgets to run the clean filter.\nI bisected the problem and I think the problem starts with \"diff: do not \nreuse worktree files that need \"clean\" conversion\" (06dec439a3) which\ndefinitively sounds related.\n\nBack in June I reported that Git invokes the clean process 4 times if a\nsingle file is added. Peff took a closer look and suggested the patch\nmentioned above to remove one unnecessary invocation. I re-read his comments\nand everything sounds still reasonable to me:\nhttp://public-inbox.org/git/1469134747-26785-1-git-send-email-larsxschneider@gmail.com/#t\n\nDoes anyone have a clue what is going on? \nI keep digging...\n\nThanks,\nLars "},{"id":"307982","messageId":"B3D96792-047D-4C91-8DCC-60C800B2861B@gmail.com","threadId":"44718","inReplyTo":"50C75781-FE3B-410F-9866-63342607707B@gmail.com","subject":"Re: test failure","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-12-17T16:11:23Z","receivedAt":"2016-12-17T16:11:02Z","isPatch":false,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"\n> On 17 Dec 2016, at 15:28, Lars Schneider <larsxschneider@gmail.com> wrote:\n> \n> \n>> On 16 Dec 2016, at 21:32, Ramsay Jones <ramsay@ramsayjones.plus.com> wrote:\n>> \n>> Hi Lars,\n>> \n>> For the last two days, I've noticed t0021.15 on the 'pu' branch has been failing intermittently (well it fails with: 'make test >ptest-out', but\n>> when run by hand, it fails only say 1-in-6, 1-in-18, etc.).\n>> \n>> [yes, it's a bit strange; this hasn't changed in a couple of weeks!]\n>> \n>> I don't have time to investigate further tonight and, since I had not\n>> heard anyone else complain, I thought I should let you know.\n>> \n>> See below for the output from a failing run. [Note: this is on Linux\n>> Mint 18, tonight's pu branch @7c7984401].\n> \n> Thanks Ramsay! \n> \n> I was able to reproduce the problem with this test:\n> \n> \ttest_expect_success 'ramsay-report' '\n> \t\ttest_config_global filter.protocol.clean cat &&\n> \t\tgit init &&\n> \t\techo \"*.r filter=protocol\" >.gitattributes &&\n> \t\techo \"bla\" >test.r &&\n> \t\tgit add . &&\n> \t\tGIT_TRACE=1 git commit -m \"test commit 2\" > trace 2>&1 &&\n> \t\tgrep \"run_command\" trace\n> \t'\n> \n> It looks like as if Git occasionally forgets to run the clean filter.\n> I bisected the problem and I think the problem starts with \"diff: do not \n> reuse worktree files that need \"clean\" conversion\" (06dec439a3) which\n> definitively sounds related.\n> \n> Back in June I reported that Git invokes the clean process 4 times if a\n> single file is added. Peff took a closer look and suggested the patch\n> mentioned above to remove one unnecessary invocation. I re-read his comments\n> and everything sounds still reasonable to me:\n> http://public-inbox.org/git/1469134747-26785-1-git-send-email-larsxschneider@gmail.com/#t\n> \n> Does anyone have a clue what is going on? \n> I keep digging...\n\nUgh. I stopped coding, started cleaning the house, and it hit me:\n\"git commit\" shouldn't call the filter anyways. I suspect it is called in\nmy tests because I add and commit the file to the index right after its \ncreation. All this usually happens within 1 second and therefore Git cannot\nknow if the file was modified between \"add\" and \"commit\". That's why it needs\nto run \"clean\" again.\n\nI will adjust the tests.\n\nCheers,\nLars"},{"id":"307990","messageId":"20161218123748.72101-1-larsxschneider@gmail.com","threadId":"44718","inReplyTo":"B3D96792-047D-4C91-8DCC-60C800B2861B@gmail.com","subject":"[PATCH v1] t0021: fix flaky test","fromName":"","fromEmail":"larsxschneider@gmail.com","sentAt":"2016-12-18T12:37:48Z","receivedAt":"2016-12-18T12:38:26Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"From: Lars Schneider <larsxschneider@gmail.com>\n\nt0021.15 creates files, adds them to the index, and commits them. All\nthis usually happens in a test run within the same second and Git cannot\nknow if the files have been changed between `add` and `commit`.  Thus,\nGit has to run the clean filter in both operations. Sometimes these\ninvocations spread over two different seconds and Git can infer that the\nfiles were not changed between `add` and `commit` based on their\nmodification timestamp. The test would fail as it expects the filter\ninvocation. Remove this expectation to make the test stable.\n\nSigned-off-by: Lars Schneider <larsxschneider@gmail.com>\n---\n\nNotes:\n    Base Commit: f8bf8f2a7b (next)\n    Diff on Web: https://github.com/git/git/compare/f8bf8f2a7b...larsxschneider:9d88b66e03\n    Checkout:    git fetch https://github.com/larsxschneider/git filter-process/fix-flaky-test-v1 && git checkout 9d88b66e03\n\n t/t0021-conversion.sh | 17 +----------------\n 1 file changed, 1 insertion(+), 16 deletions(-)\n\ndiff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh\nindex 6f16983d3e..161f560446 100755\n--- a/t/t0021-conversion.sh\n+++ b/t/t0021-conversion.sh\n@@ -377,22 +377,7 @@ test_expect_success PERL 'required process filter should filter data' '\n \t\tEOF\n \t\ttest_cmp_count expected.log rot13-filter.log &&\n \n-\t\tfilter_git commit -m \"test commit 2\" &&\n-\t\tcat >expected.log <<-EOF &&\n-\t\t\tSTART\n-\t\t\tinit handshake complete\n-\t\t\tIN: clean test.r $S [OK] -- OUT: $S . [OK]\n-\t\t\tIN: clean test2.r $S2 [OK] -- OUT: $S2 . [OK]\n-\t\t\tIN: clean test4-empty.r 0 [OK] -- OUT: 0  [OK]\n-\t\t\tIN: clean testsubdir/test3 '\\''sq'\\'',\\$x=.r $S3 [OK] -- OUT: $S3 . [OK]\n-\t\t\tIN: clean test.r $S [OK] -- OUT: $S . [OK]\n-\t\t\tIN: clean test2.r $S2 [OK] -- OUT: $S2 . [OK]\n-\t\t\tIN: clean test4-empty.r 0 [OK] -- OUT: 0  [OK]\n-\t\t\tIN: clean testsubdir/test3 '\\''sq'\\'',\\$x=.r $S3 [OK] -- OUT: $S3 . [OK]\n-\t\t\tSTOP\n-\t\tEOF\n-\t\ttest_cmp_count expected.log rot13-filter.log &&\n-\n+\t\tgit commit -m \"test commit 2\" &&\n \t\trm -f test2.r \"testsubdir/test3 '\\''sq'\\'',\\$x=.r\" &&\n \n \t\tfilter_git checkout --quiet --no-progress . &&\n-- \n2.11.0\n\n"},{"id":"308063","messageId":"6e0ea8b0-181a-2ab6-5bab-4f8dfa1d76fa@ramsayjones.plus.com","threadId":"44718","inReplyTo":"20161218123748.72101-1-larsxschneider@gmail.com","subject":"Re: [PATCH v1] t0021: fix flaky test","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2016-12-19T17:24:32Z","receivedAt":"2016-12-19T17:25:38Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 18/12/16 12:37, larsxschneider@gmail.com wrote:\n> From: Lars Schneider <larsxschneider@gmail.com>\n> \n> t0021.15 creates files, adds them to the index, and commits them. All\n> this usually happens in a test run within the same second and Git cannot\n> know if the files have been changed between `add` and `commit`.  Thus,\n> Git has to run the clean filter in both operations. Sometimes these\n> invocations spread over two different seconds and Git can infer that the\n> files were not changed between `add` and `commit` based on their\n> modification timestamp. The test would fail as it expects the filter\n> invocation. Remove this expectation to make the test stable.\n> \n> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>\n> ---\n> \n> Notes:\n>     Base Commit: f8bf8f2a7b (next)\n>     Diff on Web: https://github.com/git/git/compare/f8bf8f2a7b...larsxschneider:9d88b66e03\n>     Checkout:    git fetch https://github.com/larsxschneider/git filter-process/fix-flaky-test-v1 && git checkout 9d88b66e03\n> \n>  t/t0021-conversion.sh | 17 +----------------\n>  1 file changed, 1 insertion(+), 16 deletions(-)\n> \n> diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh\n> index 6f16983d3e..161f560446 100755\n> --- a/t/t0021-conversion.sh\n> +++ b/t/t0021-conversion.sh\n> @@ -377,22 +377,7 @@ test_expect_success PERL 'required process filter should filter data' '\n>  \t\tEOF\n>  \t\ttest_cmp_count expected.log rot13-filter.log &&\n>  \n> -\t\tfilter_git commit -m \"test commit 2\" &&\n> -\t\tcat >expected.log <<-EOF &&\n> -\t\t\tSTART\n> -\t\t\tinit handshake complete\n> -\t\t\tIN: clean test.r $S [OK] -- OUT: $S . [OK]\n> -\t\t\tIN: clean test2.r $S2 [OK] -- OUT: $S2 . [OK]\n> -\t\t\tIN: clean test4-empty.r 0 [OK] -- OUT: 0  [OK]\n> -\t\t\tIN: clean testsubdir/test3 '\\''sq'\\'',\\$x=.r $S3 [OK] -- OUT: $S3 . [OK]\n> -\t\t\tIN: clean test.r $S [OK] -- OUT: $S . [OK]\n> -\t\t\tIN: clean test2.r $S2 [OK] -- OUT: $S2 . [OK]\n> -\t\t\tIN: clean test4-empty.r 0 [OK] -- OUT: 0  [OK]\n> -\t\t\tIN: clean testsubdir/test3 '\\''sq'\\'',\\$x=.r $S3 [OK] -- OUT: $S3 . [OK]\n> -\t\t\tSTOP\n> -\t\tEOF\n> -\t\ttest_cmp_count expected.log rot13-filter.log &&\n> -\n> +\t\tgit commit -m \"test commit 2\" &&\n>  \t\trm -f test2.r \"testsubdir/test3 '\\''sq'\\'',\\$x=.r\" &&\n>  \n>  \t\tfilter_git checkout --quiet --no-progress . &&\n> \n\nI applied this to the pu branch and ran the test by hand\n48 times in a row without failure. (the most trials without\nerror beforehand was 24).\n\nThanks.\n\nATB,\nRamsay Jones\n\n\n"},{"id":"308087","messageId":"20161219200034.nkcjfrey5vvakmkf@sigill.intra.peff.net","threadId":"44718","inReplyTo":"6e0ea8b0-181a-2ab6-5bab-4f8dfa1d76fa@ramsayjones.plus.com","subject":"Re: [PATCH v1] t0021: fix flaky test","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-12-19T20:00:34Z","receivedAt":"2016-12-19T20:01:32Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Dec 19, 2016 at 05:24:32PM +0000, Ramsay Jones wrote:\n\n> > t0021.15 creates files, adds them to the index, and commits them. All\n> > this usually happens in a test run within the same second and Git cannot\n> > know if the files have been changed between `add` and `commit`.  Thus,\n> > Git has to run the clean filter in both operations. Sometimes these\n> > invocations spread over two different seconds and Git can infer that the\n> > files were not changed between `add` and `commit` based on their\n> > modification timestamp. The test would fail as it expects the filter\n> > invocation. Remove this expectation to make the test stable.\n> [...]\n> I applied this to the pu branch and ran the test by hand\n> 48 times in a row without failure. (the most trials without\n> error beforehand was 24).\n\nThe original also fails nearly-instantly under my stress script[1], and\nit runs for several minutes with this patch.\n\nIt might be instructive to try all of the tests under that script, but\nit would require a fair bit of patience (and to some degree, people\nrunning \"make -j32 test\" accomplishes the same thing over time).\n\n-Peff\n\n[1] https://github.com/peff/git/blob/meta/stress\n"}]}