8078593: [TESTBUG] ppc: Enable jtreg tests for new features
Summary: Also fix a ppc issue in test_env.sh
Reviewed-by: kvn
--- a/hotspot/test/compiler/intrinsics/mathexact/sanity/IntrinsicBase.java Wed Apr 29 15:34:04 2015 -0700
+++ b/hotspot/test/compiler/intrinsics/mathexact/sanity/IntrinsicBase.java Fri Apr 24 10:49:38 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -145,7 +145,8 @@
@Override
protected boolean isIntrinsicSupported() {
- return isServerVM() && Boolean.valueOf(useMathExactIntrinsics) && Platform.isX64();
+ return isServerVM() && Boolean.valueOf(useMathExactIntrinsics) &&
+ (Platform.isX64() || Platform.isPPC());
}
@Override
--- a/hotspot/test/compiler/rtm/cli/RTMGenericCommandLineOptionTest.java Wed Apr 29 15:34:04 2015 -0700
+++ b/hotspot/test/compiler/rtm/cli/RTMGenericCommandLineOptionTest.java Fri Apr 24 10:49:38 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -88,7 +88,7 @@
@Override
public void runTestCases() throws Throwable {
- if (Platform.isX86() || Platform.isX64()) {
+ if (Platform.isX86() || Platform.isX64() || Platform.isPPC()) {
if (Platform.isServer() && !Platform.isEmbedded()) {
runX86SupportedVMTestCases();
} else {
@@ -108,7 +108,7 @@
}
/**
- * Runs test cases on non-X86 CPU if VM does not support RTM locking.
+ * Runs test cases on X86 CPU if VM does not support RTM locking.
* @throws Throwable
*/
protected void runX86UnsupportedVMTestCases() throws Throwable {
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedCPU.java Wed Apr 29 15:34:04 2015 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedCPU.java Fri Apr 24 10:49:38 2015 +0200
@@ -60,7 +60,7 @@
"UseRTMLocking");
String errorMessage = RTMGenericCommandLineOptionTest.RTM_INSTR_ERROR;
- if (Platform.isX86() || Platform.isX64()) {
+ if (Platform.isX86() || Platform.isX64() || Platform.isPPC()) {
String shouldFailMessage = "JVM startup should fail with option "
+ "-XX:+UseRTMLocking on unsupported CPU";
// verify that we get an error when use +UseRTMLocking
--- a/hotspot/test/compiler/testlibrary/rtm/predicate/SupportedCPU.java Wed Apr 29 15:34:04 2015 -0700
+++ b/hotspot/test/compiler/testlibrary/rtm/predicate/SupportedCPU.java Fri Apr 24 10:49:38 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,9 +28,12 @@
import java.util.function.BooleanSupplier;
+import com.oracle.java.testlibrary.Platform;
+
public class SupportedCPU implements BooleanSupplier {
@Override
public boolean getAsBoolean() {
+ if (Platform.isPPC()) { return CPUInfo.hasFeature("tcheck"); }
return CPUInfo.hasFeature("rtm");
}
}
--- a/hotspot/test/test_env.sh Wed Apr 29 15:34:04 2015 -0700
+++ b/hotspot/test/test_env.sh Fri Apr 24 10:49:38 2015 +0200
@@ -188,6 +188,10 @@
if [ $? = 0 ]
then
VM_CPU="ppc"
+ if [ $VM_BITS = "64" ]
+ then
+ VM_CPU="ppc64"
+ fi
fi
grep "ia64" vm_version.out > ${NULL}
if [ $? = 0 ]