RFR: 8297543: runtime/cds/appcds/cacheObject/ArchivedModuleCompareTest.java fail with jfx

Leslie Zhai lzhai at openjdk.org
Thu Nov 24 03:48:44 UTC 2022


Hi,

configure --with-import-modules=modular-sdk

make run-test CONF=fastdebug TEST="runtime/cds/appcds/cacheObject/ArchivedModuleCompareTest.java" failed:


STDERR:
java.lang.RuntimeException: javafx.controls requires javafx.base jrt:/javafx.base is different from javafx.base requires jdk.jfr jrt:/jdk.jfr
        at TestCommon.checkOutputStrings(TestCommon.java:657)
        at ArchivedModuleCompareTest.main(ArchivedModuleCompareTest.java:82)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
        at java.base/java.lang.Thread.run(Thread.java:833)


debug patch:


diff --git a/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchivedModuleCompareTest.java b/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchivedModuleCompareTest.java
index 00ef746123f..5501e8264e0 100644
--- a/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchivedModuleCompareTest.java
+++ b/test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchivedModuleCompareTest.java
@@ -75,6 +75,10 @@ public class ArchivedModuleCompareTest {
         TestCommon.checkExec(output);
         if (output.getStderr().contains("sharing")) {
             String moduleResolutionOut2 = TestCommon.filterOutLogs(output.getStdout());
+ System.out.println("************************* moduleResolutionOut1 ***************************");
+ System.out.println(moduleResolutionOut1);
+ System.out.println("************************* moduleResolutionOut2 ***************************");
+ System.out.println(moduleResolutionOut2);
             TestCommon.checkOutputStrings(
                 moduleResolutionOut1, moduleResolutionOut2, "\n");
         }


There are 2 javafx.base in the moduleResolutionOut2:


javafx.base requires jdk.jfr jrt:/jdk.jfr
javafx.base requires java.desktop jrt:/java.desktop


So it needs to find sa1's elements in the sa2.

Please review the patch.

Thanks,
Leslie Zhai

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

Commit messages:
 - 8297543: runtime/cds/appcds/cacheObject/ArchivedModuleCompareTest.java fail with jfx

Changes: https://git.openjdk.org/jdk/pull/11343/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11343&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8297543
  Stats: 10 lines in 1 file changed: 7 ins; 1 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/11343.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11343/head:pull/11343

PR: https://git.openjdk.org/jdk/pull/11343


More information about the hotspot-runtime-dev mailing list