[jdk17u-dev] Integrated: 8319567: Update java/lang/invoke tests to support vm flags
Goetz Lindenmaier
goetz at openjdk.org
Fri Dec 27 10:06:45 UTC 2024
On Fri, 20 Dec 2024 14:03:30 GMT, Goetz Lindenmaier <goetz at openjdk.org> wrote:
> 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
This pull request has now been integrated.
Changeset: 743724ef
Author: Goetz Lindenmaier <goetz at openjdk.org>
URL: https://git.openjdk.org/jdk17u-dev/commit/743724ef7262f3e0bec8f031f7eeaa4e1e4dda78
Stats: 550 lines in 16 files changed: 114 ins; 287 del; 149 mod
8319567: Update java/lang/invoke tests to support vm flags
8319568: Update java/lang/reflect/exeCallerAccessTest/CallerAccessTest.java to accept vm flags
8319672: Several classloader tests ignore VM flags
8319676: A couple of jdk/modules/incubator/ tests ignore VM flags
8319677: Test jdk/internal/misc/VM/RuntimeArguments.java should be marked as flagless
Reviewed-by: mdoerr
Backport-of: 1588dd934ce4e00a060e329b80f721d894559597
-------------
PR: https://git.openjdk.org/jdk17u-dev/pull/3153
More information about the jdk-updates-dev
mailing list