Am I doing something wrong?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Am I doing something wrong?

David Herron @ Sun
Just to try out Mauve I'm running it on my OS X machine with Apple's Java.

./configure --with-vm=/Library/Java/Home/bin/java
make
java Harness -verbose -showpasses -compile -vm java gnu.testlet

I figure since y'all haven't changed Harness.java in 2 yrs (to any
significant change) that it must be working fine and that there's some
kind of driver error on my part.

I get a bunch of messages saying FAIL: One of the dependencies failed to
compile

Then it throws this:-
Exception in thread "main" java.lang.StringIndexOutOfBoundsException:
String index out of range: -48
    at
java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:146)
    at java.lang.StringBuffer.setLength(StringBuffer.java:154)
    at Harness.processFolder(Harness.java:1123)
    at Harness.processFolder(Harness.java:1153)
    at Harness.processFolder(Harness.java:1153)
    at Harness.processTest(Harness.java:899)
    at Harness.runAllTests(Harness.java:706)
    at Harness.main(Harness.java:184)


--->    sb.setLength(sb.length() - fullPath.length() - 1);

So that calculation is going negative, and inserting println's I see
sb.length() is 0 ...

I changed that to something like this

   sb.setLength(
            (sb.length() - fullPath.length() - 1) > 0
          ? sb.length() - fullPath.length() - 1
          : 0
    );


And then this failed (line 1208)
      nextTest = nextTest.substring(0, nextTest.length() - 5);


Reply | Threaded
Open this post in threaded view
|

Re: Am I doing something wrong?

gnu_andrew
On 25/06/2008, David Herron <[hidden email]> wrote:

> Just to try out Mauve I'm running it on my OS X machine with Apple's Java.
>  ./configure --with-vm=/Library/Java/Home/bin/java
>  make
>  java Harness -verbose -showpasses -compile -vm java gnu.testlet
>
>  I figure since y'all haven't changed Harness.java in 2 yrs (to any
> significant change) that it must be working fine and that there's some kind
> of driver error on my part.
>
>  I get a bunch of messages saying FAIL: One of the dependencies failed to
> compile
>
>  Then it throws this:-
>  Exception in thread "main"
> java.lang.StringIndexOutOfBoundsException: String index out
> of range: -48
>    at
> java.lang.AbstractStringBuilder.setLength(AbstractStringBuilder.java:146)
>    at
> java.lang.StringBuffer.setLength(StringBuffer.java:154)
>    at Harness.processFolder(Harness.java:1123)
>    at Harness.processFolder(Harness.java:1153)
>    at Harness.processFolder(Harness.java:1153)
>    at Harness.processTest(Harness.java:899)
>    at Harness.runAllTests(Harness.java:706)
>    at Harness.main(Harness.java:184)
>
>
>  --->    sb.setLength(sb.length() - fullPath.length() - 1);
>
>  So that calculation is going negative, and inserting println's I see
> sb.length() is 0 ...
>
>  I changed that to something like this
>
>   sb.setLength(
>            (sb.length() - fullPath.length() - 1) > 0
>          ? sb.length() - fullPath.length() - 1
>          : 0
>    );
>
>
>  And then this failed (line 1208)
>      nextTest = nextTest.substring(0, nextTest.length() - 5);
>
>
>

FWIW, we run Mauve in a very similar manner on builder.classpath.org:

exec > Log.Std 2>&1
./configure --with-ecj-jar=/usr/share/java/ecj.jar --with-vm=jamvm &&
make &&
xvfb-run jamvm Harness gnu.testlet -vm jamvm -showpasses -timeout 180000

(this is testing jamvm instead of java, and uses xvfb-run to avoid
needing an X display).

I did run Mauve a while ago on OS X and I don't remember having any
problems.  Things may have changed though.

I believe twisti has done a lot of recent work on the harness, but I
don't think it's committed yet.
--
Andrew :-)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8
Reply | Threaded
Open this post in threaded view
|

Re: Am I doing something wrong?

Christian Thalinger
In reply to this post by David Herron @ Sun
On Tue, 2008-06-24 at 17:42 -0700, David Herron wrote:
> Just to try out Mauve I'm running it on my OS X machine with Apple's Java.
>
> ./configure --with-vm=/Library/Java/Home/bin/java
> make
> java Harness -verbose -showpasses -compile -vm java gnu.testlet

One thing that's wrong, but I'm not sure this is causing the exception,
you have to pass an argument to -compile option:

  -compile [yes|no]:       specify whether or not to compile the tests
before running them.  This

When I try your commandline, it simply test all testlets except the ones
I specify.

- twisti

Reply | Threaded
Open this post in threaded view
|

Re: Am I doing something wrong?

Christian Thalinger
In reply to this post by gnu_andrew
On Wed, 2008-06-25 at 01:51 +0100, Andrew John Hughes wrote:

> >  --->    sb.setLength(sb.length() - fullPath.length() - 1);
> >
> >  So that calculation is going negative, and inserting println's I see
> > sb.length() is 0 ...
> >
> >  I changed that to something like this
> >
> >   sb.setLength(
> >            (sb.length() - fullPath.length() - 1) > 0
> >          ? sb.length() - fullPath.length() - 1
> >          : 0
> >    );
> >
> >
> >  And then this failed (line 1208)
> >      nextTest = nextTest.substring(0, nextTest.length() - 5);

Actually I changed this code very much.

> I believe twisti has done a lot of recent work on the harness, but I
> don't think it's committed yet.

And today is a good day to finally commit it :-)

- twisti

Reply | Threaded
Open this post in threaded view
|

Re: Am I doing something wrong?

Christian Thalinger
In reply to this post by David Herron @ Sun
On Tue, 2008-06-24 at 17:42 -0700, David Herron wrote:
> Just to try out Mauve I'm running it on my OS X machine with Apple's Java.

Hi David!

I also want to run nightly Mauve tests with OpenJDK and I'm having some
problems with the security checks, like:

$ java Harness -vm java -showpasses -debug gnu/testlet/java/lang/Runtime/security.class
WARNING: running tests on 'java'.  To set the test VM, use --with-vm when
configuring or specify -vm when running the Harness.

checkPermission((java.io.FilePermission /bin/true execute))
checkPermission((java.lang.RuntimePermission writeFileDescriptor))
unexpected check: (java.lang.RuntimePermission writeFileDescriptor)
expected: mustCheck: (java.io.FilePermission /bin/true execute)
expected: mayCheck: (java.lang.RuntimePermission modifyThread) (java.lang.RuntimePermission modifyThreadGroup)
Exception in thread "process reaper" java.lang.SecurityException: unexpected check: (java.lang.RuntimePermission writeFileDescriptor)
        at gnu.testlet.TestSecurityManager.checkPermission(TestSecurityManager.java:317)
        at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:234)
        at java.lang.UNIXProcess$1$1$1.run(UNIXProcess.java:139)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.lang.UNIXProcess$1$1.run(UNIXProcess.java:136)

Do you have an idea how we could fix them?  Of course I could disable
them, but...

- twisti