harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hindess <mark.hind...@googlemail.com>
Subject [classlib] [testing] Coverage (was Re: 37% of total test execution time is spent in a single test)
Date Thu, 01 Jun 2006 16:15:32 GMT

Anyone tried using emma (emma.sf.net) to look at test coverage for our
tests?  That might help ensure we don't trim them down too much?

I suspect we will soon reach a point where there are significantly fewer
obvious opportunities for small contributions - e.g. 1.5 generification,
etc from looking at JAPI reports.  Having test coverage reports might
help by highlighting areas for improvement.

I had a quick try with:

  ant -f make/build.xml
  ant -f modules/nio/make/build.xml test
  java -cp emma.jar emma instr -m overwrite -cp deploy/jdk/jre/lib/boot/nio.jar

and then:

  java -Xbootclasspath/p:emma.jar \
       -cp build/tests:modules/nio/bin/test:junit.jar:. \
       junit.textui.TestRunner \
       org.apache.harmony.tests.java.nio.channels.SocketChannelTest

(Running all the tests is a little tricky because test depends on build, 
which depends on clean which wipes out the instr'd jar. ;-( )

Sadly it dies horribly with the stack trace below.  I'll take another
look when I have a little more time, but I thought I'd mention it in
case anyone else had any thoughts on the subject.

Regards,
 
Mark.

Exception in thread "main" java/lang/ExceptionInInitializerError
        at java/lang/J9VMInternals.initialize (J9VMInternals.java:203)
        at java/nio/Buffer.$VRi (Buffer.java:4294967295)
        at java/nio/Buffer.<clinit> (Buffer.java:4294967295)
        at java/lang/J9VMInternals.initializeImpl (Native Method)
        at java/lang/J9VMInternals.initialize (J9VMInternals.java:185)
        at java/lang/J9VMInternals.initialize (J9VMInternals.java:154)
        at java/lang/String.getBytes (String.java:783)
        at org/apache/harmony/luni/util/Util.getBytes (Util.java:54)
        at java/lang/ClassLoader.loadLibraryWithPath (ClassLoader.java:998)
        at java/lang/ClassLoader.loadLibraryWithClassLoader (ClassLoader.java:970)
        at java/lang/System.loadLibrary (System.java:706)
        at com/ibm/icu4jni/common/ICU4JNILoader.loadLibrary (Unknown Source)
        at com/ibm/icu4jni/converters/NativeConverter.<clinit> (Unknown Source)
        at java/lang/J9VMInternals.initializeImpl (Native Method)
        at java/lang/J9VMInternals.initialize (J9VMInternals.java:185)
        at com/ibm/icu4jni/charset/CharsetProviderICU.charsetForName (Unknown Source)
        at java/nio/charset/Charset.forNameInternal (Charset.java:450)
        at java/nio/charset/Charset.forName (Charset.java:513)
        at java/lang/String.defaultCharset (String.java:688)
        at java/lang/String.<init> (String.java:252)
        at org/apache/harmony/luni/util/Util.toString (Util.java:74)
        at java/lang/System.getPropertyList (Native Method)
        at java/lang/System.ensureProperties (System.java:496)
        at java/lang/System.<clinit> (System.java:55)
        at java/lang/J9VMInternals.initializeImpl (Native Method)
        at java/lang/J9VMInternals.initialize (J9VMInternals.java:185)
        at java/lang/ClassLoader.initializeClassLoaders (ClassLoader.java:65)
        at java/lang/Thread.initialize (Thread.java:301)
        at java/lang/Thread.<init> (Thread.java:120)
java/lang/NullPointerException
        at java/lang/Throwable.printStackTrace (Throwable.java:231)
        at com/vladium/emma/rt/RTExitHook.createClassLoaderClosure (RTExitHook.java:63)
        at com/vladium/emma/rt/RT.reset (RT.java:92)
        at com/vladium/emma/rt/RT.<clinit> (RT.java:238)
        at java/lang/J9VMInternals.initializeImpl (Native Method)
        at java/lang/J9VMInternals.initialize (J9VMInternals.java:185)
        at java/nio/Buffer.$VRi (Buffer.java:4294967295)
        at java/nio/Buffer.<clinit> (Buffer.java:4294967295)
        at java/lang/J9VMInternals.initializeImpl (Native Method)
        at java/lang/J9VMInternals.initialize (J9VMInternals.java:185)
        at java/lang/J9VMInternals.initialize (J9VMInternals.java:154)
        at java/lang/String.getBytes (String.java:783)
        at org/apache/harmony/luni/util/Util.getBytes (Util.java:54)
        at java/lang/ClassLoader.loadLibraryWithPath (ClassLoader.java:998)
        at java/lang/ClassLoader.loadLibraryWithClassLoader (ClassLoader.java:970)
        at java/lang/System.loadLibrary (System.java:706)
        at com/ibm/icu4jni/common/ICU4JNILoader.loadLibrary (Unknown Source)
        at com/ibm/icu4jni/converters/NativeConverter.<clinit> (Unknown Source)
        at java/lang/J9VMInternals.initializeImpl (Native Method)
        at java/lang/J9VMInternals.initialize (J9VMInternals.java:185)
        at com/ibm/icu4jni/charset/CharsetProviderICU.charsetForName (Unknown Source)
        at java/nio/charset/Charset.forNameInternal (Charset.java:450)
        at java/nio/charset/Charset.forName (Charset.java:513)
        at java/lang/String.defaultCharset (String.java:688)
        at java/lang/String.<init> (String.java:252)
        at org/apache/harmony/luni/util/Util.toString (Util.java:74)
        at java/lang/System.getPropertyList (Native Method)
        at java/lang/System.ensureProperties (System.java:496)
        at java/lang/System.<clinit> (System.java:55)
        at java/lang/J9VMInternals.initializeImpl (Native Method)
        at java/lang/J9VMInternals.initialize (J9VMInternals.java:185)
        at java/lang/ClassLoader.initializeClassLoaders (ClassLoader.java:65)
        at java/lang/Thread.initialize (Thread.java:301)
        at java/lang/Thread.<init> (Thread.java:120)
JVMJ9VM015W Initialization error for library jclclear_23(14): JVMJ9VM009E J9VMDllMain failed
HMYEXEL062E Internal VM error: Failed to create Java VM
FAILED.


On 1 June 2006 at 22:26, "Mikhail Loenko" <mloenko@gmail.com> wrote:
> 2006/6/1, Geir Magnusson Jr <geir@pobox.com>:
> >
> >
> > Mikhail Loenko wrote:
> > > 2006/6/1, Geir Magnusson Jr <geir@pobox.com>:
> > >>
> > >> I don't quite grok what you mean - could you post what you are
> > >> suggesting in code here on -dev?
> > >
> > >
> > > Index: modules/luni/src/test/java/tests/api/java/net/Inet6AddressTest.jav
> a
> > > ===================================================================
> > > ---
> > > modules/luni/src/test/java/tests/api/java/net/Inet6AddressTest.java
> > > (revision
> > > 410480)
> > > +++
> > > modules/luni/src/test/java/tests/api/java/net/Inet6AddressTest.java
> > > (working
> > > copy)
> > > @@ -785,7 +785,7 @@
> > >                 "FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:255.255.255.255",
> > >                 "0:0:0:0:0:0:0:0", "0:0:0:0:0:0:0.0.0.0" };
> > >
> > > -        String invalidIPAddresses[] = { ":", "FFFF:FFFF", "1:1",
> > > "::1.2.3.444" };
> > > +        String invalidIPAddresses[] = { "FFFF:FFFF" };
> > >
> > >         for (int i = 0; i < validIPAddresses.length; i++) {
> > >
> > >
> >
> > Thx - why do you want to remove testing the others?  Because you believe
> > that it is in effect testing the resolver in the OS since each returns
> > the same answer,and thus it's testing the same thing over and over?
> 
> I believe so, but I'd like to hear confirmation from code authors
> 
> Thanks,
> Mikhail



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message