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

SourceLauncherTest fails on exploded image

    Details

    • Subcomponent:
    • Resolved In Build:
      b27

      Backports

        Description

        All javac tests succeed under 'make exploded-test', with the exception of SourceLauncherTest. Would be nice to get it working too, if possible.

        Here's my log for a successful and unsuccessful run:

        $ -> make test TEST="langtools/tools/javac/launcher/SourceLauncherTest.java"
        Building target 'test' in configuration 'macosx-x86_64-server-release'
        Skip building of Graal unit tests because 3rd party libraries directory is not specified
        Skip building of Graal unit tests because 3rd party libraries directory is not specified
        Test selection 'langtools/tools/javac/launcher/SourceLauncherTest.java', will run:
        * jtreg:test/langtools/tools/javac/launcher/SourceLauncherTest.java

        Running test 'jtreg:test/langtools/tools/javac/launcher/SourceLauncherTest.java'
        Passed: tools/javac/launcher/SourceLauncherTest.java
        Test results: passed: 1
        Report written to /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-results/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/html/report.html
        Results written to /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java
        Finished running test 'jtreg:test/langtools/tools/javac/launcher/SourceLauncherTest.java'
        Test report is stored in build/macosx-x86_64-server-release/test-results/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java

        ==============================
        Test summary
        ==============================
           TEST TOTAL PASS FAIL ERROR
           jtreg:test/langtools/tools/javac/launcher/SourceLauncherTest.java
                                                                 1 1 0 0
        ==============================
        TEST SUCCESS

        Finished building target 'test' in configuration 'macosx-x86_64-server-release'

        $ -> make exploded-test TEST="langtools/tools/javac/launcher/SourceLauncherTest.java"
        Building target 'exploded-test' in configuration 'macosx-x86_64-server-release'
        Skip building of Graal unit tests because 3rd party libraries directory is not specified
        Skip building of Graal unit tests because 3rd party libraries directory is not specified
        Test selection 'langtools/tools/javac/launcher/SourceLauncherTest.java', will run:
        * jtreg:test/langtools/tools/javac/launcher/SourceLauncherTest.java

        Running test 'jtreg:test/langtools/tools/javac/launcher/SourceLauncherTest.java'
        --------------------------------------------------
        TEST: tools/javac/launcher/SourceLauncherTest.java
        TEST JDK: /Users/dan/Dev/jdk/jdk/build/macosx-x86_64-server-release/jdk

        ACTION: build -- Passed. Build successful
        REASON: User specified action: run build toolbox.JavaTask toolbox.JavacTask toolbox.TestRunner toolbox.ToolBox
        TIME: 52.039 seconds
        messages:
        command: build toolbox.JavaTask toolbox.JavacTask toolbox.TestRunner toolbox.ToolBox
        reason: User specified action: run build toolbox.JavaTask toolbox.JavacTask toolbox.TestRunner toolbox.ToolBox
        Library /tools/lib:
          compile: toolbox.JavaTask, toolbox.JavacTask, toolbox.TestRunner, toolbox.ToolBox
        elapsed time (seconds): 52.039

        ACTION: compile -- Passed. Compilation successful
        REASON: .class file out of date or does not exist
        TIME: 52.032 seconds
        messages:
        command: compile /Users/dan/Dev/jdk/jdk/test/langtools/tools/lib/toolbox/JavaTask.java /Users/dan/Dev/jdk/jdk/test/langtools/tools/lib/toolbox/JavacTask.java /Users/dan/Dev/jdk/jdk/test/langtools/tools/lib/toolbox/TestRunner.java /Users/dan/Dev/jdk/jdk/test/langtools/tools/lib/toolbox/ToolBox.java
        reason: .class file out of date or does not exist
        Additional options from @modules: --add-modules jdk.compiler --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.launcher=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
        Mode: agentvm
        Agent id: 0
        elapsed time (seconds): 52.032
        configuration:
        Boot Layer (javac runtime environment)
          class path: /Users/dan/Dev/jdk/tools/jtreg-4.2-b13/lib/javatest.jar
                      /Users/dan/Dev/jdk/tools/jtreg-4.2-b13/lib/jtreg.jar
          patch: java.base /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/patches/java.base

        javac compilation environment
          add modules: jdk.compiler
          add exports: jdk.compiler/com.sun.tools.javac.api ALL-UNNAMED
                       jdk.compiler/com.sun.tools.javac.launcher ALL-UNNAMED
                       jdk.compiler/com.sun.tools.javac.main ALL-UNNAMED
          source path: /Users/dan/Dev/jdk/jdk/test/langtools/tools/lib
          class path: /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/lib

        rerun:
        cd /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/scratch/0 && \
        HOME=/Users/dan \
        JDK8_HOME=/Users/dan/bin/jdk/jdk-11.0.1.jdk/Contents/Home \
        LANG=en_US.UTF-8 \
        PATH=/bin:/usr/bin \
        TEST_IMAGE_GRAAL_DIR=/Users/dan/Dev/jdk/jdk/build/macosx-x86_64-server-release/images/test/hotspot/jtreg/graal \
            /Users/dan/Dev/jdk/jdk/build/macosx-x86_64-server-release/jdk/bin/javac \
                -J-Xmx768m \
                -J-XX:MaxRAMPercentage=12 \
                -J-ea \
                -J-esa \
                -J-Dtest.class.path.prefix=/Users/dan/Dev/jdk/jdk/test/langtools/tools/javac/launcher:/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/lib \
                -J-Dtest.src=/Users/dan/Dev/jdk/jdk/test/langtools/tools/javac/launcher \
                -J-Dtest.src.path=/Users/dan/Dev/jdk/jdk/test/langtools/tools/javac/launcher:/Users/dan/Dev/jdk/jdk/test/langtools/tools/lib \
                -J-Dtest.classes=/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/javac/launcher/SourceLauncherTest.d \
                -J-Dtest.class.path=/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/javac/launcher/SourceLauncherTest.d:/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/lib \
                -J-Dtest.vm.opts='-Xmx768m -XX:MaxRAMPercentage=12 -ea -esa' \
                -J-Dtest.tool.vm.opts='-J-Xmx768m -J-XX:MaxRAMPercentage=12 -J-ea -J-esa' \
                -J-Dtest.compiler.opts= \
                -J-Dtest.java.opts= \
                -J-Dtest.jdk=/Users/dan/Dev/jdk/jdk/build/macosx-x86_64-server-release/jdk \
                -J-Dcompile.jdk=/Users/dan/Dev/jdk/jdk/build/macosx-x86_64-server-release/jdk \
                -J-Dtest.timeout.factor=4.0 \
                -J-Dtest.modules='jdk.compiler/com.sun.tools.javac.api jdk.compiler/com.sun.tools.javac.launcher jdk.compiler/com.sun.tools.javac.main' \
                --add-modules jdk.compiler \
                --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
                --add-exports jdk.compiler/com.sun.tools.javac.launcher=ALL-UNNAMED \
                --add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
                -d /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/lib \
                -sourcepath /Users/dan/Dev/jdk/jdk/test/langtools/tools/lib \
                -classpath /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/lib /Users/dan/Dev/jdk/jdk/test/langtools/tools/lib/toolbox/JavaTask.java /Users/dan/Dev/jdk/jdk/test/langtools/tools/lib/toolbox/JavacTask.java /Users/dan/Dev/jdk/jdk/test/langtools/tools/lib/toolbox/TestRunner.java /Users/dan/Dev/jdk/jdk/test/langtools/tools/lib/toolbox/ToolBox.java
        direct:
        Note: Some input files use unchecked or unsafe operations.
        Note: Recompile with -Xlint:unchecked for details.

        ACTION: build -- Passed. Build successful
        REASON: Named class compiled on demand
        TIME: 0.765 seconds
        messages:
        command: build SourceLauncherTest
        reason: Named class compiled on demand
        Test directory:
          compile: SourceLauncherTest
        elapsed time (seconds): 0.765

        ACTION: compile -- Passed. Compilation successful
        REASON: .class file out of date or does not exist
        TIME: 0.763 seconds
        messages:
        command: compile /Users/dan/Dev/jdk/jdk/test/langtools/tools/javac/launcher/SourceLauncherTest.java
        reason: .class file out of date or does not exist
        Additional options from @modules: --add-modules jdk.compiler --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.launcher=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
        Mode: agentvm
        Agent id: 0
        elapsed time (seconds): 0.763
        configuration:
        Boot Layer (javac runtime environment)
          class path: /Users/dan/Dev/jdk/tools/jtreg-4.2-b13/lib/javatest.jar
                      /Users/dan/Dev/jdk/tools/jtreg-4.2-b13/lib/jtreg.jar
          patch: java.base /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/patches/java.base

        javac compilation environment
          add modules: jdk.compiler
          add exports: jdk.compiler/com.sun.tools.javac.api ALL-UNNAMED
                       jdk.compiler/com.sun.tools.javac.launcher ALL-UNNAMED
                       jdk.compiler/com.sun.tools.javac.main ALL-UNNAMED
          source path: /Users/dan/Dev/jdk/jdk/test/langtools/tools/javac/launcher
                       /Users/dan/Dev/jdk/jdk/test/langtools/tools/lib
          class path: /Users/dan/Dev/jdk/jdk/test/langtools/tools/javac/launcher
                       /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/javac/launcher/SourceLauncherTest.d
                       /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/lib

        rerun:
        cd /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/scratch/0 && \
        HOME=/Users/dan \
        JDK8_HOME=/Users/dan/bin/jdk/jdk-11.0.1.jdk/Contents/Home \
        LANG=en_US.UTF-8 \
        PATH=/bin:/usr/bin \
        TEST_IMAGE_GRAAL_DIR=/Users/dan/Dev/jdk/jdk/build/macosx-x86_64-server-release/images/test/hotspot/jtreg/graal \
            /Users/dan/Dev/jdk/jdk/build/macosx-x86_64-server-release/jdk/bin/javac \
                -J-Xmx768m \
                -J-XX:MaxRAMPercentage=12 \
                -J-ea \
                -J-esa \
                -J-Dtest.class.path.prefix=/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/javac/launcher/SourceLauncherTest.d:/Users/dan/Dev/jdk/jdk/test/langtools/tools/javac/launcher:/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/lib \
                -J-Dtest.src=/Users/dan/Dev/jdk/jdk/test/langtools/tools/javac/launcher \
                -J-Dtest.src.path=/Users/dan/Dev/jdk/jdk/test/langtools/tools/javac/launcher:/Users/dan/Dev/jdk/jdk/test/langtools/tools/lib \
                -J-Dtest.classes=/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/javac/launcher/SourceLauncherTest.d \
                -J-Dtest.class.path=/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/javac/launcher/SourceLauncherTest.d:/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/lib \
                -J-Dtest.vm.opts='-Xmx768m -XX:MaxRAMPercentage=12 -ea -esa' \
                -J-Dtest.tool.vm.opts='-J-Xmx768m -J-XX:MaxRAMPercentage=12 -J-ea -J-esa' \
                -J-Dtest.compiler.opts= \
                -J-Dtest.java.opts= \
                -J-Dtest.jdk=/Users/dan/Dev/jdk/jdk/build/macosx-x86_64-server-release/jdk \
                -J-Dcompile.jdk=/Users/dan/Dev/jdk/jdk/build/macosx-x86_64-server-release/jdk \
                -J-Dtest.timeout.factor=4.0 \
                -J-Dtest.modules='jdk.compiler/com.sun.tools.javac.api jdk.compiler/com.sun.tools.javac.launcher jdk.compiler/com.sun.tools.javac.main' \
                --add-modules jdk.compiler \
                --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
                --add-exports jdk.compiler/com.sun.tools.javac.launcher=ALL-UNNAMED \
                --add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
                -d /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/javac/launcher/SourceLauncherTest.d \
                -sourcepath /Users/dan/Dev/jdk/jdk/test/langtools/tools/javac/launcher:/Users/dan/Dev/jdk/jdk/test/langtools/tools/lib \
                -classpath /Users/dan/Dev/jdk/jdk/test/langtools/tools/javac/launcher:/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/javac/launcher/SourceLauncherTest.d:/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/lib /Users/dan/Dev/jdk/jdk/test/langtools/tools/javac/launcher/SourceLauncherTest.java

        ACTION: main -- Failed. Execution failed: `main' threw exception: java.lang.Exception: 1 errors found
        REASON: User specified action: run main SourceLauncherTest
        TIME: 68.449 seconds
        messages:
        command: main SourceLauncherTest
        reason: User specified action: run main SourceLauncherTest
        Mode: agentvm
        Agent id: 0
        Additional exports to unnamed modules from @modules: jdk.compiler/com.sun.tools.javac.api jdk.compiler/com.sun.tools.javac.launcher jdk.compiler/com.sun.tools.javac.main
        elapsed time (seconds): 68.449
        configuration:
        Boot Layer
          class path: /Users/dan/Dev/jdk/tools/jtreg-4.2-b13/lib/javatest.jar
                      /Users/dan/Dev/jdk/tools/jtreg-4.2-b13/lib/jtreg.jar
          patch: java.base /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/patches/java.base

        Test Layer
          add exports: jdk.compiler/com.sun.tools.javac.api ALL-UNNAMED
                       jdk.compiler/com.sun.tools.javac.launcher ALL-UNNAMED
                       jdk.compiler/com.sun.tools.javac.main ALL-UNNAMED
          class path: /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/javac/launcher/SourceLauncherTest.d
                       /Users/dan/Dev/jdk/jdk/test/langtools/tools/javac/launcher
                       /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/lib
                       /Users/dan/Dev/jdk/jdk/test/langtools/tools/lib

        rerun:
        cd /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/scratch/0 && \
        HOME=/Users/dan \
        JDK8_HOME=/Users/dan/bin/jdk/jdk-11.0.1.jdk/Contents/Home \
        LANG=en_US.UTF-8 \
        PATH=/bin:/usr/bin \
        TEST_IMAGE_GRAAL_DIR=/Users/dan/Dev/jdk/jdk/build/macosx-x86_64-server-release/images/test/hotspot/jtreg/graal \
            /Users/dan/Dev/jdk/jdk/build/macosx-x86_64-server-release/jdk/bin/java \
                -Dtest.class.path.prefix=/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/javac/launcher/SourceLauncherTest.d:/Users/dan/Dev/jdk/jdk/test/langtools/tools/javac/launcher:/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/lib \
                -Dtest.src=/Users/dan/Dev/jdk/jdk/test/langtools/tools/javac/launcher \
                -Dtest.src.path=/Users/dan/Dev/jdk/jdk/test/langtools/tools/javac/launcher:/Users/dan/Dev/jdk/jdk/test/langtools/tools/lib \
                -Dtest.classes=/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/javac/launcher/SourceLauncherTest.d \
                -Dtest.class.path=/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/javac/launcher/SourceLauncherTest.d:/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/lib \
                -Dtest.vm.opts='-Xmx768m -XX:MaxRAMPercentage=12 -ea -esa' \
                -Dtest.tool.vm.opts='-J-Xmx768m -J-XX:MaxRAMPercentage=12 -J-ea -J-esa' \
                -Dtest.compiler.opts= \
                -Dtest.java.opts= \
                -Dtest.jdk=/Users/dan/Dev/jdk/jdk/build/macosx-x86_64-server-release/jdk \
                -Dcompile.jdk=/Users/dan/Dev/jdk/jdk/build/macosx-x86_64-server-release/jdk \
                -Dtest.timeout.factor=4.0 \
                -Dtest.modules='jdk.compiler/com.sun.tools.javac.api jdk.compiler/com.sun.tools.javac.launcher jdk.compiler/com.sun.tools.javac.main' \
                -classpath /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/javac/launcher/SourceLauncherTest.d:/Users/dan/Dev/jdk/jdk/test/langtools/tools/javac/launcher:/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/classes/0/tools/lib:/Users/dan/Dev/jdk/jdk/test/langtools/tools/lib:/Users/dan/Dev/jdk/tools/jtreg-4.2-b13/lib/javatest.jar:/Users/dan/Dev/jdk/tools/jtreg-4.2-b13/lib/jtreg.jar \
                SourceLauncherTest
        STDERR:
        version: 12
        test: testHelloWorld
        stdout: Hello World! [1, 2, 3]

        stderr:
        exception: null

        test: testHelloWorldInPackage
        stdout: Hello World! [1, 2, 3]

        stderr:
        exception: null

        test: testHelloWorldWithAux
        stdout: Hello World! [1, 2, 3]

        stderr:
        exception: null

        test: testHelloWorldWithShebang
        stdout: Hello World! [1, 2, 3]

        stderr:
        exception: null

        test: testNoAnnoProcessing
        stdout: Hello World! [1, 2, 3]

        stderr:
        exception: null

        test: testEnablePreview
        stdout: Hello World! [1, 2, 3]

        test: testCodeSource
        stdout: file:/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/scratch/0/testCodeSource/ShowCodeSource.java

        test: testPermissions
        [STDERR]:
        Exception in thread "main" java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.jdk.internal.misc")
        at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
        at java.base/java.security.AccessController.checkPermission(AccessController.java:1027)
        at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:408)
        at java.base/java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1324)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:174)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        at jdk.compiler/com.sun.tools.javac.launcher.Main.main(Main.java:132)
        Exception running test testPermissions: toolbox.Task$TaskError: Task java failed: rc=1
        toolbox.Task$TaskError: Task java failed: rc=1
        at toolbox.AbstractTask.checkExit(AbstractTask.java:112)
        at toolbox.AbstractTask.runProcess(AbstractTask.java:198)
        at toolbox.JavaTask.run(JavaTask.java:159)
        at toolbox.AbstractTask.run(AbstractTask.java:71)
        at toolbox.JavaTask.run(JavaTask.java:34)
        at SourceLauncherTest.testPermissions(SourceLauncherTest.java:245)
        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:567)
        at toolbox.TestRunner.runTests(TestRunner.java:89)
        at SourceLauncherTest.main(SourceLauncherTest.java:64)
        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:567)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:246)
        at java.base/java.lang.Thread.run(Thread.java:835)

        test: testHelloWorldWithShebangJava
        stdout:
        stderr: testHelloWorldWithShebangJava/HelloWorld.java:1: error: illegal character: '#'
        #!/usr/bin/java --source 12
        ^
        testHelloWorldWithShebangJava/HelloWorld.java:1: error: class, interface, or enum expected
        #!/usr/bin/java --source 12
          ^
        2 errors

        exception: com.sun.tools.javac.launcher.Main$Fault: error: compilation failed

        test: testNoClass
        stdout:
        stderr:
        exception: com.sun.tools.javac.launcher.Main$Fault: error: no class declared in source file

        test: testLoadClass
        stdout: on classpath
        stdout: in source file

        test: testGetResource
        stdout: sourcelauncher-memoryclassloader1357563986:GetResource.class

        test: testGetResources
        stdout:0: sourcelauncher-memoryclassloader369049246:GetResources.class
        stdout:1: file:/Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/scratch/0/testGetResources/classes/GetResources.class

        test: testSyntaxErr
        stdout:
        stderr: testSyntaxErr/SyntaxErr.java:1: error: reached end of file while parsing
        class SyntaxErr {
                         ^
        1 error

        exception: com.sun.tools.javac.launcher.Main$Fault: error: compilation failed

        test: testNoSourceOnClassPath
        stdout:
        stderr: testNoSourceOnClassPath/mainSrc/HelloWorld.java:4: error: cannot find symbol
                System.out.println(Aux.MESSAGE + Arrays.toString(args));
                                   ^
          symbol: variable Aux
          location: class HelloWorld
        1 error

        exception: com.sun.tools.javac.launcher.Main$Fault: error: compilation failed

        test: testClassNotFound
        stdout: Expected exception thrown: java.lang.ClassNotFoundException: NoSuchClass

        test: testBadShebang
        stdout:
        stderr: testBadShebang/HelloWorld.java:1: error: illegal character: '#'
        #/usr/bin/java --source 12
        ^
        testBadShebang/HelloWorld.java:1: error: class, interface, or enum expected
        #/usr/bin/java --source 12
          ^
        2 errors

        exception: com.sun.tools.javac.launcher.Main$Fault: error: compilation failed

        test: testBadSourceOpt
        stdout:
        stderr:
        exception: com.sun.tools.javac.launcher.Main$Fault: error: invalid value for --source option: <BAD>

        test: testEnablePreviewNoSource
        stderr: error: --enable-preview must be used with --source

        test: testNoMain
        stdout:
        stderr:
        exception: com.sun.tools.javac.launcher.Main$Fault: error: can't find main(String[]) method in class: NoMain

        test: testMainBadParams
        stdout:
        stderr:
        exception: com.sun.tools.javac.launcher.Main$Fault: error: can't find main(String[]) method in class: BadParams

        test: testMainNotPublic
        stdout:
        stderr:
        exception: com.sun.tools.javac.launcher.Main$Fault: error: 'main' method is not declared 'public static'

        test: testMainNotStatic
        stdout:
        stderr:
        exception: com.sun.tools.javac.launcher.Main$Fault: error: 'main' method is not declared 'public static'

        test: testMainNotVoid
        stdout:
        stderr:
        exception: com.sun.tools.javac.launcher.Main$Fault: error: 'main' method is not declared with a return type of 'void'

        test: testClassInModule
        stdout:
        stderr: testClassInModule/java/net/InModule.java:1: error: package exists in another module: java.base
        package java.net; class InModule { }
        ^
        1 error

        exception: com.sun.tools.javac.launcher.Main$Fault: error: compilation failed

        test: testTargetException1
        stdout:
        stderr:
        exception:
        java.lang.Error: zero!
        at Thrower.throwWhenZero(Thrower.java:7)
        at Thrower.throwWhenZero(Thrower.java:8)
        at Thrower.throwWhenZero(Thrower.java:8)
        at Thrower.throwWhenZero(Thrower.java:8)
        at Thrower.main(Thrower.java:4)


        26 tests, 1 errors
        java.lang.Exception: 1 errors found
        at toolbox.TestRunner.runTests(TestRunner.java:116)
        at SourceLauncherTest.main(SourceLauncherTest.java:64)
        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:567)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:246)
        at java.base/java.lang.Thread.run(Thread.java:835)

        JavaTest Message: Test threw exception: java.lang.Exception
        JavaTest Message: shutting down test


        TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.Exception: 1 errors found
        --------------------------------------------------
        Test results: failed: 1
        Report written to /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-results/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java/html/report.html
        Results written to /Users/dan/Dev/jdk/builds/jdk-build/macosx-x86_64-server-release/test-support/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java
        Error: Some tests failed or other problems occurred.
        Finished running test 'jtreg:test/langtools/tools/javac/launcher/SourceLauncherTest.java'
        Test report is stored in build/macosx-x86_64-server-release/test-results/jtreg_test_langtools_tools_javac_launcher_SourceLauncherTest_java

        ==============================
        Test summary
        ==============================
           TEST TOTAL PASS FAIL ERROR
           jtreg:test/langtools/tools/javac/launcher/SourceLauncherTest.java
        >> 1 0 1 0 <<
        ==============================
        TEST FAILURE

        make[1]: *** [main] Error 1
        make: *** [exploded-test] Error 2

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jjg Jonathan Gibbons
                  Reporter:
                  dlsmith Dan Smith
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: