8344844: ciReplay tests fail with -XX:+UseCompactObjectHeaders because CDS is disabled since JDK-8341553

Reviewed-by: epeter, rcastanedalo
This commit is contained in:
Tobias Hartmann 2024-11-22 11:37:35 +00:00
parent 8903854e01
commit 847f65c14a
3 changed files with 23 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2024, 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
@ -30,6 +30,9 @@ import jdk.test.lib.Utils;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.util.CoreUtils;
import jdk.test.whitebox.WhiteBox;
import jtreg.SkippedException;
import java.io.BufferedReader;
import java.io.File;
@ -126,6 +129,11 @@ public abstract class CiReplayBase {
}
public void runTest(boolean needCoreDump, String... args) {
// The CiReplay tests don't work properly when CDS is disabled
boolean cdsEnabled = WhiteBox.getWhiteBox().isSharingEnabled();
if (!cdsEnabled) {
throw new SkippedException("CDS is not available for this JDK.");
}
cleanup();
if (generateReplay(needCoreDump, args)) {
testAction();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2024, 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
@ -24,6 +24,9 @@
package compiler.ciReplay;
import jdk.test.lib.Asserts;
import jdk.test.whitebox.WhiteBox;
import jtreg.SkippedException;
import java.io.IOException;
import java.nio.file.Files;
@ -51,6 +54,11 @@ public abstract class InliningBase extends DumpReplayBase {
}
protected void runTest() {
// The CiReplay tests don't work properly when CDS is disabled
boolean cdsEnabled = WhiteBox.getWhiteBox().isSharingEnabled();
if (!cdsEnabled) {
throw new SkippedException("CDS is not available for this JDK.");
}
runTest(commandLineNormal.toArray(new String[0]));
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2024, 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
@ -28,7 +28,10 @@
* @summary Testing that ciReplay inlining does not fail with unresolved signature classes.
* @requires vm.flightRecorder != true & vm.compMode != "Xint" & vm.compMode != "Xcomp" & vm.debug == true & vm.compiler2.enabled
* @modules java.base/jdk.internal.misc
* @run driver compiler.ciReplay.TestInliningProtectionDomain
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* compiler.ciReplay.TestInliningProtectionDomain
*/
package compiler.ciReplay;