Skip to content

Commit c107178

Browse files
David LeopoldsederDoug Simon
authored andcommitted
8253964: [Graal] UnschedulableGraphTest#test01fails with expected:<4> but was:<3>
Reviewed-by: kvn, dlong
1 parent bd45191 commit c107178

File tree

1 file changed

+11
-0
lines changed
  • src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test

1 file changed

+11
-0
lines changed

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnschedulableGraphTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import org.graalvm.compiler.nodes.cfg.Block;
4242
import org.graalvm.compiler.nodes.extended.OpaqueNode;
4343
import org.graalvm.compiler.options.OptionValues;
44+
import org.graalvm.compiler.phases.OptimisticOptimizations;
4445
import org.junit.Assert;
4546
import org.junit.Test;
4647

@@ -98,6 +99,16 @@ private DebugContext getDebugContext(ResolvedJavaMethod method) {
9899
return getDebugContext(options, null, method);
99100
}
100101

102+
@Override
103+
protected OptimisticOptimizations getOptimisticOptimizations() {
104+
/*
105+
* Disable optimistic optimizations to make the test more resilient towards wrong/strange
106+
* profiling information and the removal of never executed code as this can cause the
107+
* assertions in this test to fail since the control flow graph is in an uncommon shape.
108+
*/
109+
return OptimisticOptimizations.NONE;
110+
}
111+
101112
@Test
102113
@SuppressWarnings("try")
103114
public void test01() {

0 commit comments

Comments
 (0)