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

JTreg needs to log instructions for rerunning test outside jtreg

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • jtreg4.1
    • None
    • tools
    • None
    • b07

      I wish to run a test exactly as jtreg runs it, in precisely the same environment and with the same options, so that I may debug it directly, and not after it has failed. My naive attempts at doing this produce different failures of the form:

      Exception in thread "main" java.lang.SecurityException: Prohibited package name: java.util.Random

      because the test has the name java.util.Random.RandomStreamTest. Perhaps that was a poor choice of test name. I am sure that given sufficient time I could determine a workaround for this, but wouldn't it be nice if I did not need to do this.

      Jtreg may already provide this information, but if it does, its location is not documented, at least not here: http://openjdk.java.net/jtreg/command-help.html (I have previously noticed that jtreg has multiple sometimes-inconsistent copies of its documentation) I also sampled many files with likely names in the JT* subdirectories, but did not find the information I was looking for.

      One likely workaround is to rename the test into a different package to avoid the need to recreate whatever steps jtreg uses to dodge the package name error. This, of course, also takes time and also perturbs the test.

            jjg Jonathan Gibbons
            drchase David Chase (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: