8068013: [TESTBUG] Aix support in hotspot jtreg tests

Reviewed-by: ctornqvi, fzhinkin, farvidsson
This commit is contained in:
Goetz Lindenmaier 2015-01-09 05:45:13 -08:00
parent b49c74e7fc
commit 1b1ac860df
5 changed files with 40 additions and 26 deletions
hotspot/test
runtime/6888954
serviceability/dcmd
test_env.sh
testlibrary/com/oracle/java/testlibrary
testlibrary_tests

@ -1,4 +1,4 @@
# 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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -71,11 +71,12 @@ bad_data_ptr_re='(SIGILL|SIGSEGV|EXCEPTION_ACCESS_VIOLATION).* at pc='
# EXCEPTION_ACCESS_VIOLATION - Win-* # EXCEPTION_ACCESS_VIOLATION - Win-*
# SIGBUS - Solaris SPARC-64 # SIGBUS - Solaris SPARC-64
# SIGSEGV - Linux-*, Solaris SPARC-32, Solaris X86-* # SIGSEGV - Linux-*, Solaris SPARC-32, Solaris X86-*
# SIGILL - Aix
# #
# Note: would like to use "pc=0x00*0f," in the pattern, but Solaris SPARC-* # Note: would like to use "pc=0x00*0f," in the pattern, but Solaris SPARC-*
# gets its signal at a PC in test_error_handler(). # gets its signal at a PC in test_error_handler().
# #
bad_func_ptr_re='(SIGBUS|SIGSEGV|EXCEPTION_ACCESS_VIOLATION).* at pc=' bad_func_ptr_re='(SIGBUS|SIGSEGV|SIGILL|EXCEPTION_ACCESS_VIOLATION).* at pc='
guarantee_re='guarantee[(](str|num).*failed: *' guarantee_re='guarantee[(](str|num).*failed: *'
fatal_re='fatal error: *' fatal_re='fatal error: *'
tail_1='.*expected null' tail_1='.*expected null'

@ -3,7 +3,7 @@ import java.util.Set;
import com.oracle.java.testlibrary.Platform; import com.oracle.java.testlibrary.Platform;
/* /*
* Copyright (c) 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -39,14 +39,16 @@ public class DynLibDcmdTest {
String result = DcmdUtil.executeDcmd("VM.dynlibs"); String result = DcmdUtil.executeDcmd("VM.dynlibs");
String osDependentBaseString = null; String osDependentBaseString = null;
if (Platform.isSolaris()) { if (Platform.isAix()) {
osDependentBaseString = "lib%s.so";
} else if (Platform.isLinux()) {
osDependentBaseString = "lib%s.so";
} else if (Platform.isOSX()) {
osDependentBaseString = "lib%s.dylib";
} else if (Platform.isSolaris()) {
osDependentBaseString = "lib%s.so"; osDependentBaseString = "lib%s.so";
} else if (Platform.isWindows()) { } else if (Platform.isWindows()) {
osDependentBaseString = "%s.dll"; osDependentBaseString = "%s.dll";
} else if (Platform.isOSX()) {
osDependentBaseString = "lib%s.dylib";
} else if (Platform.isLinux()) {
osDependentBaseString = "lib%s.so";
} }
if (osDependentBaseString == null) { if (osDependentBaseString == null) {

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# 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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -56,7 +56,7 @@ echo "TESTOPTS=${TESTOPTS}"
# set platform-dependent variables # set platform-dependent variables
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux | Darwin ) AIX | Darwin | Linux | SunOS )
NULL=/dev/null NULL=/dev/null
PS=":" PS=":"
FS="/" FS="/"
@ -133,26 +133,31 @@ then
fi fi
VM_OS="unknown" VM_OS="unknown"
grep "solaris" vm_version.out > ${NULL} grep "aix" vm_version.out > ${NULL}
if [ $? = 0 ] if [ $? = 0 ]
then then
VM_OS="solaris" VM_OS="aix"
fi
grep "bsd" vm_version.out > ${NULL}
if [ $? = 0 ]
then
VM_OS="bsd"
fi fi
grep "linux" vm_version.out > ${NULL} grep "linux" vm_version.out > ${NULL}
if [ $? = 0 ] if [ $? = 0 ]
then then
VM_OS="linux" VM_OS="linux"
fi fi
grep "solaris" vm_version.out > ${NULL}
if [ $? = 0 ]
then
VM_OS="solaris"
fi
grep "windows" vm_version.out > ${NULL} grep "windows" vm_version.out > ${NULL}
if [ $? = 0 ] if [ $? = 0 ]
then then
VM_OS="windows" VM_OS="windows"
fi fi
grep "bsd" vm_version.out > ${NULL}
if [ $? = 0 ]
then
VM_OS="bsd"
fi
VM_CPU="unknown" VM_CPU="unknown"
grep "sparc" vm_version.out > ${NULL} grep "sparc" vm_version.out > ${NULL}

@ -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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -68,20 +68,24 @@ public class Platform {
return dataModel.equals("64"); return dataModel.equals("64");
} }
public static boolean isSolaris() { public static boolean isAix() {
return isOs("sunos"); return isOs("aix");
} }
public static boolean isWindows() { public static boolean isLinux() {
return isOs("win"); return isOs("linux");
} }
public static boolean isOSX() { public static boolean isOSX() {
return isOs("mac"); return isOs("mac");
} }
public static boolean isLinux() { public static boolean isSolaris() {
return isOs("linux"); return isOs("sunos");
}
public static boolean isWindows() {
return isOs("win");
} }
private static boolean isOs(String osname) { private static boolean isOs(String osname) {
@ -140,7 +144,9 @@ public class Platform {
*/ */
public static boolean shouldSAAttach() throws Exception { public static boolean shouldSAAttach() throws Exception {
if (isLinux()) { if (isAix()) {
return false; // SA not implemented.
} else if (isLinux()) {
return canPtraceAttachLinux(); return canPtraceAttachLinux();
} else if (isOSX()) { } else if (isOSX()) {
return canAttachOSX(); return canAttachOSX();

@ -45,7 +45,7 @@ public class TestMutuallyExclusivePlatformPredicates {
private static enum MethodGroup { private static enum MethodGroup {
ARCH("isARM", "isPPC", "isSparc", "isX86", "isX64"), ARCH("isARM", "isPPC", "isSparc", "isX86", "isX64"),
BITNESS("is32bit", "is64bit"), BITNESS("is32bit", "is64bit"),
OS("isLinux", "isSolaris", "isWindows", "isOSX"), OS("isAix", "isLinux", "isOSX", "isSolaris", "isWindows"),
VM_TYPE("isClient", "isServer", "isGraal", "isMinimal"), VM_TYPE("isClient", "isServer", "isGraal", "isMinimal"),
IGNORED("isEmbedded", "isDebugBuild", "shouldSAAttach", IGNORED("isEmbedded", "isDebugBuild", "shouldSAAttach",
"canPtraceAttachLinux", "canAttachOSX", "isTieredSupported"); "canPtraceAttachLinux", "canAttachOSX", "isTieredSupported");