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

Test 'tools/jpackage/share/IconTest.java' always fails on Windows 11

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P4
    • 20
    • 20
    • tools
    • x86_64
    • windows

    Description

      Test always fails for me on master on Windows 11

      [13:32:59.622] [ RUN ] IconTest(AppImage, CustomIcon, NoIcon).test
      [13:32:59.622] TRACE: exec: Execute tool provider [javac -d .\\test.3b95dd9a\\jar-workdir C:\\Projects\\jdk\\test\\jdk\\tools\\jpackage\\apps\\Hello.java](4)...
      [13:32:59.747] TRACE: exec: Done. Exit code: 0
      [13:32:59.747] TRACE: assertEquals(0): Check command tool provider [javac -d .\\test.3b95dd9a\\jar-workdir C:\\Projects\\jdk\\test\\jdk\\tools\\jpackage\\apps\\Hello.java](4) exited with 0 code
      [13:32:59.774] TRACE: exec: Execute tool provider [jar -c -f .\\test.3b95dd9a\\input\\hello.jar -C .\\test.3b95dd9a\\jar-workdir .](7)...
      [13:32:59.789] TRACE: exec: Done. Exit code: 0
      [13:32:59.789] TRACE: assertEquals(0): Check command tool provider [jar -c -f .\\test.3b95dd9a\\input\\hello.jar -C .\\test.3b95dd9a\\jar-workdir .](7) exited with 0 code
      [13:32:59.789] TRACE: Create [C:\\Projects\\jdk\\build\\windows-x86_64-server-release\\test-support\\jtreg_test_jdk_tools_jpackage_share_IconTest_java\\scratch\\0\\test.3b95dd9a\\x.properties] properties file...
      [13:32:59.789] TRACE: icon=
      [13:32:59.789] TRACE: Done
      [13:32:59.789] TRACE: Init fake runtime in [.\\test.3b95dd9a\\fake_runtime] directory
      [13:32:59.789] TRACE: exec: Execute [c:\\projects\\jdk\\build\\windows-x86_64-server-release\\images\\jdk\\bin\\jpackage.exe --input .\\test.3b95dd9a\\input --dest .\\test.3b95dd9a\\output --name IconTest --type app-image --main-jar hello.jar --main-class Hello --win-console --icon C:\\Projects\\jdk\\test\\jdk\\tools\\jpackage\\resources\\icon.ico --add-launcher x=.\\test.3b95dd9a\\x.properties --runtime-image .\\test.3b95dd9a\\fake_runtime -J-Djlink.debug=true --verbose](22); save output...
      [13:33:00.182] Creating app package: IconTest in C:\\Projects\\jdk\\build\\windows-x86_64-server-release\\test-support\\jtreg_test_jdk_tools_jpackage_share_IconTest_java\\scratch\\0\\.\\test.3b95dd9a\\output
      [13:33:00.205] Using custom package resource [icon] (loaded from file C:\\Projects\\jdk\\test\\jdk\\tools\\jpackage\\resources\\icon.ico).
      [13:33:00.238] Using default package resource WinLauncher.template [Template for creating executable properties file] (add IconTest.properties to the resource-dir to customize).
      [13:33:00.298] Using default package resource WinLauncher.template [Template for creating executable properties file] (add x.properties to the resource-dir to customize).
      [13:33:00.313] Succeeded in building Windows Application Image package
      [13:33:00.322] TRACE: exec: Done. Exit code: 0
      [13:33:00.322] TRACE: assertEquals(0): Check command [c:\\projects\\jdk\\build\\windows-x86_64-server-release\\images\\jdk\\bin\\jpackage.exe --input .\\test.3b95dd9a\\input --dest .\\test.3b95dd9a\\output --name IconTest --type app-image --main-jar hello.jar --main-class Hello --win-console --icon C:\\Projects\\jdk\\test\\jdk\\tools\\jpackage\\resources\\icon.ico --add-launcher x=.\\test.3b95dd9a\\x.properties --runtime-image .\\test.3b95dd9a\\fake_runtime -J-Djlink.debug=true --verbose](22) exited with 0 code
      [13:33:00.322] TRACE: assertFalse(): Check [.\\test.3b95dd9a\\output\\IconTest\\x.ico] path doesn't exist
      [13:33:00.322] TRACE: exec: Execute tool provider [javac -d .\\test.3b95dd9a\\jar-workdir C:\\Projects\\jdk\\test\\jdk\\tools\\jpackage\\apps\\Hello.java](4)...
      [13:33:00.445] TRACE: exec: Done. Exit code: 0
      [13:33:00.445] TRACE: assertEquals(0): Check command tool provider [javac -d .\\test.3b95dd9a\\jar-workdir C:\\Projects\\jdk\\test\\jdk\\tools\\jpackage\\apps\\Hello.java](4) exited with 0 code
      [13:33:00.445] TRACE: Delete [.\\test.3b95dd9a\\input\\hello.jar] existing jar file
      [13:33:00.445] TRACE: exec: Execute tool provider [jar -c -f .\\test.3b95dd9a\\input\\hello.jar -C .\\test.3b95dd9a\\jar-workdir .](7)...
      [13:33:00.452] TRACE: exec: Done. Exit code: 0
      [13:33:00.452] TRACE: assertEquals(0): Check command tool provider [jar -c -f .\\test.3b95dd9a\\input\\hello.jar -C .\\test.3b95dd9a\\jar-workdir .](7) exited with 0 code
      [13:33:00.452] TRACE: Init fake runtime in [.\\test.3b95dd9a\\fake_runtime] directory
      [13:33:00.452] TRACE: Create [C:\\Projects\\jdk\\build\\windows-x86_64-server-release\\test-support\\jtreg_test_jdk_tools_jpackage_share_IconTest_java\\scratch\\0\\test.3b95dd9a\\no-icon.properties] properties file...
      [13:33:00.452] TRACE: icon=
      [13:33:00.452] TRACE: Done
      [13:33:00.452] TRACE: exec: Execute [c:\\projects\\jdk\\build\\windows-x86_64-server-release\\images\\jdk\\bin\\jpackage.exe --input .\\test.3b95dd9a\\input --dest .\\test.3b95dd9a\\out-70876 --name IconTest --type app-image --main-jar hello.jar --main-class Hello --win-console --runtime-image .\\test.3b95dd9a\\fake_runtime --add-launcher no-icon=.\\test.3b95dd9a\\no-icon.properties -J-Djlink.debug=true --verbose](20); inherit I/O...
      [13:33:00.838] Creating app package: IconTest in C:\\Projects\\jdk\\build\\windows-x86_64-server-release\\test-support\\jtreg_test_jdk_tools_jpackage_share_IconTest_java\\scratch\\0\\.\\test.3b95dd9a\\out-70876
      [13:33:00.861] Using default package resource JavaApp.ico [icon] (add IconTest.ico to the resource-dir to customize).
      [13:33:00.884] Using default package resource WinLauncher.template [Template for creating executable properties file] (add IconTest.properties to the resource-dir to customize).
      [13:33:00.955] Using default package resource WinLauncher.template [Template for creating executable properties file] (add no-icon.properties to the resource-dir to customize).
      [13:33:00.955] Succeeded in building Windows Application Image package
      [13:33:01.015] TRACE: exec: Done. Exit code: 0
      [13:33:01.015] TRACE: assertEquals(0): Check command [c:\\projects\\jdk\\build\\windows-x86_64-server-release\\images\\jdk\\bin\\jpackage.exe --input .\\test.3b95dd9a\\input --dest .\\test.3b95dd9a\\out-70876 --name IconTest --type app-image --main-jar hello.jar --main-class Hello --win-console --runtime-image .\\test.3b95dd9a\\fake_runtime --add-launcher no-icon=.\\test.3b95dd9a\\no-icon.properties -J-Djlink.debug=true --verbose](20) exited with 0 code
      [13:33:01.026] TRACE: assertFalse(): Check [.\\test.3b95dd9a\\out-70876\\IconTest\\no-icon.ico] path doesn't exist
      [13:33:01.026] TRACE: exec: Execute [powershell -NoLogo -NoProfile -Command "[System.Reflection.Assembly]::LoadWithPartialName('System.Drawing');[System.Drawing.Icon]::ExtractAssociatedIcon('C:\\Projects\\jdk\\build\\windows-x86_64-server-release\\test-support\\jtreg_test_jdk_tools_jpackage_share_IconTest_java\\scratch\\0\\test.3b95dd9a\\icons.0\\no-icon.exe\\container.exe').ToBitmap().Save('C:\\Projects\\jdk\\build\\windows-x86_64-server-release\\test-support\\jtreg_test_jdk_tools_jpackage_share_IconTest_java\\scratch\\0\\test.3b95dd9a\\icons.0\\no-icon.exe\\expected.bmp', [System.Drawing.Imaging.ImageFormat]::Bmp)"](5); discard I/O...
      [13:33:01.284] TRACE: exec: Done. Exit code: 0
      [13:33:01.284] TRACE: assertEquals(0): Check command [powershell -NoLogo -NoProfile -Command "[System.Reflection.Assembly]::LoadWithPartialName('System.Drawing');[System.Drawing.Icon]::ExtractAssociatedIcon('C:\\Projects\\jdk\\build\\windows-x86_64-server-release\\test-support\\jtreg_test_jdk_tools_jpackage_share_IconTest_java\\scratch\\0\\test.3b95dd9a\\icons.0\\no-icon.exe\\container.exe').ToBitmap().Save('C:\\Projects\\jdk\\build\\windows-x86_64-server-release\\test-support\\jtreg_test_jdk_tools_jpackage_share_IconTest_java\\scratch\\0\\test.3b95dd9a\\icons.0\\no-icon.exe\\expected.bmp', [System.Drawing.Imaging.ImageFormat]::Bmp)"](5) exited with 0 code
      [13:33:01.284] TRACE: exec: Execute [powershell -NoLogo -NoProfile -Command "[System.Reflection.Assembly]::LoadWithPartialName('System.Drawing');[System.Drawing.Icon]::ExtractAssociatedIcon('C:\\Projects\\jdk\\build\\windows-x86_64-server-release\\test-support\\jtreg_test_jdk_tools_jpackage_share_IconTest_java\\scratch\\0\\test.3b95dd9a\\out-70876\\IconTest\\no-icon.exe').ToBitmap().Save('C:\\Projects\\jdk\\build\\windows-x86_64-server-release\\test-support\\jtreg_test_jdk_tools_jpackage_share_IconTest_java\\scratch\\0\\test.3b95dd9a\\icons.0\\no-icon.exe\\actual.bmp', [System.Drawing.Imaging.ImageFormat]::Bmp)"](5); discard I/O...
      [13:33:01.541] TRACE: exec: Done. Exit code: 0
      [13:33:01.541] TRACE: assertEquals(0): Check command [powershell -NoLogo -NoProfile -Command "[System.Reflection.Assembly]::LoadWithPartialName('System.Drawing');[System.Drawing.Icon]::ExtractAssociatedIcon('C:\\Projects\\jdk\\build\\windows-x86_64-server-release\\test-support\\jtreg_test_jdk_tools_jpackage_share_IconTest_java\\scratch\\0\\test.3b95dd9a\\out-70876\\IconTest\\no-icon.exe').ToBitmap().Save('C:\\Projects\\jdk\\build\\windows-x86_64-server-release\\test-support\\jtreg_test_jdk_tools_jpackage_share_IconTest_java\\scratch\\0\\test.3b95dd9a\\icons.0\\no-icon.exe\\actual.bmp', [System.Drawing.Imaging.ImageFormat]::Bmp)"](5) exited with 0 code
      [13:33:01.541] ERROR: Failed: Check icon file [.\\test.3b95dd9a\\icons.0\\no-icon.exe\\actual.bmp] of no-icon launcher is a copy of source icon file [.\\test.3b95dd9a\\icons.0\\no-icon.exe\\expected.bmp]
      [13:33:01.541] [ FAILED ] IconTest(AppImage, CustomIcon, NoIcon).test; checks=11

      java.lang.AssertionError: Failed: Check icon file [.\\test.3b95dd9a\\icons.0\\no-icon.exe\\actual.bmp] of no-icon launcher is a copy of source icon file [.\\test.3b95dd9a\\icons.0\\no-icon.exe\\expected.bmp]
      at jdk.jpackage.test.TKit.error(TKit.java:277)
      at jdk.jpackage.test.TKit.assertTrue(TKit.java:657)
      at jdk.jpackage.test.TKit.assertTrue(TKit.java:644)
      at jdk.jpackage.test.LauncherIconVerifier$WinIconVerifier.lambda$verifyLauncherIcon$0(LauncherIconVerifier.java:102)
      at jdk.jpackage.test.Functional$ThrowingConsumer.lambda$toConsumer$0(Functional.java:41)
      at jdk.jpackage.test.TKit.withTempDirectory(TKit.java:345)
      at jdk.jpackage.test.LauncherIconVerifier$WinIconVerifier.verifyLauncherIcon(LauncherIconVerifier.java:87)
      at jdk.jpackage.test.LauncherIconVerifier.applyTo(LauncherIconVerifier.java:68)
      at jdk.jpackage.test.AdditionalLauncher.verifyIcon(AdditionalLauncher.java:286)
      at jdk.jpackage.test.AdditionalLauncher.verify(AdditionalLauncher.java:322)
      at jdk.jpackage.test.Functional$ThrowingConsumer.lambda$toConsumer$0(Functional.java:41)
      at jdk.jpackage.test.JPackageCommand$Actions$1.accept(JPackageCommand.java:1029)
      at jdk.jpackage.test.JPackageCommand$Actions$1.accept(JPackageCommand.java:1024)
      at jdk.jpackage.test.JPackageCommand$Actions.lambda$run$0(JPackageCommand.java:1039)
      at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
      at jdk.jpackage.test.JPackageCommand$Actions.run(JPackageCommand.java:1039)
      at jdk.jpackage.test.JPackageCommand.executeVerifyActions(JPackageCommand.java:715)
      at jdk.jpackage.test.JPackageCommand.execute(JPackageCommand.java:777)
      at jdk.jpackage.test.JPackageCommand.execute(JPackageCommand.java:737)
      at jdk.jpackage.test.LauncherIconVerifier$WinIconVerifier.getDefaultAppLauncher(LauncherIconVerifier.java:168)
      at jdk.jpackage.test.LauncherIconVerifier$WinIconVerifier.lambda$verifyLauncherIcon$0(LauncherIconVerifier.java:92)
      at jdk.jpackage.test.Functional$ThrowingConsumer.lambda$toConsumer$0(Functional.java:41)
      at jdk.jpackage.test.TKit.withTempDirectory(TKit.java:345)
      at jdk.jpackage.test.LauncherIconVerifier$WinIconVerifier.verifyLauncherIcon(LauncherIconVerifier.java:87)
      at jdk.jpackage.test.LauncherIconVerifier.applyTo(LauncherIconVerifier.java:68)
      at jdk.jpackage.test.AdditionalLauncher.verifyIcon(AdditionalLauncher.java:286)
      at jdk.jpackage.test.AdditionalLauncher.verify(AdditionalLauncher.java:322)
      at jdk.jpackage.test.Functional$ThrowingConsumer.lambda$toConsumer$0(Functional.java:41)
      at jdk.jpackage.test.JPackageCommand$Actions$1.accept(JPackageCommand.java:1029)
      at jdk.jpackage.test.JPackageCommand$Actions$1.accept(JPackageCommand.java:1024)
      at jdk.jpackage.test.JPackageCommand$Actions.lambda$run$0(JPackageCommand.java:1039)
      at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
      at jdk.jpackage.test.JPackageCommand$Actions.run(JPackageCommand.java:1039)
      at jdk.jpackage.test.JPackageCommand.executeVerifyActions(JPackageCommand.java:715)
      at jdk.jpackage.test.JPackageCommand.execute(JPackageCommand.java:777)
      at jdk.jpackage.test.JPackageCommand.execute(JPackageCommand.java:737)
      at jdk.jpackage.test.JPackageCommand.executeAndAssertImageCreated(JPackageCommand.java:790)
      at IconTest.test(IconTest.java:165)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at jdk.jpackage.test.MethodCall.accept(MethodCall.java:145)
      at jdk.jpackage.test.TestInstance.run(TestInstance.java:230)
      at jdk.jpackage.test.TKit.lambda$ignoreExceptions$5(TKit.java:141)
      at jdk.jpackage.test.TKit.lambda$runTests$3(TKit.java:126)
      at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
      at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
      at jdk.jpackage.test.TKit.lambda$runTests$4(TKit.java:123)
      at jdk.jpackage.test.Functional$ThrowingRunnable.lambda$toRunnable$0(Functional.java:105)
      at jdk.jpackage.test.TKit.withExtraLogStream(TKit.java:109)
      at jdk.jpackage.test.TKit.runTests(TKit.java:122)
      at jdk.jpackage.test.Main.runTests(Main.java:79)
      at jdk.jpackage.test.Main.lambda$main$2(Main.java:75)
      at jdk.jpackage.test.Functional$ThrowingRunnable.lambda$toRunnable$0(Functional.java:105)
      at jdk.jpackage.test.TKit.withExtraLogStream(TKit.java:109)
      at jdk.jpackage.test.Main.main(Main.java:75)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:1589)
      java.lang.RuntimeException: 1 FAILED TEST
      at jdk.jpackage.test.Main.reportSummary(Main.java:130)
      at jdk.jpackage.test.Main.runTests(Main.java:90)
      at jdk.jpackage.test.Main.lambda$main$2(Main.java:75)
      at jdk.jpackage.test.Functional$ThrowingRunnable.lambda$toRunnable$0(Functional.java:105)
      at jdk.jpackage.test.TKit.withExtraLogStream(TKit.java:109)
      at jdk.jpackage.test.Main.main(Main.java:75)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:1589)

      Attachments

        1. actual.bmp
          actual.bmp
          4 kB
        2. IconTest.jtr
          346 kB
        3. jpackage_bmp_diff1.png
          jpackage_bmp_diff1.png
          169 kB
        4. jpackage_bmp_diff2.png
          jpackage_bmp_diff2.png
          170 kB

        Issue Links

          Activity

            People

              asemenyuk Alexey Semenyuk
              aturbanov Andrey Turbanov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: