[jdk17u-dev] RFR: 8319567: Update java/lang/invoke tests to support vm flags
Goetz Lindenmaier
goetz at openjdk.org
Fri Dec 20 14:09:19 UTC 2024
This change did not apply well. I needed the following adaptions:
test/jdk/java/lang/ClassLoader/loadLibraryUnload/LoadLibraryUnloadTest.java
is missing in 17. It was added by "8266310: deadlock between System.loadLibrary and JNI FindClass loading another class"
in 18. Skipped.
Resolved test/jdk/java/lang/invoke/lambda/LambdaAccessControlTest.java
bacause "8284209: Replace remaining usages of 'a the' in source code" not in 17.
test/jdk/java/lang/invoke/lambda/LambdaAsm.java
resolved because
8292914: Lambda proxies have unstable names
and 8304846: Provide a shared utility to dump generated classes defined via Lookup API
not in 17
I needed to keep one of the removed imports.
test/jdk/java/lang/invoke/lambda/LogGeneratedClassesTest.java
This needed an extensive resolve.
8304846: Provide a shared utility to dump generated classes defined via Lookup API
and
8307944: ClassFileDumper should only load java.nio.file.Path if enabled
not in 17.
I had to rework this test significantly.
The test assures that a property works that makes the VM dump
lambda classes it has generated. This mechanism has changed between 17 and 21.
E.g., the property name is different. Also, 17 needs to be passed
a directory name, 21 has a default name for this directory.
Some error cases are handled differently, sometimes a bug
is reported where the other implementation continues silently.
I try to take over the test structure of the test in 21,
but I adapt it to test for the same VM behaviour the old
test in 17 did.
The new test compiles the test class to subdirectory "classes/"
where the old test compiled them to ".".
Also, the new test places all dumped lambda classes in
DUMP_LAMBDA_PROXY_CLASS_FILES that is generated in the
working directory, where the old test wrote them directly
into the working directory.
test/jdk/java/lang/reflect/exeCallerAccessTest/CallerAccessTest.java
resolved as
8221642: AccessibleObject::setAccessible throws NPE when invoked by JNI code with no java frame on stack
and
8300139 [AIX] Use pthreads to avoid JNI_createVM call from primordial thread
not in 17
-------------
Commit messages:
- Backport 1588dd934ce4e00a060e329b80f721d894559597
Changes: https://git.openjdk.org/jdk17u-dev/pull/3153/files
Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=3153&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8319567
Stats: 550 lines in 16 files changed: 114 ins; 287 del; 149 mod
Patch: https://git.openjdk.org/jdk17u-dev/pull/3153.diff
Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/3153/head:pull/3153
PR: https://git.openjdk.org/jdk17u-dev/pull/3153
More information about the jdk-updates-dev
mailing list