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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 14
    • 14
    • hotspot
    • None
    • b20

      * 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
      -------------------------------------

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

              Created:
              Updated:
              Resolved: