Test failures when using Java 8

74 views
Skip to first unread message

Lyle Kopnicky

unread,
Feb 17, 2015, 1:39:53 AM2/17/15
to scala-i...@googlegroups.com
I'm using Java 8, and I get a lot of test failures of the form:

fail - run/SI-6715.scala  [output differs]% scalac SI-6715.scala
% /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/bin/java \
...
  jvm > SI-6715-run.log
% diff /Users/lyle/devel/scala/scala/test/scaladoc/run/SI-6715-run.log /Users/lyle/devel/scala/scala/test/scaladoc/run/SI-6715.check
@@ -1,2 +1 @@
-Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=192M; support was removed in 8.0
 Done.

It appears that since Java 8 no longer uses PermGen, the MaxPermSize parameter is useless, and it warns us about it. Fine, we can ignore it, right?

But there are tests checking the output of the compiler, and the presence of that warning makes the tests fail.

I feel we can't claim to support Java 8 if the test suite is failing. Is there a way we can detect the Java version and drop the MaxPermSize parameter when the Java version is >= 1.8?

Regards,
Lyle

Lukas Rytz

unread,
Feb 17, 2015, 1:55:47 AM2/17/15
to scala-i...@googlegroups.com
The following should do it (haven't tested):
 - When running through ant, set the ANT_OPTS env variable, eg to "-Xms1536M -Xmx1536M -Xss1M"
 - When running test/partest, it's JAVA_OPTS.

Maybe you could submit a patch to the test/partest script and the build.xml, so that the default options don't include MaxPermSize under Java 8?

--
You received this message because you are subscribed to the Google Groups "scala-internals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-interna...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Som Snytt

unread,
Feb 17, 2015, 3:45:46 AM2/17/15
to scala-internals
Fix that by copying

test/files/filters

to

test/scaladoc/filters

One of the filters is for HotSpot warnings, and covers this case.

Because scaladoc tests are rooted differently, they're not picking up the filters file.

For some reason, the scaladoc tests pass under test/partest.

Lukas Rytz

unread,
Feb 17, 2015, 3:51:03 AM2/17/15
to scala-i...@googlegroups.com
Wow, partest.. thanks!

Lyle Kopnicky

unread,
Feb 18, 2015, 12:13:37 PM2/18/15
to Adriaan Moors (JIRA)
Will fix, thanks.

On Mon, Feb 16, 2015 at 10:55 PM, Lukas Rytz <lukas...@gmail.com> wrote:

Lyle Kopnicky

unread,
Feb 18, 2015, 12:14:29 PM2/18/15
to Adriaan Moors (JIRA)
Ah, interesting, good find!
Reply all
Reply to author
Forward
0 new messages