JDK-8368754 : runtime/cds/appcds/SignedJar.java log regex is too strict
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 17,21,25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-09-26
  • Updated: 2025-10-06
  • Resolved: 2025-09-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26 b18Fixed
Related Reports
Causes :  
Description
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),

```
Comments
Changeset: e19ec6f7 Branch: master Author: Axel Boldt-Christmas <aboldtch@openjdk.org> Date: 2025-09-29 05:19:56 +0000 URL: https://git.openjdk.org/jdk/commit/e19ec6f785e889d254b15c5ef2e801152c59c948
29-09-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/27517 Date: 2025-09-26 09:06:40 +0000
26-09-2025