Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8232593

[TESTBUG] runtime/cds/CheckDefaultArchiveFile.java fails when cds is disabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 14
    • Fix Version/s: 14
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b20

      Description

      * Reproduce
      -------------------------------------
      bash configure --disable-cds ...
      make test TEST="runtime/cds/CheckDefaultArchiveFile.java"
      -------------------------------------

      * Symptom
      -------------------------------------
      ACTION: main -- Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: default CDS archive supported, but classes.jsa path null
      REASON: User specified action: run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI CheckDefaultArchiveFile
      TIME: 0.276 seconds
      messages:
      command: main -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI CheckDefaultArchiveFile
      reason: User specified action: run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI CheckDefaultArchiveFile
      Mode: othervm [/othervm specified]
      elapsed time (seconds): 0.276
      configuration:
      STDOUT:
      classes.jsa location:null
      STDERR:
      java.lang.RuntimeException: default CDS archive supported, but classes.jsa path null
              at CheckDefaultArchiveFile.main(CheckDefaultArchiveFile.java:52)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:564)
              at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
              at java.base/java.lang.Thread.run(Thread.java:830)

      JavaTest Message: Test threw exception: java.lang.RuntimeException: default CDS archive supported, but classes.jsa path null
      JavaTest Message: shutting down test
      -------------------------------------

      * Fix
      -------------------------------------
      diff -r 9f5b92d5a1b2 test/hotspot/jtreg/runtime/cds/CheckDefaultArchiveFile.java
      --- a/test/hotspot/jtreg/runtime/cds/CheckDefaultArchiveFile.java Fri Oct 18 09:57:20 2019 +0900
      +++ b/test/hotspot/jtreg/runtime/cds/CheckDefaultArchiveFile.java Fri Oct 18 13:43:41 2019 +0800
      @@ -25,6 +25,7 @@
        * @test Default CDS archive file
        * @summary JDK platforms/binaries do not support default CDS archive should
        * not contain classes.jsa in the default location.
      + * @requires vm.cds
        * @library /test/lib
        * @build sun.hotspot.WhiteBox
        * @run driver ClassFileInstaller sun.hotspot.WhiteBox
      -------------------------------------

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jiefu Jie Fu
              Reporter:
              jiefu Jie Fu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: