Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7901589

jtreg doesn't pass -Xpatch/-XaddExport flags nor jdk.launcher.patchdirs/jdk.launcher.addexports properties to driver

    Details

    • Type: Bug
    • Status: Open
    • Priority: P2
    • Resolution: Unresolved
    • Affects Version/s: jtreg4.1
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
      None

      Description

      the small "test" to illustrate the issue:
      import java.lang.management.ManagementFactory;

      /*
       * @test
       * @modules java.base/sun.misc
       * @build java.base/java.lang.Patch
       * @run main/othervm Test
       * @run driver Test
       */
      public class Test {
        public static void main(String[] args) {
            for (String arg : ManagementFactory.getRuntimeMXBean().getInputArguments()) {
                System.out.println(arg);
            }
        }
      }

      for othervm the test prints:
      -Dtest.src=/private/tmp/dir
      -Dtest.src.path=/private/tmp/dir
      -Dtest.classes=/private/tmp/JTwork/classes
      -Dtest.class.path=/private/tmp/JTwork/classes
      -Dtest.vm.opts=
      -Dtest.tool.vm.opts=
      -Dtest.compiler.opts=
      -Dtest.java.opts=
      -Dtest.jdk=/Users/iignatye/ws/jdk9/jake/build/macosx-x64/images/jdk
      -Dcompile.jdk=/Users/iignatye/ws/jdk9/jake/build/macosx-x64/images/jdk
      -Dtest.timeout.factor=1.0
      -Dtest.modules=java.base/sun.misc
      -Djdk.launcher.patchdirs=/private/tmp/JTwork/Test.d/patches
      -Djdk.launcher.addexports=java.base/sun.misc=ALL-UNNAMED

      but for driver:
      -Dtest.src=/private/tmp/dir
      -Dtest.src.path=/private/tmp/dir
      -Dtest.classes=/private/tmp/JTwork/classes
      -Dtest.class.path=/private/tmp/JTwork/classes
      -Dtest.vm.opts=
      -Dtest.tool.vm.opts=
      -Dtest.compiler.opts=
      -Dtest.java.opts=
      -Dtest.jdk=/Users/iignatye/ws/jdk9/jake/build/macosx-x64/images/jdk
      -Dcompile.jdk=/Users/iignatye/ws/jdk9/jake/build/macosx-x64/images/jdk
      -Dtest.timeout.factor=1.0
      -Dtest.modules=java.base/sun.misc

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jjg Jonathan Gibbons
                Reporter:
                iignatyev Igor Ignatyev
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: