<div dir="ltr">The test as in the repo also fails on my Mac (18 out of 20 times in a row). Adding a &#39;sleep 1&#39; before the second set of echo commands makes it succeed (20 out of 20 times in a row).</div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Mon, Sep 23, 2013 at 7:43 AM, Simon Peyton-Jones <span dir="ltr">&lt;<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

No, it fails on Linux.  Mostly but not invariably.  Running it by hand (ie with TEST=recomp013) fails 9 times out of 10 and succeeds once.  Weird.<br>
<span class="HOEnZb"><font color="#888888"><br>
Simon<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
| -----Original Message-----<br>
| From: Simon Marlow [mailto:<a href="mailto:marlowsd@gmail.com">marlowsd@gmail.com</a>]<br>
| Sent: 23 September 2013 12:08<br>
| To: Gabor Greif; Simon Peyton-Jones<br>
| Cc: Joachim Breitner; <a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
| Subject: Re: recomp013<br>
|<br>
| Is it failing on Windows only?  It could be an issue with the<br>
| granularity of timestamps.  I think we use more accurate timestamps on<br>
| Linux nowadays, whereas Windows is still using 1 second granularity.  If<br>
| that&#39;s the case, it probably needs a &quot;sleep 1&quot; somewhere.  If the &quot;sleep<br>
| 1&quot; didn&#39;t help, perhaps it wasn&#39;t in the right place - it needs to be<br>
| before the second set of echo commands.<br>
|<br>
| On the subject of naming the test, we want two pieces of information in<br>
| the name:<br>
|    - what it tests<br>
|    - the ticket number, if it&#39;s a regression test<br>
| So rather than just renaming it to the ticket number (which would lose<br>
| the information that it&#39;s a recomp test), I suggest moving all the<br>
| recomp tests into their own directory first.  It&#39;s really useful to have<br>
| all the tests for a component together, so you can run them quickly when<br>
| you&#39;re working on that component.<br>
|<br>
| Cheers,<br>
|       Simon<br>
|<br>
| On 19/09/2013 08:57, Gabor Greif wrote:<br>
| &gt; On 9/19/13, Simon Peyton-Jones &lt;<a href="mailto:simonpj@microsoft.com">simonpj@microsoft.com</a>&gt; wrote:<br>
| &gt;&gt; I lied.  Whether or not the &#39;sleep&#39; is there, the test usually fails,<br>
| but<br>
| &gt;&gt; occasionally (one time in ten or so) succeeds.<br>
| &gt;<br>
| &gt; I am the originator of the bug report, and could consistently<br>
| &gt; reproduce it in a bigger project. Unfortunately I have no time<br>
| &gt; currently to dive into the issue, but I have it earmarked for later.<br>
| &gt;<br>
| &gt; Cheers,<br>
| &gt;<br>
| &gt;      Gabor<br>
| &gt;<br>
| &gt;<br>
| &gt;&gt;<br>
| &gt;&gt; SImon<br>
| &gt;&gt;<br>
| &gt;&gt; | -----Original Message-----<br>
| &gt;&gt; | From: ghc-devs [mailto:<a href="mailto:ghc-devs-bounces@haskell.org">ghc-devs-bounces@haskell.org</a>] On Behalf Of<br>
| Simon<br>
| &gt;&gt; | Peyton-Jones<br>
| &gt;&gt; | Sent: 19 September 2013 12:50<br>
| &gt;&gt; | To: Joachim Breitner; <a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
| &gt;&gt; | Subject: RE: recomp013<br>
| &gt;&gt; |<br>
| &gt;&gt; | that makes it work.!<br>
| &gt;&gt; |<br>
| &gt;&gt; | | -----Original Message-----<br>
| &gt;&gt; | | From: Joachim Breitner [mailto:<a href="mailto:mail@joachim-breitner.de">mail@joachim-breitner.de</a>]<br>
| &gt;&gt; | | Sent: 19 September 2013 12:41<br>
| &gt;&gt; | | To: Simon Peyton-Jones; <a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
| &gt;&gt; | | Subject: Re: recomp013<br>
| &gt;&gt; | |<br>
| &gt;&gt; | | Dear Simon,<br>
| &gt;&gt; | |<br>
| &gt;&gt; | | Am Donnerstag, den 19.09.2013, 11:33 +0000 schrieb Simon Peyton-<br>
| Jones:<br>
| &gt;&gt; | | &gt; =====&gt; recomp013(normal) 89 of 114 [0, 0, 0]<br>
| &gt;&gt; | | &gt; cd ./recomp013 &amp;&amp; $MAKE -s --no-print-directory recomp013<br>
| &gt;&gt; | | &lt;/dev/null &gt;recomp013.run.stdout 2&gt;recomp013.run.stderr<br>
| &gt;&gt; | | &gt; Actual stdout output differs from expected:<br>
| &gt;&gt; | | &gt; --- ./recomp013/recomp013.stdout     2013-09-18 12:38:22.000000000<br>
| &gt;&gt; | +0100<br>
| &gt;&gt; | | &gt; +++ ./recomp013/recomp013.run.stdout 2013-09-19<br>
| 12:15:22.611120935<br>
| &gt;&gt; | | +0100<br>
| &gt;&gt; | | &gt; @@ -3,5 +3,3 @@<br>
| &gt;&gt; | | &gt;  [2 of 3] Compiling B                ( B.hs, B.o )<br>
| &gt;&gt; | | &gt;  [3 of 3] Compiling C                ( C.hs, C.o )<br>
| &gt;&gt; | | &gt;  second run<br>
| &gt;&gt; | | &gt; -[2 of 3] Compiling B                ( B.hs, B.o )<br>
| &gt;&gt; | | &gt; -[3 of 3] Compiling C                ( C.hs, C.o ) [B changed]<br>
| &gt;&gt; | | &gt; *** unexpected failure for recomp013(normal)<br>
| &gt;&gt; | |<br>
| &gt;&gt; | | It works here. So that means either two things:<br>
| &gt;&gt; | |  * that the bug described in #8247 is actually present in HEAD,<br>
| but<br>
| &gt;&gt; | |    only under certain circumstances, or<br>
| &gt;&gt; | |  * that there is a timing issue with the update of B.hs.<br>
| &gt;&gt; | |<br>
| &gt;&gt; | | The latter seems to be more likely. I notice that other recomp-<br>
| tests<br>
| &gt;&gt; | | have a &quot;sleep 1&quot; before updating the file: If you insert that in<br>
| &gt;&gt; | | recomp013/Makefile, does it go through for you?<br>
| &gt;&gt; | |<br>
| &gt;&gt; | | Greetings,<br>
| &gt;&gt; | | Joachim<br>
| &gt;&gt; | |<br>
| &gt;&gt; | | --<br>
| &gt;&gt; | | Joachim &quot;nomeata&quot; Breitner<br>
| &gt;&gt; | |   <a href="mailto:mail@joachim-breitner.de">mail@joachim-breitner.de</a> * <a href="http://www.joachim-breitner.de/" target="_blank">http://www.joachim-breitner.de/</a><br>
| &gt;&gt; | |   Jabber: <a href="mailto:nomeata@joachim-breitner.de">nomeata@joachim-breitner.de</a>  * GPG-Key: 0x4743206C<br>
| &gt;&gt; | |   Debian Developer: <a href="mailto:nomeata@debian.org">nomeata@debian.org</a><br>
| &gt;&gt; | _______________________________________________<br>
| &gt;&gt; | ghc-devs mailing list<br>
| &gt;&gt; | <a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
| &gt;&gt; | <a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><br>
| &gt;&gt; _______________________________________________<br>
| &gt;&gt; ghc-devs mailing list<br>
| &gt;&gt; <a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
| &gt;&gt; <a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><br>
| &gt;&gt;<br>
| &gt; _______________________________________________<br>
| &gt; ghc-devs mailing list<br>
| &gt; <a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
| &gt; <a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><br>
| &gt;<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><br>
</div></div></blockquote></div><br></div>