Backport vmTestbase tests to jdk8u-dev?

Liu, Xin xxinliu at amazon.com
Fri Sep 20 18:58:12 UTC 2019


From: Konstantin Shefov <kshefov at azul.com>
Date: Friday, September 20, 2019 at 11:01 AM
To: "Liu, Xin" <xxinliu at amazon.com>, "jdk8u-dev at openjdk.java.net" <jdk8u-dev at openjdk.java.net>
Subject: RE: Backport vmTestbase tests to jdk8u-dev?

Hi, Liu Xin

> I am refactoring makefiles. I plan to upload this webrev today.
Fine! We will try to compile with our toolchains.

Are you aware of this issue?
https://gist.github.com/navyxliu/bacd47891b17ac8d33d04708b648b531

for me, it looks that the root cause the building system chooses gcc instead of g++ to compile/link native libraries for tests.  I used to work around it using STATIC_STDCXX_FLAGS .
but it won’t be portable I guess.
https://github.com/navyxliu/corretto-8/commit/f7beb63f4f4dfa31bd0854f228b266a49eefefed


>> BTW, some tests are extensions to JCK and check JVM Specification. The Specification in Java 14 has changed from that in Java 8.
> Could you give me an example tests for this?

One example is this
https://github.com/navyxliu/corretto-8/blob/vmTestbase/src/hotspot/test/vmTestbase/vm/runtime/defmeth/ConflictingDefaultsTest.java#L329

And most of vmTestbase/vm/runtime/defmeth tests seem to test JVM spec in some way.
See here https://github.com/navyxliu/corretto-8/blob/vmTestbase/src/hotspot/test/vmTestbase/vm/runtime/defmeth/BasicTest.java#L50
and here https://github.com/navyxliu/corretto-8/blob/vmTestbase/src/hotspot/test/vmTestbase/vm/runtime/defmeth/BasicTest.java#L134

Thanks for head-up! I don’t know this issue before. I think we can put them together in a ProblemList.txt file.

Konstantin

From: Liu, Xin <xxinliu at amazon.com>
Sent: Friday, September 20, 2019 8:35 PM
To: Konstantin Shefov <kshefov at azul.com>; jdk8u-dev at openjdk.java.net
Subject: Re: Backport vmTestbase tests to jdk8u-dev?

Konstantin,

I am refactoring makefiles. I plan to upload this webrev today.

I found that you have solved almost all problems. I can help to troubleshoot the remaining tests.
>BTW, some tests are extensions to JCK and check JVM Specification. The Specification in Java 14 has changed from that in Java 8.
Could you give me an example tests for this?

Thanks,
--lx

From: Konstantin Shefov <kshefov at azul.com<mailto:kshefov at azul.com>>
Date: Friday, September 20, 2019 at 2:26 AM
To: "Liu, Xin" <xxinliu at amazon.com<mailto:xxinliu at amazon.com>>, "jdk8u-dev at openjdk.java.net<mailto:jdk8u-dev at openjdk.java.net>" <jdk8u-dev at openjdk.java.net<mailto:jdk8u-dev at openjdk.java.net>>
Subject: Re: Backport vmTestbase tests to jdk8u-dev?

Hi,

We will use your new patches to run tests and merge my changes with yours for those tests that will not work.

BTW, some tests are extensions to JCK and check JVM Specification. The Specification in Java 14 has changed from that in Java 8.

I see your webrevs do not contain native part build scripts for now. We have to address this problem so the scripts should work for older GCC versions also.

Regards
Konstantin

From: "Liu, Xin" <xxinliu at amazon.com<mailto:xxinliu at amazon.com>>
Date: Wednesday, 18 September 2019 at 20:59
To: Konstantin Shefov <kshefov at azul.com<mailto:kshefov at azul.com>>, "jdk8u-dev at openjdk.java.net<mailto:jdk8u-dev at openjdk.java.net>" <jdk8u-dev at openjdk.java.net<mailto:jdk8u-dev at openjdk.java.net>>
Subject: Re: Backport vmTestbase tests to jdk8u-dev?


Hi, Konstantin,



thank you for updating.



We care about x86_64 and aarch64 as well. You ran more tests than us. we never run all vmTestbase.

Previously, I used a ProblemList.txt file to screen Problem and move on. Do you plan to fix all problems before we check in?



Back to refactor, I have filed a JBS issues.

https://bugs.openjdk.java.net/browse/JDK-8231089

In the meanwhile, I start splitting the commits to individual hg changesets.
https://cr.openjdk.java.net/~xliu/8231089/

1. base -> copy code from tag jdk-14+14
intact commit for vmTestbase and testlib
2. make apiChanges for ProcessUtils and Unsafe
Could you review it?

3. ClassFileInstaller needs /testlibrary
it's because ClassFileInstaller is in /test/testlibrary. I use this script to install @library /testlibrary for all tests.

out=$(grep "ClassFileInstaller" -R vmTestbase | awk '{print $1}')
for i in $out; do
    f=${i%\:}
    gsed -i 's/@library \/vmTestbase/&\n *          \/testlibrary/' $f
done


What do you think that this approach?
If I got something wrong, we can update the webtrev with yours.

thanks,
--lx


________________________________
From: Konstantin Shefov <kshefov at azul.com<mailto:kshefov at azul.com>>
Sent: Wednesday, September 18, 2019 4:56 PM
To: Liu, Xin; jdk8u-dev at openjdk.java.net<mailto:jdk8u-dev at openjdk.java.net>
Subject: RE: Backport vmTestbase tests to jdk8u-dev?

Hi

We ran the tests against x86_64 Ubuntu Linux and there are just the same failed tests as it was with Arm64 Ubuntu Linux plus 2 more tests:
vmTestbase/gc/lock/jni/jnilock002/TestDescription.java
vmTestbase/nsk/jdb/set/set001/set001.java

Konstantin


From: Konstantin Shefov
Sent: Wednesday, September 11, 2019 10:53 AM
To: 'Liu, Xin' <xxinliu at amazon.com<mailto:xxinliu at amazon.com>>; jdk8u-dev at openjdk.java.net<mailto:jdk8u-dev at openjdk.java.net>
Subject: RE: Backport vmTestbase tests to jdk8u-dev?

Hi, LX

Answering to your e-mail, as for what we modified in [3]:

  1.  API changes (Process, Unsafe), Xloggc option, that were not in your patches;
  2.  In a file hotspot/test/JtregNativeHotspot.gmk we changed “-lpthread” option to “-pthread” to prevent compilation error.

I agree that there should be a series of patches to track file changes.

As for investigation of failures: do you have the same? We ran against Arm64 platform, but we can try against x86-64 too.

Konstantin

From: Liu, Xin <xxinliu at amazon.com<mailto:xxinliu at amazon.com>>
Sent: Monday, September 9, 2019 11:04 PM
To: Konstantin Shefov <kshefov at azul.com<mailto:kshefov at azul.com>>; jdk8u-dev at openjdk.java.net<mailto:jdk8u-dev at openjdk.java.net>
Subject: Re: Backport vmTestbase tests to jdk8u-dev?

Hi, Konstantin,

We are glad to work with you to get vmTestbase landed into jdk8u.
Our original intent is get design reviewed by the  jdk8u maintainer.  After then, we can proceed to refactor it.  We can work together to refactor it. we plan to do it anyway.

Back to the webrev you send.  What did you modify in [3]?
Ideally, we can should have a series of patches.  The first one should be intact vmTestbase code from the tip of JDK. All we changes should come after it and  be reviewed by this mail-list.
In addition to refactoring, we can also offer help to figure out those failed cases. What do you think?

Thanks,
--lx


From: Konstantin Shefov <kshefov at azul.com<mailto:kshefov at azul.com>>
Date: Friday, September 6, 2019 at 12:55 PM
To: "jdk8u-dev at openjdk.java.net<mailto:jdk8u-dev at openjdk.java.net>" <jdk8u-dev at openjdk.java.net<mailto:jdk8u-dev at openjdk.java.net>>
Cc: "Liu, Xin" <xxinliu at amazon.com<mailto:xxinliu at amazon.com>>
Subject: Re: Backport vmTestbase tests to jdk8u-dev?

Hi,

We at Azul think it is a good idea to backport vmTestbase tests to OpenJDK 8.

We have used patches you suggested, done some refactoring to enable more tests to work with JDK 8.

We have run all 3550 tests from “vmTestbase” folder against Zulu 8 at ARM64 platform:

  1.  3371 tests PASS (see [1]);
  2.  179 tests FAIL (see [2]): reasons are being investigated.

Patches we have used (contain our refactoring):

1.       Hotspot folder [3]

2.       Main folder [4]

We plan to investigate causes of those 177 failures, purify unused code from hotspot/test/test/lib/jdk, and run the tests against different platforms.

We also compared vmTestbase from JDK 11 with that from JDK 13, we found out:

  1.  332 test have been removed in JDK 13;
  2.  Only 2 test have been added in JDK 13;
  3.  Tests that remained were modified, but these modifications mostly are copyright years, or output format, or API changes.
From the above results we can tell that vmTestbase does not grow. It looks like that tests are been removed from there or transferred somewhere else.

[1] http://cr.openjdk.java.net/~kshefov/vmTestbase_8_backport/passed_tests.html
[2] http://cr.openjdk.java.net/~kshefov/vmTestbase_8_backport/failed_tests.html
[3] http://cr.openjdk.java.net/~kshefov/vmTestbase_8_backport/vmTestbase_hotspot.patch
[4] http://cr.openjdk.java.net/~kshefov/vmTestbase_8_backport/vmTestbase_root.patch

Regards,
--Konstantin



More information about the jdk8u-dev mailing list