From d1de3d082ef9b83aaa68664e653ab09feb8bad87 Mon Sep 17 00:00:00 2001 From: Kimura Yukihiro Date: Wed, 23 Aug 2023 06:04:28 +0000 Subject: [PATCH] 8313901: [TESTBUG] test/hotspot/jtreg/compiler/codecache/CodeCacheFullCountTest.java fails with java.lang.VirtualMachineError Reviewed-by: shade, thartmann --- .../jtreg/compiler/codecache/CodeCacheFullCountTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/hotspot/jtreg/compiler/codecache/CodeCacheFullCountTest.java b/test/hotspot/jtreg/compiler/codecache/CodeCacheFullCountTest.java index 8646c5834c6..9b1a5e89071 100644 --- a/test/hotspot/jtreg/compiler/codecache/CodeCacheFullCountTest.java +++ b/test/hotspot/jtreg/compiler/codecache/CodeCacheFullCountTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2023, 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 @@ -57,7 +57,11 @@ public class CodeCacheFullCountTest { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( "-XX:ReservedCodeCacheSize=2496k", "-XX:-UseCodeCacheFlushing", "-XX:-MethodFlushing", "CodeCacheFullCountTest", "WasteCodeCache"); OutputAnalyzer oa = ProcessTools.executeProcess(pb); - oa.shouldHaveExitValue(0); + // Ignore adapter creation failures + if (oa.getExitValue() != 0 && !oa.getStderr().contains("Out of space in CodeCache for adapters")) { + oa.reportDiagnosticSummary(); + throw new RuntimeException("VM finished with exit code " + oa.getExitValue()); + } String stdout = oa.getStdout(); Pattern pattern = Pattern.compile("full_count=(\\d)");