# HG changeset patch # User goetz # Date 1419250928 -3600 # Node ID e1bbfb3d3daa4dffbfcf46a2d8ac15bbdf57126e # Parent acfdd92cedaa445528be83ed67c7432a6dc14d3a 8068013: [TESTBUG] Aix support in hotspot jtreg tests diff --git a/test/runtime/6888954/vmerrors.sh b/test/runtime/6888954/vmerrors.sh --- a/test/runtime/6888954/vmerrors.sh +++ b/test/runtime/6888954/vmerrors.sh @@ -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. # # This code is free software; you can redistribute it and/or modify it @@ -71,11 +71,12 @@ # EXCEPTION_ACCESS_VIOLATION - Win-* # SIGBUS - Solaris SPARC-64 # SIGSEGV - Linux-*, Solaris SPARC-32, Solaris X86-* +# SIGILL - Aix # # Note: would like to use "pc=0x00*0f," in the pattern, but Solaris SPARC-* # 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: *' fatal_re='fatal error: *' tail_1='.*expected null' diff --git a/test/serviceability/dcmd/DynLibDcmdTest.java b/test/serviceability/dcmd/DynLibDcmdTest.java --- a/test/serviceability/dcmd/DynLibDcmdTest.java +++ b/test/serviceability/dcmd/DynLibDcmdTest.java @@ -3,7 +3,7 @@ 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. * * This code is free software; you can redistribute it and/or modify it @@ -39,14 +39,16 @@ String result = DcmdUtil.executeDcmd("VM.dynlibs"); 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"; } else if (Platform.isWindows()) { osDependentBaseString = "%s.dll"; - } else if (Platform.isOSX()) { - osDependentBaseString = "lib%s.dylib"; - } else if (Platform.isLinux()) { - osDependentBaseString = "lib%s.so"; } if (osDependentBaseString == null) { diff --git a/test/test_env.sh b/test/test_env.sh --- a/test/test_env.sh +++ b/test/test_env.sh @@ -1,6 +1,6 @@ #!/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. # # This code is free software; you can redistribute it and/or modify it @@ -56,7 +56,7 @@ # set platform-dependent variables OS=`uname -s` case "$OS" in - SunOS | Linux | Darwin ) + AIX | Darwin | Linux | SunOS ) NULL=/dev/null PS=":" FS="/" @@ -133,26 +133,31 @@ fi VM_OS="unknown" -grep "solaris" vm_version.out > ${NULL} +grep "aix" vm_version.out > ${NULL} if [ $? = 0 ] then - VM_OS="solaris" + VM_OS="aix" +fi +grep "bsd" vm_version.out > ${NULL} +if [ $? = 0 ] +then + VM_OS="bsd" fi grep "linux" vm_version.out > ${NULL} if [ $? = 0 ] then VM_OS="linux" fi +grep "solaris" vm_version.out > ${NULL} +if [ $? = 0 ] +then + VM_OS="solaris" +fi grep "windows" vm_version.out > ${NULL} if [ $? = 0 ] then VM_OS="windows" fi -grep "bsd" vm_version.out > ${NULL} -if [ $? = 0 ] -then - VM_OS="bsd" -fi VM_CPU="unknown" grep "sparc" vm_version.out > ${NULL} diff --git a/test/testlibrary/com/oracle/java/testlibrary/Platform.java b/test/testlibrary/com/oracle/java/testlibrary/Platform.java --- a/test/testlibrary/com/oracle/java/testlibrary/Platform.java +++ b/test/testlibrary/com/oracle/java/testlibrary/Platform.java @@ -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 @@ -68,6 +68,18 @@ return dataModel.equals("64"); } + public static boolean isAix() { + return isOs("aix"); + } + + public static boolean isLinux() { + return isOs("linux"); + } + + public static boolean isOSX() { + return isOs("mac"); + } + public static boolean isSolaris() { return isOs("sunos"); } @@ -76,14 +88,6 @@ return isOs("win"); } - public static boolean isOSX() { - return isOs("mac"); - } - - public static boolean isLinux() { - return isOs("linux"); - } - private static boolean isOs(String osname) { return osName.toLowerCase().startsWith(osname.toLowerCase()); } @@ -140,7 +144,9 @@ */ public static boolean shouldSAAttach() throws Exception { - if (isLinux()) { + if (isAix()) { + return false; // SA not implemented. + } else if (isLinux()) { return canPtraceAttachLinux(); } else if (isOSX()) { return canAttachOSX(); diff --git a/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java b/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java --- a/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java +++ b/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java @@ -45,7 +45,7 @@ private static enum MethodGroup { ARCH("isARM", "isPPC", "isSparc", "isX86", "isX64"), BITNESS("is32bit", "is64bit"), - OS("isLinux", "isSolaris", "isWindows", "isOSX"), + OS("isAix", "isLinux", "isOSX", "isSolaris", "isWindows"), VM_TYPE("isClient", "isServer", "isGraal", "isMinimal"), IGNORED("isEmbedded", "isDebugBuild", "shouldSAAttach", "canPtraceAttachLinux", "canAttachOSX", "isTieredSupported");