Skip to content

Commit 69ad8ac

Browse files
committed
8266169: mark hotspot compiler/jvmci tests which ignore VM flags
Reviewed-by: kvn
1 parent 1a2a570 commit 69ad8ac

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

test/hotspot/jtreg/compiler/jvmci/TestEnableJVMCIProduct.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2021, 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,6 +25,7 @@
2525
* @test
2626
* @bug 8235539 8245717
2727
* @summary Tests effect of -XX:+EnableJVMCIProduct on EnableJVMCI and UseJVMCICompiler
28+
* @requires vm.flagless
2829
* @requires vm.jvmci
2930
* @library /test/lib
3031
* @run driver TestEnableJVMCIProduct

test/hotspot/jtreg/compiler/jvmci/TestInvalidJVMCIOption.java

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2021, 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,11 +25,13 @@
2525
* @test TestInvalidJVMCIOption
2626
* @bug 8257220
2727
* @summary Ensures invalid JVMCI options do not crash the VM with a hs-err log.
28-
* @requires vm.jvmci & vm.compMode == "Xmixed"
28+
* @requires vm.flagless
29+
* @requires vm.jvmci
2930
* @library /test/lib
3031
* @run driver TestInvalidJVMCIOption
3132
*/
3233

34+
import jdk.test.lib.Asserts;
3335
import jdk.test.lib.process.ProcessTools;
3436
import jdk.test.lib.process.OutputAnalyzer;
3537

@@ -45,13 +47,10 @@ public static void main(String[] args) throws Exception {
4547
String expectStdout = String.format(
4648
"Error parsing JVMCI options: Could not find option jvmci.XXXXXXXXX%n" +
4749
"Error: A fatal exception has occurred. Program will exit.%n");
48-
String actualStdout = output.getStdout();
49-
if (!actualStdout.equals(expectStdout)) {
50-
throw new RuntimeException(String.format("Invalid STDOUT:%nExpect:%n%s%nActual:%n%s", expectStdout, actualStdout));
51-
}
52-
if (!output.getStderr().isEmpty()) {
53-
throw new RuntimeException("STDERR was not empty: " + output.getStderr());
54-
}
50+
51+
Asserts.assertEQ(expectStdout, output.getStdout());
52+
output.stderrShouldBeEmpty();
53+
5554
output.shouldHaveExitValue(1);
5655
}
5756
}

test/hotspot/jtreg/compiler/jvmci/TestJVMCIPrintProperties.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2021, 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,8 @@
2525
* @test TestBasicLogOutput
2626
* @bug 8203370
2727
* @summary Ensure -XX:-JVMCIPrintProperties can be enabled and successfully prints expected output to stdout.
28-
* @requires vm.jvmci & !vm.graal.enabled & vm.compMode == "Xmixed"
28+
* @requires vm.flagless
29+
* @requires vm.jvmci
2930
* @library /test/lib
3031
* @run driver TestJVMCIPrintProperties
3132
*/

test/hotspot/jtreg/compiler/jvmci/errors/TestInvalidTieredStopAtLevel.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
/**
2525
* @test
2626
* @bug 8241232
27+
* @requires vm.flagless
2728
* @requires vm.jvmci
2829
* @library /test/lib
29-
* @build TestInvalidTieredStopAtLevel jdk.test.lib.process.*
30-
* @run main TestInvalidTieredStopAtLevel
30+
* @run driver TestInvalidTieredStopAtLevel
3131
*/
3232

3333
import jdk.test.lib.process.ProcessTools;

0 commit comments

Comments
 (0)