Hi Jorge,<br><br><div class="gmail_quote">On Mon, Aug 8, 2011 at 12:20 PM, Jorge Ressia <span dir="ltr">&lt;<a href="mailto:jorge.ressia@gmail.com">jorge.ressia@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Hi Eliot,<br>
<br>
I am experiencing the same problem as Lukas.<br>
I was having random DNU on replaced methods.<br>
I fixed the problem by flushing the cache on the compiled methods<br>
only, before I was flushing on the selector and on the class.<br>
It is not yet clear to me what is the right way of flushing the cache.<br>
Any explanation on that?<br></blockquote><div><br></div><div>Hmmm, no.  I would have thought that the right thing to do was to flush the selector.  Do you have an image containing a reproducible case I can test?</div><div>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
I think that this goes along with<br>
<a href="http://code.google.com/p/pharo/issues/detail?id=2255" target="_blank">http://code.google.com/p/pharo/issues/detail?id=2255</a><br>
<a href="http://forum.world.st/flushCache-with-MethoWrappers-in-CogVM-td3381310.html" target="_blank">http://forum.world.st/flushCache-with-MethoWrappers-in-CogVM-td3381310.html</a><br>
<br>
Eliot, if you need help debugging or testing a potential solution let<br>
me know, I have a bunch of test working on top of this.<br>
<br>
Cheers,<br>
<div><div></div><div class="h5"><br>
On Mon, Jul 11, 2011 at 6:31 PM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Hi All,<br>
&gt;     I&#39;m in touch with Lukas on this but have no time to address it right now.  worry not :)<br>
&gt;<br>
&gt; On Mon, Jul 11, 2011 at 3:05 AM, Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Maybe cc&#39;ing VM mailing list can help.<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Jul 1, 2011 at 9:32 AM, Lukas Renggli &lt;<a href="mailto:renggli@gmail.com">renggli@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi Eliot,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I am using one of the latest VMs from your site (VM.r2434) and I<br>
&gt;&gt;&gt; continue to have subtle problems with objects as methods (#flushCache,<br>
&gt;&gt;&gt; #run:with:in:).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The issue is that the test coverage in Pharo is kind of broken on Cog<br>
&gt;&gt;&gt; for a long time already. It reports methods as not covered that are<br>
&gt;&gt;&gt; clearly covered, and tests seem to randomly fail.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I suspected that there is something wrong with the coverage code<br>
&gt;&gt;&gt; itself. So I started to experiment with TestCoverage&gt;&gt;flushCache and<br>
&gt;&gt;&gt; noticed that the current implementation<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;    TestCoverage&gt;&gt;flushCache<br>
&gt;&gt;&gt;        self reference methodSymbol flushCache<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; performs not that well: The set of not covered methods is wrong and<br>
&gt;&gt;&gt; many tests suddenly fail. If I replace it with<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;    TestCoverage&gt;&gt;flushCache<br>
&gt;&gt;&gt;        self reference actualClass flushCache<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I actually get accurate coverage information, but there are still a<br>
&gt;&gt;&gt; few tests constantly failing. I tried to use all possible combinations<br>
&gt;&gt;&gt; of #flushCache (also calling it on the compiled method), but only<br>
&gt;&gt;&gt; flushing the cache on the class seems to work properly. So far so<br>
&gt;&gt;&gt; good, but I really wonder what the correct way is to flush the cache?<br>
&gt;&gt;&gt; :-)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; For my experiments I was using the package &#39;AST-Tests-Semantics&#39;. This<br>
&gt;&gt;&gt; is a small package with lots of test methods that cover each method<br>
&gt;&gt;&gt; but one (RBSemanticAnnotationMisssing&gt;&gt;#isResumable). Now the &quot;real&quot;<br>
&gt;&gt;&gt; problem is that when running these tests in coverage mode, the same 4<br>
&gt;&gt;&gt; tests always fail:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;     RBSemanticTest&gt;&gt;testBlockScope<br>
&gt;&gt;&gt;     RBSemanticTest&gt;&gt;testCascadeReceiver<br>
&gt;&gt;&gt;     RBSemanticTest&gt;&gt;testClassVariableBinding<br>
&gt;&gt;&gt;     RBSemanticTest&gt;&gt;testGlobalVariableBinding<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Not sure of how to debug that? Do you have an idea why these otherwise<br>
&gt;&gt;&gt; passing tests suddenly fail? If you want to try to reproduce you can<br>
&gt;&gt;&gt; use any Pharo image with the tests loaded, or use those that I used:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;     <a href="http://jenkins.lukas-renggli.ch/job/Development/lastSuccessfulBuild/artifact/omnibrowser-tests/omnibrowser-tests.changes" target="_blank">http://jenkins.lukas-renggli.ch/job/Development/lastSuccessfulBuild/artifact/omnibrowser-tests/omnibrowser-tests.changes</a><br>

&gt;&gt;&gt;     <a href="http://jenkins.lukas-renggli.ch/job/Development/lastSuccessfulBuild/artifact/omnibrowser-tests/omnibrowser-tests.image" target="_blank">http://jenkins.lukas-renggli.ch/job/Development/lastSuccessfulBuild/artifact/omnibrowser-tests/omnibrowser-tests.image</a><br>

&gt;&gt;&gt;<br>
&gt;&gt;&gt; Open the Test Runner, select &#39;AST-Tests-Semantics&#39; and &#39;Run Coverage&#39;.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Any help or clarification would be appreciated :-)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Lukas<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Lukas Renggli<br>
&gt;&gt;&gt; <a href="http://www.lukas-renggli.ch" target="_blank">www.lukas-renggli.ch</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Mariano<br>
&gt;&gt; <a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; best,<br>
&gt; Eliot<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
Jorge Ressia<br>
<a href="http://www.jorgeressia.com" target="_blank">www.jorgeressia.com</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>best,<div>Eliot</div><br>