8194869: [TESTBUG][aix, s390] Adapt tests to platforms.
Reviewed-by: mbaesken, simonis, dholmes, serb
--- a/test/failure_handler/src/share/classes/jdk/test/failurehandler/jtreg/OS.java Wed Jan 17 15:30:38 2018 +0100
+++ b/test/failure_handler/src/share/classes/jdk/test/failurehandler/jtreg/OS.java Thu Jan 18 10:26:39 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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
@@ -38,7 +38,9 @@
}
private OS(String name) {
- if (name.startsWith("Linux")) {
+ if (name.startsWith("AIX")) {
+ family = "aix";
+ } else if (name.startsWith("Linux")) {
family = "linux";
} else if (name.startsWith("Mac") || name.startsWith("Darwin")) {
family = "mac";
--- a/test/jdk/java/awt/FontClass/CreateFont/fileaccess/TestFontFile.sh Wed Jan 17 15:30:38 2018 +0100
+++ b/test/jdk/java/awt/FontClass/CreateFont/fileaccess/TestFontFile.sh Thu Jan 18 10:26:39 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, 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
@@ -46,7 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ AIX | Darwin | Linux | SunOS )
NULL=/dev/null
PS=":"
FS="/"
--- a/test/jdk/java/awt/JAWT/JAWT.sh Wed Jan 17 15:30:38 2018 +0100
+++ b/test/jdk/java/awt/JAWT/JAWT.sh Thu Jan 18 10:26:39 2018 +0100
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2018, 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
@@ -62,6 +62,10 @@
MAKE="make"
LD_LIBRARY_PATH="."
;;
+ AIX )
+ echo "Test passed. Not supported on AIX."
+ exit 0
+ ;;
SunOS )
NULL=/dev/null
PS=":"
--- a/test/jdk/java/awt/Toolkit/AutoShutdown/EventQueuePush/EventQueuePushAutoshutdown.sh Wed Jan 17 15:30:38 2018 +0100
+++ b/test/jdk/java/awt/Toolkit/AutoShutdown/EventQueuePush/EventQueuePushAutoshutdown.sh Thu Jan 18 10:26:39 2018 +0100
@@ -1,7 +1,7 @@
#!/bin/ksh -p
#
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, 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
@@ -60,7 +60,7 @@
# The beginning of the script proper
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ AIX | CYGWIN* | Darwin | Linux | SunOS )
FILESEP="/"
;;
--- a/test/jdk/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh Wed Jan 17 15:30:38 2018 +0100
+++ b/test/jdk/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh Thu Jan 18 10:26:39 2018 +0100
@@ -1,7 +1,7 @@
#!/bin/ksh -p
#
-# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2018, 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
@@ -59,7 +59,7 @@
# Checking for proper OS
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ AIX | CYGWIN* | Darwin | Linux | SunOS )
FILESEP="/"
;;
@@ -172,7 +172,7 @@
fi
;;
- SunOS | Linux )
+ AIX | Linux | SunOS )
${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \
--add-opens java.desktop/sun.awt=ALL-UNNAMED \
--add-opens java.desktop/sun.awt.X11=ALL-UNNAMED ${CP} \
--- a/test/jdk/javax/imageio/spi/AppletContextTest/BadPluginConfigurationTest.sh Wed Jan 17 15:30:38 2018 +0100
+++ b/test/jdk/javax/imageio/spi/AppletContextTest/BadPluginConfigurationTest.sh Thu Jan 18 10:26:39 2018 +0100
@@ -1,5 +1,5 @@
#!/bin/ksh -p
-# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2018, 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
@@ -86,8 +86,24 @@
# Checking for proper OS
OS=`uname -s`
+MKTEMP="mktemp"
case "$OS" in
- SunOS | Linux | Darwin )
+ AIX )
+ FILESEP="/"
+ PATHSEP=":"
+ TMP=`cd /tmp; pwd -P`
+
+ type ${MKTEMP} > /dev/null 2>&1
+
+ if ! [ $? -ne 0 ] ; then
+ MKTEMP="/opt/freeware/bin/mktemp"
+ fi
+ if ! [ -e ${MKTEMP} ] ; then
+ pass "Test skipped because no mktemp found on this machine"
+ fi
+ ;;
+
+ Darwin | Linux | SunOS )
FILESEP="/"
PATHSEP=":"
TMP=`cd /tmp; pwd -P`
@@ -180,7 +196,7 @@
# app have file read permission for all subdirs of the
# scratch dir
-PLUGINDST_DIR=$(mktemp -d ${TMP}/iio_test.XXXXXXXX)
+PLUGINDST_DIR=$(${MKTEMP} -d ${TMP}/iio_test.XXXXXXXX)
echo "Created PLUGINDST_DIR as ${PLUGINDST_DIR}"
TEST_PLUGIN=dummy.jar
--- a/test/jdk/sun/security/mscapi/ShortRSAKey1024.sh Wed Jan 17 15:30:38 2018 +0100
+++ b/test/jdk/sun/security/mscapi/ShortRSAKey1024.sh Thu Jan 18 10:26:39 2018 +0100
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2018, 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
@@ -50,7 +50,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ AIX | CYGWIN* | Darwin | Linux | SunOS )
FS="/"
;;
Windows_* )
--- a/test/jdk/sun/security/pkcs11/PKCS11Test.java Wed Jan 17 15:30:38 2018 +0100
+++ b/test/jdk/sun/security/pkcs11/PKCS11Test.java Thu Jan 18 10:26:39 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, 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
@@ -624,6 +624,7 @@
"/usr/lib64/"});
osMap.put("Linux-ppc64-64", new String[]{"/usr/lib64/"});
osMap.put("Linux-ppc64le-64", new String[]{"/usr/lib64/"});
+ osMap.put("Linux-s390x-64", new String[]{"/usr/lib64/"});
osMap.put("Windows-x86-32", new String[]{
PKCS11_BASE + "/nss/lib/windows-i586/".replace('/', SEP)});
osMap.put("Windows-amd64-64", new String[]{
--- a/test/jdk/sun/security/tools/keytool/i18n.sh Wed Jan 17 15:30:38 2018 +0100
+++ b/test/jdk/sun/security/tools/keytool/i18n.sh Thu Jan 18 10:26:39 2018 +0100
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2018, 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
@@ -44,7 +44,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ AIX | Darwin | Linux | SunOS )
NULL=/dev/null
PS=":"
FS="/"