8078593: [TESTBUG] ppc: Enable jtreg tests for new features

Also fix a ppc issue in test_env.sh

Reviewed-by: kvn
This commit is contained in:
Goetz Lindenmaier 2015-04-24 10:49:38 +02:00
parent a880f3d139
commit 6d705e6978
5 changed files with 15 additions and 7 deletions

View file

@ -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 @@ public abstract class IntrinsicBase extends CompilerWhiteBoxTest {
@Override
protected boolean isIntrinsicSupported() {
return isServerVM() && Boolean.valueOf(useMathExactIntrinsics) && Platform.isX64();
return isServerVM() && Boolean.valueOf(useMathExactIntrinsics) &&
(Platform.isX64() || Platform.isPPC());
}
@Override

View file

@ -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 @@ public abstract class RTMGenericCommandLineOptionTest
@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 @@ public abstract class RTMGenericCommandLineOptionTest
}
/**
* 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 {

View file

@ -60,7 +60,7 @@ public class TestUseRTMLockingOptionOnUnsupportedCPU
"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

View file

@ -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 sun.hotspot.cpuinfo.CPUInfo;
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");
}
}

View file

@ -188,6 +188,10 @@ grep "ppc" vm_version.out > ${NULL}
if [ $? = 0 ]
then
VM_CPU="ppc"
if [ $VM_BITS = "64" ]
then
VM_CPU="ppc64"
fi
fi
grep "ia64" vm_version.out > ${NULL}
if [ $? = 0 ]