Skip to content

Commit

Permalink
8344844: ciReplay tests fail with -XX:+UseCompactObjectHeaders becaus…
Browse files Browse the repository at this point in the history
…e CDS is disabled since JDK-8341553

Reviewed-by: epeter, rcastanedalo
  • Loading branch information
TobiHartmann committed Nov 22, 2024
1 parent 8903854 commit 847f65c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
10 changes: 9 additions & 1 deletion test/hotspot/jtreg/compiler/ciReplay/CiReplayBase.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -30,6 +30,9 @@
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;
Expand Down Expand Up @@ -126,6 +129,11 @@ public CiReplayBase(String args[]) {
}

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();
Expand Down
10 changes: 9 additions & 1 deletion test/hotspot/jtreg/compiler/ciReplay/InliningBase.java
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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;
Expand Down Expand Up @@ -51,6 +54,11 @@ protected InliningBase(Class<?> testClass) {
}

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]));
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
Expand Down

1 comment on commit 847f65c

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please # to comment.