[jdk8u-dev] RFR: 8329544: [8u] sun/security/krb5/auto/ReplayCacheTestProc.java cannot find the testlibrary

Andrew John Hughes andrew at openjdk.org
Wed Apr 10 00:44:09 UTC 2024


On Tue, 2 Apr 2024 16:48:49 GMT, Ian Myers <imyers at openjdk.org> wrote:

> `sun/security/krb5/auto/ReplayCacheTestProc.java` fails on jdk8u-412 due to a compilation error. This is because the classpath is being set incorrectly by the `@library` annotation.
> 
> 
> TEST: sun/security/krb5/auto/ReplayCacheTestProc.java
> TEST JDK: /home/ianrichr/openjdk/jdk8u/build/linux-x86_64-normal-server-release/images/j2sdk-image
> 
> ACTION: compile -- Failed. Compilation failed: Compilation failed
> REASON: User specified action: run compile -XDignore.symbol.file ReplayCacheTestProc.java
> TIME:   0.752 seconds
> messages:
> command: compile -XDignore.symbol.file /local/home/ianrichr/openjdk/jdk8u/jdk/test/sun/security/krb5/auto/ReplayCacheTestProc.java
> reason: User specified action: run compile -XDignore.symbol.file ReplayCacheTestProc.java
> Mode: agentvm
> Agent id: 1
> elapsed time (seconds): 0.752
> configuration:
> Boot Layer (javac runtime environment)
>   class path: /home/ianrichr/openjdk/jdk8u/build/linux-x86_64-normal-server-release/images/j2sdk-image/lib/tools.jar
>               /local/home/ianrichr/openjdk/jtreg/lib/javatest.jar
>               /local/home/ianrichr/openjdk/jtreg/lib/jtreg.jar
> 
> javac compilation environment
>   source path: /local/home/ianrichr/openjdk/jdk8u/jdk/test/sun/security/krb5/auto
>                /local/home/ianrichr/openjdk/jdk8u/jdk/test/java/security/testlibrary
>   class path:  /local/home/ianrichr/openjdk/jdk8u/jdk/test/sun/security/krb5/auto
>                /local/home/ianrichr/openjdk/jdk8u/build/linux-x86_64-normal-server-release/testoutput/jdk_adhoc/JTwork/classes/0/sun/security/krb5/auto
>                /home/ianrichr/openjdk/jdk8u/build/linux-x86_64-normal-server-release/images/j2sdk-image/lib/tools.jar
> 
> rerun:
> cd /local/home/ianrichr/openjdk/jdk8u/build/linux-x86_64-normal-server-release/testoutput/jdk_adhoc/JTwork/scratch/0 && \
> HOME=/home/ianrichr \
> LANG=en_US.UTF-8 \
> PATH=/bin:/usr/bin:/usr/sbin \
>     /home/ianrichr/openjdk/jdk8u/build/linux-x86_64-normal-server-release/images/j2sdk-image/bin/javac \
>         -J-ea \
>         -J-esa \
>         -J-Xmx512m \
>         -J-Dtest.vm.opts='-ea -esa -Xmx512m' \
>         -J-Dtest.tool.vm.opts='-J-ea -J-esa -J-Xmx512m' \
>         -J-Dtest.compiler.opts= \
>         -J-Dtest.java.opts= \
>         -J-Dtest.jdk=/home/ianrichr/openjdk/jdk8u/build/linux-x86_64-normal-server-release/images/j2sdk-image \
>         -J-Dcompile.jdk=/home/ianrichr/openjdk/jdk8u/build/linux-x86_64-normal-server-release/images/j2sdk-image \
>         -J-Dtest.timeout.factor=4.0 \
>         -J-Dtest.root=/local/home/ianrichr/openjdk/j...

Seems a harmless addition, but also not always necessary

> This really looks like an omission in the 8u backport. The original change does add `/test/lib`: [openjdk/jdk at e10da99?diff=unified&w=0#diff-a66e8361b5d10cd8f8bff535c2759ad4f2e4bdbbd2368ddf5c644bce77e5aa18R28](https://github.com/openjdk/jdk/commit/e10da9956fba577bcc097b63eb3b4d09896fa77d?diff=unified&w=0#diff-a66e8361b5d10cd8f8bff535c2759ad4f2e4bdbbd2368ddf5c644bce77e5aa18R28)



> This really looks like an omission in the 8u backport. The original change does add `/test/lib`: [openjdk/jdk at e10da99?diff=unified&w=0#diff-a66e8361b5d10cd8f8bff535c2759ad4f2e4bdbbd2368ddf5c644bce77e5aa18R28](https://github.com/openjdk/jdk/commit/e10da9956fba577bcc097b63eb3b4d09896fa77d?diff=unified&w=0#diff-a66e8361b5d10cd8f8bff535c2759ad4f2e4bdbbd2368ddf5c644bce77e5aa18R28)

Probably because it wasn't necessary. If you read https://github.com/openjdk/jdk8u-dev/pull/418 it passes without this and indeed it didn't fail for me just now either. The only way I could get the error quoted was to remove `external.lib.roots` (https://github.com/openjdk/jdk8u/commit/eace2d732133accd3be9e95a9e75aee0fc1938f8#diff-6f996ccac16c4cddc35780b36cf8a2ea80780bb3486564a30f71dafa2af0fbe3R31)

I see no harm in adding it, but it's not that this went untested to begin with. It does work as is in some configurations.

Note that `/test/lib` is pretty new in 8u and was only created by JDK-8305329 last November, so it has been standard to remove/change this prior to that change.

-------------

Marked as reviewed by andrew (Reviewer).

PR Review: https://git.openjdk.org/jdk8u-dev/pull/478#pullrequestreview-1990512372
PR Comment: https://git.openjdk.org/jdk8u-dev/pull/478#issuecomment-2046254392


More information about the jdk8u-dev mailing list