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

[TESTBUG] Some CDS tests don't respect JVM variant being tested

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 12
    • 12
    • hotspot
    • b17
    • generic
    • generic

      2 tests in particular fail when non-default JVM variant is being tested:
        runtime/SharedArchiveFile/PrintSharedArchiveAndExit.java
        runtime/SharedArchiveFile/NonBootLoaderClasses.java

      Proper flags are used when creating CDS archive, but aren't passed to the consequent JVM which tries to load the archive. Wrong JVM is used and archive loading fails due to JVM version mismatch.

      Excerpt from test log:
      Command line: [ .../bin/java -cp ... -XX:MaxRAMPercentage=6 -server -Xcomp -myjvmvariant -Xshare:dump -Xlog:cds,cds+hashtables -XX:SharedArchiveFile=./PrintSharedArchiveAndExit.jsa ]
      [ELAPSED: 2352 ms]
      [logging stdout to PrintSharedArchiveAndExit-0000-dump.stdout]
      [logging stderr to PrintSharedArchiveAndExit-0000-dump.stderr]
      [STDERR]

      Command line: [.../bin/java -cp ... -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=./PrintSharedArchiveAndExit.jsa -XX:+PrintSharedArchiveAndExit -version ]
      [ELAPSED: 32 ms]
      [logging stdout to PrintSharedArchiveAndExit-0001-print-shared-archive-and-version.stdout]
      [logging stderr to PrintSharedArchiveAndExit-0001-print-shared-archive-and-version.stderr]
      [STDERR]
      An error has occurred while processing the shared archive file.
      The shared archive file was created by a different version or build of HotSpot
        

            ccheung Calvin Cheung
            vlivanov Vladimir Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: