From a0c7f661bedaf50b22cf83c798be46e8e5004b60 Mon Sep 17 00:00:00 2001 From: Calvin Cheung Date: Thu, 6 Feb 2025 22:31:19 +0000 Subject: [PATCH] 8349508: runtime/cds/appcds/TestParallelGCWithCDS.java should not check for specific output Reviewed-by: dholmes, iklam --- .../jtreg/runtime/cds/appcds/TestParallelGCWithCDS.java | 9 +-------- .../jtreg/runtime/cds/appcds/TestSerialGCWithCDS.java | 9 ++------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/test/hotspot/jtreg/runtime/cds/appcds/TestParallelGCWithCDS.java b/test/hotspot/jtreg/runtime/cds/appcds/TestParallelGCWithCDS.java index 781e0276b27..4ed2ce4446d 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/TestParallelGCWithCDS.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/TestParallelGCWithCDS.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -146,13 +146,6 @@ public class TestParallelGCWithCDS { out.shouldContain(HELLO); out.shouldNotContain(errMsg); } else { - String pattern = "((Too small maximum heap)" + - "|(GC triggered before VM initialization completed)" + - "|(CDS archive has aot-linked classes but the archived heap objects cannot be loaded)" + - "|(Initial heap size set to a larger value than the maximum heap size)" + - "|(java.lang.OutOfMemoryError)" + - "|(Error: A JNI error has occurred, please check your installation and try again))"; - out.shouldMatch(pattern); out.shouldNotHaveFatalError(); } n++; diff --git a/test/hotspot/jtreg/runtime/cds/appcds/TestSerialGCWithCDS.java b/test/hotspot/jtreg/runtime/cds/appcds/TestSerialGCWithCDS.java index b191b5f395b..7dbdc43f443 100644 --- a/test/hotspot/jtreg/runtime/cds/appcds/TestSerialGCWithCDS.java +++ b/test/hotspot/jtreg/runtime/cds/appcds/TestSerialGCWithCDS.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -163,12 +163,7 @@ public class TestSerialGCWithCDS { if (out.getExitValue() == 0) { out.shouldNotContain(errMsg); } else { - String output = out.getStdout() + out.getStderr(); - String exp1 = "Too small maximum heap"; - String exp2 = "GC triggered before VM initialization completed"; - if (!output.contains(exp1) && !output.contains(exp2)) { - throw new RuntimeException("Either '" + exp1 + "' or '" + exp2 + "' must be in stdout/stderr \n"); - } + out.shouldNotHaveFatalError(); } n++; }