Issue 4512 in pharo: Method Coverage Broken

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 4512 in pharo: Method Coverage Broken

pharo
Status: Accepted
Owner: ----
Labels: Type-Bug Importance-High

New issue 4512 by renggli: Method Coverage Broken
http://code.google.com/p/pharo/issues/detail?id=4512

I am using one of the latest VMs from your site (VM.r2434) and I
continue to have subtle problems with objects as methods (#flushCache,
#run:with:in:).

The issue is that the test coverage in Pharo is kind of broken on Cog
for a long time already. It reports methods as not covered that are
clearly covered, and tests seem to randomly fail.

I suspected that there is something wrong with the coverage code
itself. So I started to experiment with TestCoverage>>flushCache and
noticed that the current implementation

    TestCoverage>>flushCache
        self reference methodSymbol flushCache

performs not that well: The set of not covered methods is wrong and
many tests suddenly fail. If I replace it with

    TestCoverage>>flushCache
        self reference actualClass flushCache

I actually get accurate coverage information, but there are still a
few tests constantly failing. I tried to use all possible combinations
of #flushCache (also calling it on the compiled method), but only
flushing the cache on the class seems to work properly. So far so
good, but I really wonder what the correct way is to flush the cache?
:-)

For my experiments I was using the package 'AST-Tests-Semantics'. This
is a small package with lots of test methods that cover each method
but one (RBSemanticAnnotationMisssing>>#isResumable). Now the "real"
problem is that when running these tests in coverage mode, the same 4
tests always fail:

     RBSemanticTest>>testBlockScope
     RBSemanticTest>>testCascadeReceiver
     RBSemanticTest>>testClassVariableBinding
     RBSemanticTest>>testGlobalVariableBinding

Not sure of how to debug that? Do you have an idea why these otherwise
passing tests suddenly fail? If you want to try to reproduce you can
use any Pharo image with the tests loaded, or use those that I used:

     
http://jenkins.lukas-renggli.ch/job/Development/lastSuccessfulBuild/artifact/omnibrowser-tests/omnibrowser-tests.changes
     
http://jenkins.lukas-renggli.ch/job/Development/lastSuccessfulBuild/artifact/omnibrowser-tests/omnibrowser-tests.image

Open the Test Runner, select 'AST-Tests-Semantics' and 'Run Coverage'.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4512 in pharo: Method Coverage Broken

pharo
Updates:
        Status: Closed

Comment #1 on issue 4512 by [hidden email]: Method Coverage Broken
http://code.google.com/p/pharo/issues/detail?id=4512

fixed in latest Cog VM


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker