-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java 11 support #274
Comments
How to help with failing tests for Java-11 support
on Mac OS X, similar setting on Linux.
Parts of the log relating to the failure:
The fourth line in the stack trace points to the test in question, here: In the test log, you can find the output of JPF in the
Inside that section, you can see why the test actually fails:
So the reason for this test failing is in a class that is used inside the code (and not directly related to To fix this, it may be a good idea to start closer to the source where the test fails:
(a) You write a model class for JPF, which replaces the build-in library class of the host JVM with a simplified version that is as close as possible to the original, yet compatible with JPF. This allows you to rewrite code in a way that avoids dependencies with problematic code that has native methods which JPF cannot execute. Finding out which solution works best depends on each case and may take some trial and error. |
who ever is thinking to give it a try by solving all the errors one by one, just don't waste your time. I have been trying this since 20 days, and errors are still coming. There are infinite errors. |
@puneetkathar1 : Thank you for trying to resolve some of these test failures. Some of them are indeed quite difficult to eliminate, but we have had some success; Malte contributed a patch that resolves two issues (one was build-related, the other one required changes in the model classes). It is therefore also useful for us if you can make a step towards isolating such a problem better, and create a new unit test that highlights a smaller-scale problem failing. Even if fixing such a new test will not fix on of the remaining 16 unit tests, it will improve Java 11 compatibility for us. |
I spend some time on coming up with an idea for:
Hopefully, I might fix them soon. If anyone considers to work on them, I might provide some hints. |
* Add PlatformClassLoader Nowadays, Java is aware of three different Class Loaders: System, Platform and Thread. * Add tid (thread id) to Thread as required in Java 11 * Add additional Constructor to secure class laoder matching Java 11 singatures This ClassLoader is used in the service provider loading and helps to port the DateFormat test cases. * Add defineUnnamedModule to the System class This method is ocassinaly used by Java internals requried to make the DateFormat conversion work. * Extend the JavaLangAccess signature * Add missing methods to Unsafe After resoling an error in loading modules from the classes folder, the Unsafe missed some methods. * Fix some internals of concurrent This fixes CountDownLatchTest, ExecutorServiceTest, SemaphoreTest * Load unloaded error classes JPF requries nowadays a repeatedInvocation for LoadOnJPFRequired errors.
mmuesly's PR fixed a lot of issues at once. Thanks a lot! Now 11 failing tests left:
|
+1 |
Hello @cyrille-artho , I might try them after I take a look at them(and hopefully understand the code), well @mmuesly , hints please? |
@Ln11211 excuse the delay. If you run the debugger across these test cases, you should find a similar place that fails. Setting |
Hello @cyrille-artho , I tried to build and run the tests and I got 13 failed tests. The two new failed tests are from the class URLClassLoaderTest. Can you confirm ? |
Yeah, you are right, Setting |
Hi @Ln11211 |
We mostly use the Java Pathfinder Google Group and this issue tracker for communication, as it is difficult to find a suitable time slot for communication. This applies especially in the middle of academic terms, as most of us work at universities. We usually have 1 on 1 meetings for summer projects. |
Hi, I have a possible solution for one of the failing cases (testSimpleReadbackOk), please see #325. I'm not sure if this fixes it in Java 11 though. Update: The issue is much more complex in Java 11, as there are some missing methods in java.lang.Class and java.lang.Constructor that need to be added first. |
String concatenation is currently not handled properly in Java 11 also. There is currently no test for this (see #327). |
Current list: Other: |
Varadraj works on the (Simple)DateFormatTest failues, Daohan on the others. |
…part of javapathfinder#274 - Fixes three failing tests from DateFormatTest and the sole failing test from SimpleDateFormatTest class
…part of javapathfinder#274 - Fixes three failing tests from DateFormatTest and the sole failing test from SimpleDateFormatTest class
…FormatTest as part of javapathfinder#274
…part of #274 (#363) * Fix the failing tests in DateFormatTest and SimpleDateFormatTest * Fix the failing tests belonging to Simple(DateFormatTest) classes as part of #274 - Fixes three failing tests from DateFormatTest and the sole failing test from SimpleDateFormatTest class * Addresses requested changes in #363 to fix (Simple)DateFormatTest as part of #274 * Fix indentation in String.java Co-authored-by: varad64 <[email protected]>
We made great progress! Current status: [ ] ObjectStreamTest. testSimpleReadbackOk: works on some JDKs but not all |
* Add Java 11 support for SAXParserTest to fix #274 --------- Co-authored-by: varad64 <[email protected]>
We now support all unit tests (on OpenJDK 11), so the remaining tasks are:
|
Documentation and CI configuration are pending. |
CI configuration is updated, only the wiki update is pending. |
We are all set for Java 11 now! |
There is a branch
java-10-gradle
that we use for work to support Java 11 (that started with Java 10 support).To reproduce the current state, try to install OpenJDK version 11 and compile the code from that branch, and run the tests with
./gradlew check
.Currently 16 unit tests are still failing there. Fixes are very welcome. Some of these problems below are already referenced in an issue. If someone starts to work on a particular test, please create a separate issue referring to one or two of these failing tests:
The text was updated successfully, but these errors were encountered: