From e312f49b153733ea2285b222256d8faa64936898 Mon Sep 17 00:00:00 2001 From: goetz Date: Wed, 21 Jan 2015 12:38:11 +0100 Subject: [PATCH] 8068013: [TESTBUG] Aix support in hotspot jtreg tests Reviewed-by: ctornqvi, fzhinkin, farvidsson --- test/runtime/6888954/vmerrors.sh | 5 +++-- test/test_env.sh | 21 +++++++++++------- .../com/oracle/java/testlibrary/Platform.java | 22 ++++++++++++------- 3 files changed, 30 insertions(+), 18 deletions(-) diff --git a/test/runtime/6888954/vmerrors.sh b/test/runtime/6888954/vmerrors.sh index ebd91490e..3864575d3 100644 --- a/test/runtime/6888954/vmerrors.sh +++ b/test/runtime/6888954/vmerrors.sh @@ -1,4 +1,4 @@ -# 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 @@ -61,11 +61,12 @@ bad_data_ptr_re='(SIGILL|SIGSEGV|EXCEPTION_ACCESS_VIOLATION).* at pc=' # 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/test_env.sh b/test/test_env.sh index fa912dde2..65dff9190 100644 --- a/test/test_env.sh +++ b/test/test_env.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# 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 @@ -53,7 +53,7 @@ echo "TESTCLASSES=${TESTCLASSES}" # set platform-dependent variables OS=`uname -s` case "$OS" in - SunOS | Linux | Darwin ) + AIX | Darwin | Linux | SunOS ) NULL=/dev/null PS=":" FS="/" @@ -130,25 +130,30 @@ then 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 "windows" vm_version.out > ${NULL} +grep "solaris" vm_version.out > ${NULL} if [ $? = 0 ] then - VM_OS="windows" + VM_OS="solaris" fi -grep "bsd" vm_version.out > ${NULL} +grep "windows" vm_version.out > ${NULL} if [ $? = 0 ] then - VM_OS="bsd" + VM_OS="windows" fi VM_CPU="unknown" diff --git a/test/testlibrary/com/oracle/java/testlibrary/Platform.java b/test/testlibrary/com/oracle/java/testlibrary/Platform.java index 8f31d457b..0f402caf0 100644 --- 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, 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 @@ -61,20 +61,24 @@ public class Platform { return dataModel.equals("64"); } - public static boolean isSolaris() { - return isOs("sunos"); + public static boolean isAix() { + return isOs("aix"); } - public static boolean isWindows() { - return isOs("win"); + public static boolean isLinux() { + return isOs("linux"); } public static boolean isOSX() { return isOs("mac"); } - public static boolean isLinux() { - return isOs("linux"); + public static boolean isSolaris() { + return isOs("sunos"); + } + + public static boolean isWindows() { + return isOs("win"); } private static boolean isOs(String osname) { @@ -130,7 +134,9 @@ public class Platform { */ 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(); -- GitLab