Skip to content

Commit c3711dc

Browse files
committed
8339678: Update runtime/condy tests to be executed with VM flags
Reviewed-by: coleenp
1 parent b0cff6b commit c3711dc

File tree

6 files changed

+15
-19
lines changed

6 files changed

+15
-19
lines changed

test/hotspot/jtreg/ProblemList-Xcomp.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,5 @@ vmTestbase/nsk/jvmti/scenarios/capability/CM03/cm03t001/TestDescription.java 829
5151
vmTestbase/nsk/stress/thread/thread006.java 8321476 linux-all
5252

5353
gc/arguments/TestNewSizeFlags.java 8299116 macosx-aarch64
54+
55+
runtime/condy/escapeAnalysis/TestEscapeCondy.java 8339694 generic-all

test/hotspot/jtreg/runtime/condy/BadBSMUseTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,6 @@
2525
* @test
2626
* @bug 8186211
2727
* @summary CONSTANT_Dynamic_info structure's tries to use a BSM index whose signature is for an invokedynamic and vice versa.
28-
* @requires vm.flagless
2928
* @modules java.base/jdk.internal.misc
3029
* @library /test/lib
3130
* @compile CondyUsesIndyBSM.jcod
@@ -42,15 +41,15 @@ public class BadBSMUseTest {
4241
public static void main(String args[]) throws Throwable {
4342
// 1. Test a CONSTANT_Dynamic_info's bootstrap_method_attr_index points
4443
// at a BSM meant for a CONSTANT_InvokeDynamic_info
45-
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder("CondyUsesIndyBSM");
44+
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder("CondyUsesIndyBSM");
4645
OutputAnalyzer oa = new OutputAnalyzer(pb.start());
4746
oa.shouldContain("In Indybsm target CallSite method foo");
4847
oa.shouldContain("BootstrapMethodError: bootstrap method initialization exception");
4948
oa.shouldHaveExitValue(1);
5049

5150
// 2. Test a CONSTANT_InvokeDynamic_info's bootstrap_method_attr_index points
5251
// at a BSM meant for a CONSTANT_Dynamic_info
53-
pb = ProcessTools.createLimitedTestJavaProcessBuilder("IndyUsesCondyBSM");
52+
pb = ProcessTools.createTestJavaProcessBuilder("IndyUsesCondyBSM");
5453
oa = new OutputAnalyzer(pb.start());
5554
oa.shouldContain("In Condybsm");
5655
oa.shouldContain("BootstrapMethodError: bootstrap method initialization exception");

test/hotspot/jtreg/runtime/condy/CondyLDCTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,6 @@
2525
* @test
2626
* @bug 8186211
2727
* @summary Tests various ldc, ldc_w, ldc2_w instructions of CONSTANT_Dynamic.
28-
* @requires vm.flagless
2928
* @modules java.base/jdk.internal.misc
3029
* @library /test/lib
3130
* @compile CondyUseLDC_W.jasm
@@ -42,15 +41,15 @@ public class CondyLDCTest {
4241
public static void main(String args[]) throws Throwable {
4342
// 1. Test a ldc_w instruction can be used with condy's which generate
4443
// loadable constants of the following types: byte, char, short, float, integer, boolean.
45-
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder("-Xverify:all",
44+
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder("-Xverify:all",
4645
"CondyUseLDC_W");
4746
OutputAnalyzer oa = new OutputAnalyzer(pb.start());
4847
oa.shouldNotContain("VerifyError");
4948
oa.shouldHaveExitValue(0);
5049

5150
// 2. Test ldc2_w of a condy which returns a dynamically generated
5251
// float constant, generates a VerifyError.
53-
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-Xverify:all",
52+
pb = ProcessTools.createTestJavaProcessBuilder("-Xverify:all",
5453
"CondyBadLDC2_W");
5554
oa = new OutputAnalyzer(pb.start());
5655
oa.shouldContain("java.lang.VerifyError: Illegal type at constant pool entry");
@@ -59,7 +58,7 @@ public static void main(String args[]) throws Throwable {
5958

6059
// 3. Test a ldc of a condy which returns a dynamically generated
6160
// double constant, generates a VerifyError.
62-
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-Xverify:all",
61+
pb = ProcessTools.createTestJavaProcessBuilder("-Xverify:all",
6362
"CondyBadLDC");
6463
oa = new OutputAnalyzer(pb.start());
6564
oa.shouldContain("java.lang.VerifyError: Illegal type at constant pool entry");

test/hotspot/jtreg/runtime/condy/CondyNewInvokeSpecialTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,6 @@
2525
* @test
2626
* @bug 8186211
2727
* @summary Test CONSTANT_Dynamic where the BSM is invoked via a REF_newInvokeSpecial.
28-
* @requires vm.flagless
2928
* @modules java.base/jdk.internal.misc
3029
* @library /test/lib
3130
* @compile CondyNewInvokeSpecial.jasm
@@ -38,7 +37,7 @@
3837

3938
public class CondyNewInvokeSpecialTest {
4039
public static void main(String args[]) throws Throwable {
41-
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder("-Xverify:all",
40+
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder("-Xverify:all",
4241
"CondyNewInvokeSpecial");
4342
OutputAnalyzer oa = new OutputAnalyzer(pb.start());
4443
oa.shouldContain("In CondyNewInvokeSpecial <init> method");

test/hotspot/jtreg/runtime/condy/escapeAnalysis/TestEscapeCondy.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,6 @@
2626
* @bug 8216970
2727
* @summary Ensure escape analysis can handle an ldc of a dynamic
2828
* constant whose return type is an array of boolean.
29-
* @requires vm.flagless
3029
* @modules java.base/jdk.internal.misc
3130
* @library /test/lib
3231
* @compile TestEscapeThroughInvokeWithCondy$A.jasm
@@ -43,7 +42,7 @@ public class TestEscapeCondy {
4342
public static void main(String args[]) throws Throwable {
4443
// 1. Test escape analysis of a method that contains
4544
// a ldc instruction of a condy whose return type is an array of boolean
46-
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
45+
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(
4746
"-XX:CompileCommand=dontinline,runtime.condy.TestEscapeThroughInvokeWithCondy::create",
4847
"runtime.condy.TestEscapeThroughInvokeWithCondy");
4948
OutputAnalyzer oa = new OutputAnalyzer(pb.start());

test/hotspot/jtreg/runtime/condy/staticInit/TestInitException.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,6 @@
2525
* @test
2626
* @bug 8228485
2727
* @summary Correctly handle initialization error for Condy BSM.
28-
* @requires vm.flagless
2928
* @modules java.base/jdk.internal.misc
3029
* @library /test/lib
3130
* @compile Example.jasm
@@ -38,7 +37,7 @@
3837

3938
public class TestInitException {
4039
public static void main(java.lang.String[] unused) throws Exception {
41-
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder("Example");
40+
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder("Example");
4241
OutputAnalyzer oa = new OutputAnalyzer(pb.start());
4342
// First call stack trace
4443
// shouldMatch is used to workaround CODETOOLS-7902686
@@ -52,4 +51,3 @@ public static void main(java.lang.String[] unused) throws Exception {
5251
oa.shouldHaveExitValue(1);
5352
}
5453
}
55-

0 commit comments

Comments
 (0)