runtime/cds/appcds/SignedJar.java log regex is too strict

XMLWordPrintable

    • b18

        Any logging which gets enabled (via `-verbose:class` which the test uses, or externally from JTREG) and logs before the line this test is checking for with a tag set which is longer than `class,load` makes the test fail.

        Example:
        Test expects: `"[class,load] Hello source: [...]"`
        What it gets when logging with `class,unload` prior to this specific log line: `"[class,load ] Hello source: [...]"`

        Suggested change:
        ```
        diff --git a/test/hotspot/jtreg/runtime/cds/appcds/SignedJar.java b/test/hotspot/jtreg/runtime/cds/appcds/SignedJar.java
        index 1ad28f99408..9e6cb58bb7f 100644
        --- a/test/hotspot/jtreg/runtime/cds/appcds/SignedJar.java
        +++ b/test/hotspot/jtreg/runtime/cds/appcds/SignedJar.java
        @@ -50,8 +50,8 @@ public static void main(String[] args) throws Exception {
         
                 String skipMsg = "Skipping Hello: Signed JAR";
                 String lambdaInArchive = "klasses.*=.*app.*Hello[$][$]Lambda.*hidden";
        - String loadFromJar = ".class,load. Hello source: file:.*signed_hello.jar";
        - String lambdaLoadFromHello = ".class.load. Hello[$][$]Lambda.*/0x.*source.*Hello";
        + String loadFromJar = ".class,load\s*. Hello source: file:.*signed_hello.jar";
        + String lambdaLoadFromHello = ".class.load\s*. Hello[$][$]Lambda.*/0x.*source.*Hello";
         
                 for (String mainArg : mainArgs) {
                     output = TestCommon.dump(signedJar, TestCommon.list(mainClass),

        ```

              Assignee:
              Axel Boldt-Christmas
              Reporter:
              Axel Boldt-Christmas
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: