RFR: 8080272 Refactor I/O stream copying to use InputStream.transferTo/readAllBytes and Files.copy [v8]

Andrey Turbanov github.com+741251+turbanoff at openjdk.java.net
Fri Feb 12 22:15:43 UTC 2021


On Fri, 12 Feb 2021 21:53:13 GMT, Andrey Turbanov <github.com+741251+turbanoff at openjdk.org> wrote:

>> ## java/nio/file/Files/CopyAndMove.java    
>>     
>>     make test TEST="jtreg:java/nio/file/Files/CopyAndMove.java"
>>     
>>     STDOUT:
>>     Seed from RandomFactory = 704532001916725417L
>>     STDERR:
>>     dir1: f:\projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_java_nio_file_Files_CopyAndMove_java\tmp\name9678927043623070601 (NTFS)
>>     dir2: .\name1900089232270637553 (NTFS)
>>     java.lang.RuntimeException: AtomicMoveNotSupportedException expected
>>             at CopyAndMove.testMove(CopyAndMove.java:369)
>>             at CopyAndMove.main(CopyAndMove.java:74)
>>             at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>             at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
>>             at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>             at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>>             at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
>>             at java.base/java.lang.Thread.run(Thread.java:831)
>> 
>>     JavaTest Message: Test threw exception: java.lang.RuntimeException: AtomicMoveNotSupportedException expected
>>     JavaTest Message: shutting down test
>> 
>>     STATUS:Failed.`main' threw exception: java.lang.RuntimeException: AtomicMoveNotSupportedException expected
>> 
>> Checked in debugger:
>> 
>>     Files.getFileStore(dir1) = {WindowsFileStore at 1211} "ssd (f:)"
>>     Files.getFileStore(dir2) = {WindowsFileStore at 1213} "ssd (F:)"
>>     sameDevice = false
>> 
>> https://bugs.openjdk.java.net/browse/JDK-8219644 looks like there is already known bug this test.
>
> ## java/security/AccessController/DoPrivAccompliceTest.java
> 
>     make test TEST="jtreg:java/security/AccessController/DoPrivAccompliceTest.java"
> 
>     STDOUT:
>     Adding DoPrivAccomplice.class to F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\scratch\0.\DoPrivAccomplice.jar
> 
>     Created jar file F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\scratch\0.\DoPrivAccomplice.jar
>     Adding DoPrivTest.class to F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\scratch\0.\DoPrivTest.jar
> 
>     Created jar file F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\scratch\0.\DoPrivTest.jar
>     Created policy for F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\scratch\0.\DoPrivAccomplice.jar
>     Command line: [f:\projects\official_openjdk\build\windows-x86_64-server-release\images\jdk\bin\java.exe -cp F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\classes\0\java\security\AccessController\DoPrivAccompliceTest.d;F:\Projects\official_openjdk\test\jdk\java\security\AccessController;F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\classes\0\test\lib;F:\Projects\official_openjdk\test\lib;C:\Programs\jtreg-4.2.0-tip\jtreg\lib\javatest.jar;C:\Programs\jtreg-4.2.0-tip\jtreg\lib\jtreg.jar -Xmx512m -XX:MaxRAMPercentage=6 -Djava.io.tmpdir=f:\projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\tmp -ea -esa -Djava.security.manager -Djava.security.policy=F:\Projects\official_openjdk\build\w
 indows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\scratch\0.\java.policy -classpath F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\scratch\0.\DoPrivAccomplice.jar;F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\scratch\0.\DoPrivTest.jar DoPrivTest ]
>     [2021-02-12T21:42:29.297091800Z] Gathering output for process 12712
>     [2021-02-12T21:42:29.544092Z] Waiting for completion for process 12712
>     [2021-02-12T21:42:29.544092Z] Waiting for completion finished for process 12712
>     Output and diagnostic info for process 12712 was saved into 'pid-12712-output.log'
>     [2021-02-12T21:42:29.547092500Z] Waiting for completion for process 12712
>     [2021-02-12T21:42:29.547092500Z] Waiting for completion finished for process 12712
>     Created policy for F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\scratch\0.\DoPrivTest.jar
>     Command line: [f:\projects\official_openjdk\build\windows-x86_64-server-release\images\jdk\bin\java.exe -cp F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\classes\0\java\security\AccessController\DoPrivAccompliceTest.d;F:\Projects\official_openjdk\test\jdk\java\security\AccessController;F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\classes\0\test\lib;F:\Projects\official_openjdk\test\lib;C:\Programs\jtreg-4.2.0-tip\jtreg\lib\javatest.jar;C:\Programs\jtreg-4.2.0-tip\jtreg\lib\jtreg.jar -Xmx512m -XX:MaxRAMPercentage=6 -Djava.io.tmpdir=f:\projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\tmp -ea -esa -Djava.security.manager -Djava.security.policy=F:\Projects\official_openjdk\build\w
 indows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\scratch\0.\java.policy -classpath F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\scratch\0.\DoPrivAccomplice.jar;F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_java_security_AccessController_DoPrivAccompliceTest_java\scratch\0.\DoPrivTest.jar DoPrivTest ]
>     [2021-02-12T21:42:29.553092400Z] Gathering output for process 10560
>     [2021-02-12T21:42:29.783092500Z] Waiting for completion for process 10560
>     [2021-02-12T21:42:29.783092500Z] Waiting for completion finished for process 10560
>     Output and diagnostic info for process 10560 was saved into 'pid-10560-output.log'
>     [2021-02-12T21:42:29.785092800Z] Waiting for completion for process 10560
>     [2021-02-12T21:42:29.785092800Z] Waiting for completion finished for process 10560
>     [2021-02-12T21:42:29.785092800Z] Waiting for completion for process 10560
>     [2021-02-12T21:42:29.785092800Z] Waiting for completion finished for process 10560
>     STDERR:
>      stdout: [];
>      stderr: [Exception in thread "main" java.security.AccessControlException: access denied ("java.util.PropertyPermission" "user.name" "read")
>             at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
>             at java.base/java.security.AccessController.checkPermission(AccessController.java:1036)
>             at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:408)
>             at java.base/java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1152)
>             at java.base/java.lang.System.getProperty(System.java:833)
>             at DoPrivAccomplice.lambda$go$0(DoPrivAccomplice.java:31)
>             at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
>             at DoPrivAccomplice.go(DoPrivAccomplice.java:30)
>             at DoPrivTest.main(DoPrivTest.java:29)
>     ]
>      exitValue = 1
> 
>     java.lang.RuntimeException: 'user' found in stderr
> 
>             at jdk.test.lib.process.OutputAnalyzer.shouldNotContain(OutputAnalyzer.java:256)
>             at DoPrivAccompliceTest.main(DoPrivAccompliceTest.java:112)
>             at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>             at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
>             at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>             at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>             at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
>             at java.base/java.lang.Thread.run(Thread.java:831)
> 
>     JavaTest Message: Test threw exception: java.lang.RuntimeException: 'user' found in stderr
> 
>     JavaTest Message: shutting down test
> 
>     STATUS:Failed.`main' threw exception: java.lang.RuntimeException: 'user' found in stderr
>     
> Looks like test is not ready for username `user`, which I use locally.

## tools/jpackage/share/jdk/jpackage/tests/UnicodeArgsTest.java

    make test TEST="jtreg:tools/jpackage/share/jdk/jpackage/tests/UnicodeArgsTest.java"

    STDOUT:
    [00:56:54.598] Parsing [--jpt-run=jdk.jpackage.tests.UnicodeArgsTest]...
    [00:56:54.650] jdk.jpackage.tests.UnicodeArgsTest.test8246042 -> [public void jdk.jpackage.tests.UnicodeArgsTest.test8246042(boolean)]
    [00:56:54.682] Create: UnicodeArgsTest.test8246042(true)
    [00:56:54.684] Create: UnicodeArgsTest.test8246042(false)
    [00:56:54.688] [ RUN      ] UnicodeArgsTest.test8246042(false)
    [00:56:54.693] TRACE: Test string code points: [0x00e9]
    [00:56:54.875] TRACE: exec: Execute tool provider [javac -d .\test8246042.9782d070\jar-workdir F:\Projects\official_openjdk\test\jdk\tools\jpackage\apps\image\Hello.java](4)...
    [00:56:55.996] TRACE: exec: Done. Exit code: 0
    [00:56:55.997] TRACE: assertEquals(0): Check command tool provider [javac -d .\test8246042.9782d070\jar-workdir F:\Projects\official_openjdk\test\jdk\tools\jpackage\apps\image\Hello.java](4) exited with 0 code
    [00:56:56.014] TRACE: exec: Execute tool provider [jar -c -f .\test8246042.9782d070\input\hello.jar -C .\test8246042.9782d070\jar-workdir .](7)...
    [00:56:56.188] TRACE: exec: Done. Exit code: 0
    [00:56:56.188] TRACE: assertEquals(0): Check command tool provider [jar -c -f .\test8246042.9782d070\input\hello.jar -C .\test8246042.9782d070\jar-workdir .](7) exited with 0 code
    [00:56:56.196] TRACE: exec: Execute tool provider [jpackage --input .\test8246042.9782d070\input --dest .\test8246042.9782d070\output --name 8246042UnicodeArgsTest --type app-image --main-jar hello.jar --main-class Hello --win-console --arguments ? --verbose](17)...
    [00:56:56.225] Creating app package: 8246042UnicodeArgsTest in F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\scratch\0.\test8246042.9782d070\output
    [00:57:07.680] Command:
        jlink --output .\test8246042.9782d070\output\8246042UnicodeArgsTest\runtime --module-path f:\\projects\\official_openjdk\\build\\windows-x86_64-server-release\\images\\jdk\\jmods --add-modules jdk.management.jfr,java.rmi,jdk.jdi,jdk.charsets,java.xml,jdk.xml.dom,java.datatransfer,jdk.jstatd,jdk.httpserver,java.desktop,java.security.sasl,jdk.zipfs,java.base,jdk.crypto.ec,jdk.javadoc,jdk.management.agent,jdk.jshell,jdk.editpad,java.sql.rowset,jdk.jsobject,jdk.sctp,java.smartcardio,jdk.jlink,jdk.unsupported,java.security.jgss,java.compiler,jdk.nio.mapmode,jdk.dynalink,jdk.unsupported.desktop,jdk.accessibility,jdk.security.jgss,java.sql,jdk.incubator.vector,java.xml.crypto,java.logging,java.transaction.xa,jdk.jfr,jdk.crypto.cryptoki,jdk.net,java.naming,jdk.internal.ed,java.prefs,java.net.http,jdk.compiler,jdk.naming.rmi,jdk.internal.opt,jdk.jconsole,jdk.attach,jdk.crypto.mscapi,jdk.internal.le,java.management,jdk.jdwp.agent,jdk.internal.jvmstat,jdk.incubator.foreign,java.instrume
 nt,jdk.management,jdk.security.auth,java.scripting,jdk.jdeps,jdk.jartool,java.management.rmi,jdk.jpackage,jdk.naming.dns,jdk.localedata --strip-native-commands --strip-debug --no-man-pages --no-header-files
    [00:57:07.680] Output:
        WARNING: Using incubator modules: jdk.incubator.vector, jdk.incubator.foreign

    [00:57:07.681] Returned: 0

    [00:57:07.685] Using default package resource java48.ico [icon] (add 8246042UnicodeArgsTest.ico to the resource-dir to customize).
    [00:57:07.707] Warning: Windows Defender may prevent jpackage from functioning. If there is an issue, it can be addressed by either disabling realtime monitoring, or adding an exclusion for the directory "f:\projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\tmp\jdk.jpackage16485063537873697224".
    [00:57:07.712] Using default package resource WinLauncher.template [Template for creating executable properties file] (add 8246042UnicodeArgsTest.properties to the resource-dir to customize).
    [00:57:07.746] Succeeded in building Windows Application Image package
    [00:57:07.748] TRACE: exec: Done. Exit code: 0
    [00:57:07.748] TRACE: assertEquals(0): Check command tool provider [jpackage --input .\test8246042.9782d070\input --dest .\test8246042.9782d070\output --name 8246042UnicodeArgsTest --type app-image --main-jar hello.jar --main-class Hello --win-console --arguments ? --verbose](17) exited with 0 code
    [00:57:07.766] TRACE: assertStringListEquals(): Check there is only one file with [.jpackage.xml] name in the package
    [00:57:07.768] TRACE: assertStringListEquals(1, .\test8246042.9782d070\output\8246042UnicodeArgsTest\app.jpackage.xml)
    [00:57:07.769] TRACE: assertTrue(): Check [.\test8246042.9782d070\output\8246042UnicodeArgsTest\runtime] path exists
    [00:57:07.769] TRACE: assertTrue(): Check [.\test8246042.9782d070\output\8246042UnicodeArgsTest\runtime] is a directory
    [00:57:07.770] TRACE: assertTrue(): Check [.\test8246042.9782d070\output\8246042UnicodeArgsTest\8246042UnicodeArgsTest.exe] path exists
    [00:57:07.770] TRACE: assertTrue(): Check [.\test8246042.9782d070\output\8246042UnicodeArgsTest\8246042UnicodeArgsTest.exe] is a file
    [00:57:07.770] TRACE: assertTrue(): Check [.\test8246042.9782d070\output\8246042UnicodeArgsTest\8246042UnicodeArgsTest.exe] file is executable
    [00:57:07.771] TRACE: assertTrue(): Check [.\test8246042.9782d070\output\8246042UnicodeArgsTest\app\8246042UnicodeArgsTest.cfg] path exists
    [00:57:07.771] TRACE: assertTrue(): Check [.\test8246042.9782d070\output\8246042UnicodeArgsTest\app\8246042UnicodeArgsTest.cfg] is a file
    [00:57:07.780] TRACE: Clearing PATH in environment
    [00:57:07.780] TRACE: exec: Execute [F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\scratch\0.\test8246042.9782d070\output\8246042UnicodeArgsTest\8246042UnicodeArgsTest.exe](1); inherit I/O; in directory [.\test8246042.9782d070]...
    hello: Environment supports a display
    hello: Environment supports a desktop
    [0x0065]
    jpackage test application
    args.length: 1
    e
    hello: Output file: [appOutput.txt]
    [00:57:09.302] TRACE: exec: Done. Exit code: 0
    [00:57:09.302] TRACE: assertEquals(0): Check command [F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\scratch\0.\test8246042.9782d070\output\8246042UnicodeArgsTest\8246042UnicodeArgsTest.exe](1) exited with 0 code
    [00:57:09.303] TRACE: assertTrue(): Check [F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\scratch\0\test8246042.9782d070\appOutput.txt] path exists
    [00:57:09.303] TRACE: assertTrue(): Check [F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\scratch\0\test8246042.9782d070\appOutput.txt] is a file
    [00:57:09.305] TRACE: assertStringListEquals(): Check contents of [F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\scratch\0\test8246042.9782d070\appOutput.txt] file
    [00:57:09.305] TRACE: assertStringListEquals(1, jpackage test application)
    [00:57:09.306] TRACE: assertStringListEquals(2, args.length: 1)
    [00:57:09.307] ERROR: (3) Expected [?]. Actual [e]: Check contents of [F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\scratch\0\test8246042.9782d070\appOutput.txt] file
    [00:57:09.308] [  FAILED  ] UnicodeArgsTest.test8246042(false); checks=15
    [00:57:09.310] [ RUN      ] UnicodeArgsTest.test8246042(true)
    [00:57:09.312] TRACE: Test string code points: [0x00e9]
    [00:57:09.314] TRACE: exec: Execute tool provider [javac -d .\test8246042.b31bae11\jar-workdir F:\Projects\official_openjdk\test\jdk\tools\jpackage\apps\image\Hello.java](4)...
    [00:57:09.658] TRACE: exec: Done. Exit code: 0
    [00:57:09.659] TRACE: assertEquals(0): Check command tool provider [javac -d .\test8246042.b31bae11\jar-workdir F:\Projects\official_openjdk\test\jdk\tools\jpackage\apps\image\Hello.java](4) exited with 0 code
    [00:57:09.661] TRACE: exec: Execute tool provider [jar -c -f .\test8246042.b31bae11\input\hello.jar -C .\test8246042.b31bae11\jar-workdir .](7)...
    [00:57:09.667] TRACE: exec: Done. Exit code: 0
    [00:57:09.667] TRACE: assertEquals(0): Check command tool provider [jar -c -f .\test8246042.b31bae11\input\hello.jar -C .\test8246042.b31bae11\jar-workdir .](7) exited with 0 code
    [00:57:09.670] TRACE: exec: Execute tool provider [jpackage --input .\test8246042.b31bae11\input --dest .\test8246042.b31bae11\output --name 8246042UnicodeArgsTest --type app-image --main-jar hello.jar --main-class Hello --win-console --verbose](15)...
    [00:57:09.670]
    jpackage argument list:
    [--input, .\test8246042.b31bae11\input, --dest, .\test8246042.b31bae11\output, --name, 8246042UnicodeArgsTest, --type, app-image, --main-jar, hello.jar, --main-class, Hello, --win-console, --verbose]

    [00:57:09.679] Creating app package: 8246042UnicodeArgsTest in F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\scratch\0.\test8246042.b31bae11\output
    [00:57:18.770] Command:
        jlink --output .\test8246042.b31bae11\output\8246042UnicodeArgsTest\runtime --module-path f:\\projects\\official_openjdk\\build\\windows-x86_64-server-release\\images\\jdk\\jmods --add-modules jdk.management.jfr,java.rmi,jdk.jdi,jdk.charsets,jdk.xml.dom,java.xml,java.datatransfer,jdk.jstatd,jdk.httpserver,java.desktop,java.security.sasl,jdk.zipfs,java.base,jdk.crypto.ec,jdk.javadoc,jdk.management.agent,jdk.jshell,jdk.editpad,jdk.sctp,jdk.jsobject,java.sql.rowset,jdk.jlink,java.smartcardio,jdk.unsupported,java.security.jgss,java.compiler,jdk.nio.mapmode,jdk.dynalink,jdk.unsupported.desktop,jdk.accessibility,jdk.security.jgss,java.sql,jdk.incubator.vector,java.xml.crypto,java.logging,java.transaction.xa,jdk.jfr,jdk.crypto.cryptoki,jdk.net,java.naming,jdk.internal.ed,java.prefs,java.net.http,jdk.compiler,jdk.internal.opt,jdk.naming.rmi,jdk.jconsole,jdk.attach,jdk.crypto.mscapi,jdk.internal.le,java.management,jdk.jdwp.agent,jdk.incubator.foreign,jdk.internal.jvmstat,java.instrume
 nt,jdk.management,jdk.security.auth,java.scripting,jdk.jdeps,jdk.jartool,jdk.jpackage,java.management.rmi,jdk.naming.dns,jdk.localedata --strip-native-commands --strip-debug --no-man-pages --no-header-files
    [00:57:18.770] Output:
        WARNING: Using incubator modules: jdk.incubator.vector, jdk.incubator.foreign

    [00:57:18.770] Returned: 0

    [00:57:18.771] Using default package resource java48.ico [icon] (add 8246042UnicodeArgsTest.ico to the resource-dir to customize).
    [00:57:18.778] Warning: Windows Defender may prevent jpackage from functioning. If there is an issue, it can be addressed by either disabling realtime monitoring, or adding an exclusion for the directory "f:\projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\tmp\jdk.jpackage8738450931736312275".
    [00:57:18.779] Using default package resource WinLauncher.template [Template for creating executable properties file] (add 8246042UnicodeArgsTest.properties to the resource-dir to customize).
    [00:57:18.787] Succeeded in building Windows Application Image package
    [00:57:18.788] TRACE: exec: Done. Exit code: 0
    [00:57:18.789] TRACE: assertEquals(0): Check command tool provider [jpackage --input .\test8246042.b31bae11\input --dest .\test8246042.b31bae11\output --name 8246042UnicodeArgsTest --type app-image --main-jar hello.jar --main-class Hello --win-console --verbose](15) exited with 0 code
    [00:57:18.804] TRACE: assertStringListEquals(): Check there is only one file with [.jpackage.xml] name in the package
    [00:57:18.804] TRACE: assertStringListEquals(1, .\test8246042.b31bae11\output\8246042UnicodeArgsTest\app.jpackage.xml)
    [00:57:18.805] TRACE: assertTrue(): Check [.\test8246042.b31bae11\output\8246042UnicodeArgsTest\runtime] path exists
    [00:57:18.805] TRACE: assertTrue(): Check [.\test8246042.b31bae11\output\8246042UnicodeArgsTest\runtime] is a directory
    [00:57:18.806] TRACE: assertTrue(): Check [.\test8246042.b31bae11\output\8246042UnicodeArgsTest\8246042UnicodeArgsTest.exe] path exists
    [00:57:18.806] TRACE: assertTrue(): Check [.\test8246042.b31bae11\output\8246042UnicodeArgsTest\8246042UnicodeArgsTest.exe] is a file
    [00:57:18.806] TRACE: assertTrue(): Check [.\test8246042.b31bae11\output\8246042UnicodeArgsTest\8246042UnicodeArgsTest.exe] file is executable
    [00:57:18.807] TRACE: assertTrue(): Check [.\test8246042.b31bae11\output\8246042UnicodeArgsTest\app\8246042UnicodeArgsTest.cfg] path exists
    [00:57:18.807] TRACE: assertTrue(): Check [.\test8246042.b31bae11\output\8246042UnicodeArgsTest\app\8246042UnicodeArgsTest.cfg] is a file
    [00:57:18.808] TRACE: Clearing PATH in environment
    [00:57:18.808] TRACE: exec: Execute [F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\scratch\0.\test8246042.b31bae11\output\8246042UnicodeArgsTest\8246042UnicodeArgsTest.exe ?](2); inherit I/O; in directory [.\test8246042.b31bae11]...
    hello: Environment supports a display
    hello: Environment supports a desktop
    [0x0065]
    jpackage test application
    args.length: 1
    e
    hello: Output file: [appOutput.txt]
    [00:57:20.327] TRACE: exec: Done. Exit code: 0
    [00:57:20.328] TRACE: assertEquals(0): Check command [F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\scratch\0.\test8246042.b31bae11\output\8246042UnicodeArgsTest\8246042UnicodeArgsTest.exe ?](2) exited with 0 code
    [00:57:20.328] TRACE: assertTrue(): Check [F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\scratch\0\test8246042.b31bae11\appOutput.txt] path exists
    [00:57:20.329] TRACE: assertTrue(): Check [F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\scratch\0\test8246042.b31bae11\appOutput.txt] is a file
    [00:57:20.330] TRACE: assertStringListEquals(): Check contents of [F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\scratch\0\test8246042.b31bae11\appOutput.txt] file
    [00:57:20.330] TRACE: assertStringListEquals(1, jpackage test application)
    [00:57:20.330] TRACE: assertStringListEquals(2, args.length: 1)
    [00:57:20.330] ERROR: (3) Expected [?]. Actual [e]: Check contents of [F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\scratch\0\test8246042.b31bae11\appOutput.txt] file
    [00:57:20.331] [  FAILED  ] UnicodeArgsTest.test8246042(true); checks=15
    [00:57:20.332] [==========] 2 tests ran
    [00:57:20.333] [  PASSED  ] 0 tests
    [00:57:20.334] [  FAILED  ] 2 tests, listed below
    [00:57:20.335] [  FAILED  ] UnicodeArgsTest.test8246042(false); workDir=[.\test8246042.9782d070]
    [00:57:20.335] [  FAILED  ] UnicodeArgsTest.test8246042(true); workDir=[.\test8246042.b31bae11]
    [00:57:20.336] 2 FAILED TESTS
    STDERR:
    java.lang.AssertionError: (3) Expected [?]. Actual [e]: Check contents of [F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\scratch\0\test8246042.9782d070\appOutput.txt] file
            at jdk.jpackage.test.TKit.error(TKit.java:293)
            at jdk.jpackage.test.TKit.lambda$assertStringListEquals$20(TKit.java:765)
            at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
            at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
            at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
            at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
            at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
            at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
            at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
            at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
            at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
            at jdk.jpackage.test.TKit.assertStringListEquals(TKit.java:759)
            at jdk.jpackage.test.HelloApp.verifyOutputFile(HelloApp.java:225)
            at jdk.jpackage.test.HelloApp.verifyOutputFile(HelloApp.java:204)
            at jdk.jpackage.test.HelloApp$AppOutputVerifier.executeAndVerifyOutput(HelloApp.java:405)
            at jdk.jpackage.test.HelloApp$AppOutputVerifier.executeAndVerifyOutput(HelloApp.java:417)
            at jdk.jpackage.test.HelloApp.executeLauncherAndVerifyOutput(HelloApp.java:319)
            at jdk.jpackage.tests.UnicodeArgsTest.test8246042(UnicodeArgsTest.java:67)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:566)
            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$6(TKit.java:155)
            at jdk.jpackage.test.TKit.lambda$runTests$4(TKit.java:140)
            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$5(TKit.java:137)
            at jdk.jpackage.test.Functional$ThrowingRunnable.lambda$toRunnable$0(Functional.java:105)
            at jdk.jpackage.test.TKit.withExtraLogStream(TKit.java:123)
            at jdk.jpackage.test.TKit.runTests(TKit.java:136)
            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:123)
            at jdk.jpackage.test.Main.main(Main.java:75)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:566)
            at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
            at java.base/java.lang.Thread.run(Thread.java:831)
    java.lang.AssertionError: (3) Expected [?]. Actual [e]: Check contents of [F:\Projects\official_openjdk\build\windows-x86_64-server-release\test-support\jtreg_test_jdk_tools_jpackage_share_jdk_jpackage_tests_UnicodeArgsTest_java\scratch\0\test8246042.b31bae11\appOutput.txt] file
            at jdk.jpackage.test.TKit.error(TKit.java:293)
            at jdk.jpackage.test.TKit.lambda$assertStringListEquals$20(TKit.java:765)
            at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
            at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
            at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
            at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
            at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
            at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
            at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
            at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
            at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
            at jdk.jpackage.test.TKit.assertStringListEquals(TKit.java:759)
            at jdk.jpackage.test.HelloApp.verifyOutputFile(HelloApp.java:225)
            at jdk.jpackage.test.HelloApp.verifyOutputFile(HelloApp.java:204)
            at jdk.jpackage.test.HelloApp$AppOutputVerifier.executeAndVerifyOutput(HelloApp.java:405)
            at jdk.jpackage.test.HelloApp$AppOutputVerifier.executeAndVerifyOutput(HelloApp.java:417)
            at jdk.jpackage.test.HelloApp.executeLauncherAndVerifyOutput(HelloApp.java:319)
            at jdk.jpackage.tests.UnicodeArgsTest.test8246042(UnicodeArgsTest.java:65)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:566)
            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$6(TKit.java:155)
            at jdk.jpackage.test.TKit.lambda$runTests$4(TKit.java:140)
            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$5(TKit.java:137)
            at jdk.jpackage.test.Functional$ThrowingRunnable.lambda$toRunnable$0(Functional.java:105)
            at jdk.jpackage.test.TKit.withExtraLogStream(TKit.java:123)
            at jdk.jpackage.test.TKit.runTests(TKit.java:136)
            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:123)
            at jdk.jpackage.test.Main.main(Main.java:75)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:566)
            at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
            at java.base/java.lang.Thread.run(Thread.java:831)
    jdk.jpackage.test.Functional$ExceptionBox: java.lang.RuntimeException: 2 FAILED TESTS
            at jdk.jpackage.test.Functional.rethrowUnchecked(Functional.java:161)
            at jdk.jpackage.test.Functional$ThrowingRunnable.lambda$toRunnable$0(Functional.java:107)
            at jdk.jpackage.test.TKit.withExtraLogStream(TKit.java:123)
            at jdk.jpackage.test.Main.main(Main.java:75)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:566)
            at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
            at java.base/java.lang.Thread.run(Thread.java:831)
    Caused by: java.lang.RuntimeException: 2 FAILED TESTS
            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)
            ... 8 more

    JavaTest Message: Test threw exception: jdk.jpackage.test.Functional$ExceptionBox: java.lang.RuntimeException: 2 FAILED TESTS
    JavaTest Message: shutting down test

    STATUS:Failed.`main' threw exception: jdk.jpackage.test.Functional$ExceptionBox: java.lang.RuntimeException: 2 FAILED TESTS

Oh. This one is tricky. Will investigate later.

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

PR: https://git.openjdk.java.net/jdk/pull/1853


More information about the security-dev mailing list