{"thread":{"id":"40592","subject":"[PATCH] fix flaky untracked-cache test","startedAt":"2015-10-19T19:48:15Z","lastAt":"2015-10-21T22:47:29Z","messageCount":5,"participants":["David Turner","Torsten Bögershausen","Duy Nguyen","Lars Schneider"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"271948","messageId":"1445284095-6602-1-git-send-email-dturner@twopensource.com","threadId":"40592","inReplyTo":null,"subject":"[PATCH] fix flaky untracked-cache test","fromName":"David Turner","fromEmail":"dturner@twopensource.com","sentAt":"2015-10-19T19:48:15Z","receivedAt":"2015-10-19T19:48:15Z","isPatch":true,"sender":{"key":"novalis@novalis.org","avatar":"https://avatars.githubusercontent.com/u/77003?v=4"},"body":"Dirty the test worktree's root directory, as the test expects.\n\nWhen testing the untracked-cache, we previously assumed that checking\nout master would be sufficient to mark the mtime of the worktree's\nroot directory as racily-dirty.  But sometimes, the checkout would\nhappen at 12345.999 seconds and the status at 12346.001 seconds,\nmeaning that the worktree's root directory would not be racily-dirty.\nAnd since it was not truly dirty, occasionally the test would fail.\nBy making the root truly dirty, the test will always succeed.\n\nTested by running a few hundred times.\n\nSigned-off-by: David Turner <dturner@twopensource.com>\n---\n t/t7063-status-untracked-cache.sh | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh\nindex 37a24c1..0e8d0d4 100755\n--- a/t/t7063-status-untracked-cache.sh\n+++ b/t/t7063-status-untracked-cache.sh\n@@ -412,7 +412,9 @@ test_expect_success 'create/modify files, some of which are gitignored' '\n \techo two bis >done/two &&\n \techo three >done/three && # three is gitignored\n \techo four >done/four && # four is gitignored at a higher level\n-\techo five >done/five # five is not gitignored\n+\techo five >done/five && # five is not gitignored\n+\techo test >base && #we need to ensure that the root dir is touched\n+\trm base\n '\n \n test_expect_success 'test sparse status with untracked cache' '\n-- \n2.4.2.644.g97b850b-twtrsrc\n"},{"id":"272024","messageId":"562725AC.9090500@web.de","threadId":"40592","inReplyTo":"1445284095-6602-1-git-send-email-dturner@twopensource.com","subject":"Re: [PATCH] fix flaky untracked-cache test","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2015-10-21T05:42:04Z","receivedAt":"2015-10-21T05:42:04Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 19.10.15 21:48, David Turner wrote:\n\n> +\techo test >base && #we need to ensure that the root dir is touched\n> +\trm base\n>  '\nThanks for working on this, (I can run the test as soon as I have access to a Mac with SSD)\nMinor remark, the echo test can be removed (and may be the comment ?)\n> +\t>base &&\n> +\trm base\n>  '\n"},{"id":"272039","messageId":"1445445153.8302.5.camel@twopensource.com","threadId":"40592","inReplyTo":"562725AC.9090500@web.de","subject":"Re: [PATCH] fix flaky untracked-cache test","fromName":"David Turner","fromEmail":"dturner@twopensource.com","sentAt":"2015-10-21T16:32:33Z","receivedAt":"2015-10-21T16:32:33Z","isPatch":true,"sender":{"key":"novalis@novalis.org","avatar":"https://avatars.githubusercontent.com/u/77003?v=4"},"body":"On Wed, 2015-10-21 at 07:42 +0200, Torsten Bögershausen wrote:\n> On 19.10.15 21:48, David Turner wrote:\n> \n> > +\techo test >base && #we need to ensure that the root dir is touched\n> > +\trm base\n> >  '\n> Thanks for working on this, (I can run the test as soon as I have access to a Mac with SSD)\n\nI don't think this depends on a Mac (I can repro on my Thinkpad running\nUbuntu).\n\n> Minor remark, the echo test can be removed (and may be the comment ?)\n\nAll the other lines in this test have echo, so I would rather be\nconsistent.\n\n> > +\t>base &&\n> > +\trm base\n> >  '\n"},{"id":"272063","messageId":"CACsJy8BRFvD=kVH6-W1j+PgHdNYCmuwrKXTADmHG=AQPv9GUUA@mail.gmail.com","threadId":"40592","inReplyTo":"1445284095-6602-1-git-send-email-dturner@twopensource.com","subject":"Re: [PATCH] fix flaky untracked-cache test","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2015-10-21T20:25:39Z","receivedAt":"2015-10-21T20:25:39Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Mon, Oct 19, 2015 at 9:48 PM, David Turner <dturner@twopensource.com> wrote:\n> Dirty the test worktree's root directory, as the test expects.\n>\n> When testing the untracked-cache, we previously assumed that checking\n> out master would be sufficient to mark the mtime of the worktree's\n> root directory as racily-dirty.  But sometimes, the checkout would\n> happen at 12345.999 seconds and the status at 12346.001 seconds,\n> meaning that the worktree's root directory would not be racily-dirty.\n> And since it was not truly dirty, occasionally the test would fail.\n> By making the root truly dirty, the test will always succeed.\n\nI'm sorry for my deadly silence lately. I hope it will end in a few\nweeks. From a quick glance, the description and the change look ok\n(but don't weigh too much on my opinion).\n\nBack to my silence..\n-- \nDuy\n"},{"id":"272076","messageId":"B454F5BF-A18E-4D36-9B97-F7D51DC48EB0@gmail.com","threadId":"40592","inReplyTo":"1445284095-6602-1-git-send-email-dturner@twopensource.com","subject":"Re: [PATCH] fix flaky untracked-cache test","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2015-10-21T22:47:29Z","receivedAt":"2015-10-21T22:47:29Z","isPatch":true,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"Looks good to me, Ack.\n\nTest run with 74301d6 + my TravisCI patch:\nhttps://travis-ci.org/larsxschneider/git/builds/86702932\n... on Linux it failed in 1/2 cases after 53min\n... on OSX it failed in 2/2 cases after 6min\n\nTest run with 74301d6 + my TravisCI patch + David's t7063 patch:\nhttps://travis-ci.org/larsxschneider/git/builds/86707133\n.. on Linux it failed in 0/2 cases after 77min\n...on OSX it failed in 0/2 cases after 48min (no error, CI system timed out, click on the builds to see detailed log output)\n\nCheers,\nLars\n\nOn 19 Oct 2015, at 21:48, David Turner <dturner@twopensource.com> wrote:\n\n> Dirty the test worktree's root directory, as the test expects.\n> \n> When testing the untracked-cache, we previously assumed that checking\n> out master would be sufficient to mark the mtime of the worktree's\n> root directory as racily-dirty.  But sometimes, the checkout would\n> happen at 12345.999 seconds and the status at 12346.001 seconds,\n> meaning that the worktree's root directory would not be racily-dirty.\n> And since it was not truly dirty, occasionally the test would fail.\n> By making the root truly dirty, the test will always succeed.\n> \n> Tested by running a few hundred times.\n> \n> Signed-off-by: David Turner <dturner@twopensource.com>\n> ---\n> t/t7063-status-untracked-cache.sh | 4 +++-\n> 1 file changed, 3 insertions(+), 1 deletion(-)\n> \n> diff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh\n> index 37a24c1..0e8d0d4 100755\n> --- a/t/t7063-status-untracked-cache.sh\n> +++ b/t/t7063-status-untracked-cache.sh\n> @@ -412,7 +412,9 @@ test_expect_success 'create/modify files, some of which are gitignored' '\n> \techo two bis >done/two &&\n> \techo three >done/three && # three is gitignored\n> \techo four >done/four && # four is gitignored at a higher level\n> -\techo five >done/five # five is not gitignored\n> +\techo five >done/five && # five is not gitignored\n> +\techo test >base && #we need to ensure that the root dir is touched\n> +\trm base\n> '\n> \n> test_expect_success 'test sparse status with untracked cache' '\n> -- \n> 2.4.2.644.g97b850b-twtrsrc\n> \n"}]}