Skip to content
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

8329544: [8u] sun/security/krb5/auto/ReplayCacheTestProc.java cannot find the testlibrary #478

Closed
wants to merge 1 commit into from

Conversation

ianrichr
Copy link

@ianrichr ianrichr commented Apr 2, 2024

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/jdk8u/jdk/test \
        -J-Dtest.name=sun/security/krb5/auto/ReplayCacheTestProc.java \
        -J-Dtest.file=/local/home/ianrichr/openjdk/jdk8u/jdk/test/sun/security/krb5/auto/ReplayCacheTestProc.java \
        -J-Dtest.src=/local/home/ianrichr/openjdk/jdk8u/jdk/test/sun/security/krb5/auto \
        -J-Dtest.src.path=/local/home/ianrichr/openjdk/jdk8u/jdk/test/sun/security/krb5/auto:/local/home/ianrichr/openjdk/jdk8u/jdk/test/java/security/testlibrary \
        -J-Dtest.classes=/local/home/ianrichr/openjdk/jdk8u/build/linux-x86_64-normal-server-release/testoutput/jdk_adhoc/JTwork/classes/0/sun/security/krb5/auto \
        -J-Dtest.class.path=/local/home/ianrichr/openjdk/jdk8u/build/linux-x86_64-normal-server-release/testoutput/jdk_adhoc/JTwork/classes/0/sun/security/krb5/auto:/local/home/ianrichr/openjdk/jdk8u/build/linux-x86_64-normal-server-release/testoutput/jdk_adhoc/JTwork/classes/0/java/security/testlibrary \
        -J-Dtest.class.path.prefix=/local/home/ianrichr/openjdk/jdk8u/build/linux-x86_64-normal-server-release/testoutput/jdk_adhoc/JTwork/classes/0/sun/security/krb5/auto:/local/home/ianrichr/openjdk/jdk8u/jdk/test/sun/security/krb5/auto \
        -d /local/home/ianrichr/openjdk/jdk8u/build/linux-x86_64-normal-server-release/testoutput/jdk_adhoc/JTwork/classes/0/sun/security/krb5/auto \
        -sourcepath /local/home/ianrichr/openjdk/jdk8u/jdk/test/sun/security/krb5/auto:/local/home/ianrichr/openjdk/jdk8u/jdk/test/java/security/testlibrary \
        -classpath /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 \
        -XDignore.symbol.file /local/home/ianrichr/openjdk/jdk8u/jdk/test/sun/security/krb5/auto/ReplayCacheTestProc.java
direct:
/local/home/ianrichr/openjdk/jdk8u/jdk/test/sun/security/krb5/auto/ReplayCacheTestProc.java:46: error: package jdk.test.lib does not exist
import jdk.test.lib.Platform;
                   ^
/local/home/ianrichr/openjdk/jdk8u/jdk/test/sun/security/krb5/auto/ReplayCacheTestProc.java:138: error: cannot find symbol
                if (Platform.isOSX() || Platform.isWindows()) {
                    ^
  symbol:   variable Platform
  location: class ReplayCacheTestProc
/local/home/ianrichr/openjdk/jdk8u/jdk/test/sun/security/krb5/auto/ReplayCacheTestProc.java:138: error: cannot find symbol
                if (Platform.isOSX() || Platform.isWindows()) {
                                        ^
  symbol:   variable Platform
  location: class ReplayCacheTestProc
Note: /local/home/ianrichr/openjdk/jdk8u/jdk/test/sun/security/krb5/auto/KDC.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors

TEST RESULT: Failed. Compilation failed: Compilation failed
--------------------------------------------------
Test results: failed: 1
Report written to /local/home/ianrichr/openjdk/jdk8u/build/linux-x86_64-normal-server-release/testoutput/jdk_adhoc/JTreport/html/report.html
Results written to /local/home/ianrichr/openjdk/jdk8u/build/linux-x86_64-normal-server-release/testoutput/jdk_adhoc/JTwork
Error: Some tests failed or other problems occurred.
Summary: jdk_adhoc
FAILED: sun/security/krb5/auto/ReplayCacheTestProc.java

Appending /test/lib to the @library annotation allows the compilation to succeed and the test passes.

Passed: sun/security/krb5/auto/ReplayCacheTestProc.java
Test results: passed: 1

This was introduced with this PR/issue https://bugs.openjdk.org/browse/JDK-8168518 when the import jdk.test.lib.Platform; was added to the test file.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8329544 needs maintainer approval

Issue

  • JDK-8329544: [8u] sun/security/krb5/auto/ReplayCacheTestProc.java cannot find the testlibrary (Bug - P4 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/478/head:pull/478
$ git checkout pull/478

Update a local copy of the PR:
$ git checkout pull/478
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/478/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 478

View PR using the GUI difftool:
$ git pr show -t 478

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/478.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 2, 2024

👋 Welcome back imyers! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Apr 2, 2024

@ianrichr This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

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

Reviewed-by: shade, andrew

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 22 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@shipilev, @gnu-andrew) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 2, 2024
@ianrichr ianrichr changed the title 8329544: sun/security/krb5/auto/ReplayCacheTestProc.java fails to compile due to incorrect classpath set by @library [8u] sun/security/krb5/auto/ReplayCacheTestProc.java fails due to incorrect classpath set by @library Apr 2, 2024
@openjdk openjdk bot removed the rfr Pull request is ready for review label Apr 2, 2024
@ianrichr ianrichr changed the title [8u] sun/security/krb5/auto/ReplayCacheTestProc.java fails due to incorrect classpath set by @library 8329544: [8u] sun/security/krb5/auto/ReplayCacheTestProc.java fails due to incorrect classpath set by @library Apr 2, 2024
@ianrichr ianrichr changed the title 8329544: [8u] sun/security/krb5/auto/ReplayCacheTestProc.java fails due to incorrect classpath set by @library 8329544: [8u] sun/security/krb5/auto/ReplayCacheTestProc.java cannot find the testlibrary Apr 2, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 2, 2024
@mlbridge
Copy link

mlbridge bot commented Apr 2, 2024

Webrevs

Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This really looks like an omission in the 8u backport. The original change does add /test/lib: openjdk/jdk@e10da99?diff=unified&w=0#diff-a66e8361b5d10cd8f8bff535c2759ad4f2e4bdbbd2368ddf5c644bce77e5aa18R28

@openjdk
Copy link

openjdk bot commented Apr 2, 2024

⚠️ @ianrichr This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@ianrichr
Copy link
Author

ianrichr commented Apr 3, 2024

/approval request Fixes the test compilation failure. The test passes after the fix. This fix is present in the original change, but seems to have been mistakenly omitted in the 8u backport. tier1 tests pass with unrelated CAInterop failures. Risk is low, test-only fix.

@openjdk
Copy link

openjdk bot commented Apr 3, 2024

@ianrichr
8329544: The approval request has been created successfully.

@jerboaa
Copy link
Contributor

jerboaa commented Apr 5, 2024

/approve yes

@openjdk
Copy link

openjdk bot commented Apr 5, 2024

@jerboaa
8329544: The approval request has been approved.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed approval labels Apr 5, 2024
@gnu-andrew
Copy link
Member

This really looks like an omission in the 8u backport. The original change does add /test/lib: openjdk/jdk@e10da99?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@e10da99?diff=unified&w=0#diff-a66e8361b5d10cd8f8bff535c2759ad4f2e4bdbbd2368ddf5c644bce77e5aa18R28

Probably because it wasn't necessary. If you read #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 (openjdk/jdk8u@eace2d7#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.

Copy link
Member

@gnu-andrew gnu-andrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems a harmless addition, but also not always necessary

@ianrichr
Copy link
Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Apr 12, 2024
@openjdk
Copy link

openjdk bot commented Apr 12, 2024

@ianrichr
Your change (at version 85e2a00) is now ready to be sponsored by a Committer.

@gnu-andrew
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Apr 15, 2024

Going to push as commit c6ba33e.
Since your change was applied there have been 22 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Apr 15, 2024
@openjdk openjdk bot closed this Apr 15, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Apr 15, 2024
@openjdk
Copy link

openjdk bot commented Apr 15, 2024

@gnu-andrew @ianrichr Pushed as commit c6ba33e.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants