8207766: [testbug] Adapt tests for Aix

Reviewed-by: clanger, mbaesken
This commit is contained in:
Goetz Lindenmaier 2018-07-20 09:33:49 +02:00
parent 75437a84db
commit 9dcc8b4a96
6 changed files with 27 additions and 16 deletions

View File

@ -39,15 +39,18 @@
#
# Shell tests are othervm by default.
#
# List items are testnames followed by labels, all MUST BE commented
# List items are testnames followed by labels, all MUST BE commented
# as to why they are here and use a label:
# generic-all Problems on all platforms
# generic-ARCH Where ARCH is one of: sparc, sparcv9, x64, i586, etc.
# generic-ARCH Where ARCH is one of: sparc, sparcv9, x64, i586, ppc64,
# ppc64le, s390x etc.
# OSNAME-all Where OSNAME is one of: solaris, linux, windows, macosx, aix
# OSNAME-ARCH Specific on to one OSNAME and ARCH, e.g. solaris-amd64
# OSNAME-REV Specific on to one OSNAME and REV, e.g. solaris-5.8
#
# More than one label is allowed but must be on the same line.
# More than one label is allowed but must be on the same line comma seperated,
# without spaces.
# If there are several lines mentioning the same test, the last one is used.
#
#############################################################################
#
@ -80,7 +83,7 @@
# Fixing the tests:
#
# Some tests just may need to be run with "othervm", and that can easily be
# done my adding a @run line (or modifying any existing @run):
# done by adding a @run line (or modifying any existing @run):
# @run main/othervm NameOfMainClass
# Make sure this @run follows any use of @library.
# Otherwise, if the test is a samevm possibility, make sure the test is
@ -553,7 +556,9 @@ javax/management/remote/mandatory/notif/NotifReconnectDeadlockTest.java 8042215
java/net/MulticastSocket/NoLoopbackPackets.java 7122846 macosx-all
java/net/MulticastSocket/SetLoopbackMode.java 7122846 macosx-all
java/net/MulticastSocket/Test.java 7145658 macosx-all
java/net/MulticastSocket/Test.java 7145658,8207404 macosx-all,aix-all
java/net/MulticastSocket/JoinLeave.java 8207404 aix-all
java/net/MulticastSocket/SetGetNetworkInterfaceTest.java 8207404 aix-all
java/net/DatagramSocket/SendDatagramToBadAddress.java 7143960 macosx-all

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# 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
@ -39,7 +39,7 @@ createJavaFile()
public class $classname {
public static void main(String[] args) {
java.util.List<Object> l = java.util.Arrays.asList(null, "a");
System.out.println("java.util.Arrays.asList(null, \"a\") returns: " + l);
System.out.println("java.util.Arrays.asList(null, \\"a\\") returns: " + l);
return; // @1 breakpoint
}
}

View File

@ -122,7 +122,7 @@ case "$OS" in
fi
;;
SunOS | Linux )
AIX | Linux | SunOS )
${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} \
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
--add-exports java.desktop/sun.awt.X11=ALL-UNNAMED ${CP} \

View File

@ -409,7 +409,11 @@ public abstract class PKCS11Test {
return nss3_version;
try {
libfile = getNSSLibDir() + System.mapLibraryName(library);
String libdir = getNSSLibDir();
if (libdir == null) {
return 0.0;
}
libfile = libdir + System.mapLibraryName(library);
try (FileInputStream is = new FileInputStream(libfile)) {
byte[] data = new byte[1000];
int read = 0;

View File

@ -26,6 +26,8 @@
* @test
* @bug 8165996
* @summary Test NSS DB Sqlite
* @comment There is no NSS on Aix.
* @requires os.family != "aix"
* @library ../
* @modules java.base/sun.security.rsa
* java.base/sun.security.provider

View File

@ -21,7 +21,7 @@
* questions.
*/
/*
/**
* @test
* @bug 8192920 8204588
* @summary Test source mode
@ -298,11 +298,11 @@ public class SourceMode extends TestHelper {
@Test
void testTerminalOptionInShebang() throws IOException {
starting("testTerminalOptionInShebang");
if (skipShebangTest || isMacOSX || isSolaris) {
if (skipShebangTest || isAIX || isMacOSX || isSolaris) {
// On MacOSX, we cannot distinguish between terminal options on the
// shebang line and those on the command line.
// On Solaris, all options after the first on the shebang line are
// ignored.
// ignored. Similar on AIX.
log.println("SKIPPED");
return;
}
@ -322,11 +322,11 @@ public class SourceMode extends TestHelper {
@Test
void testTerminalOptionInShebangAtFile() throws IOException {
starting("testTerminalOptionInShebangAtFile");
if (skipShebangTest || isMacOSX || isSolaris) {
if (skipShebangTest || isAIX || isMacOSX || isSolaris) {
// On MacOSX, we cannot distinguish between terminal options in a
// shebang @-file and those on the command line.
// On Solaris, all options after the first on the shebang line are
// ignored.
// ignored. Similar on AIX.
log.println("SKIPPED");
return;
}
@ -349,11 +349,11 @@ public class SourceMode extends TestHelper {
@Test
void testMainClassInShebang() throws IOException {
starting("testMainClassInShebang");
if (skipShebangTest || isMacOSX || isSolaris) {
if (skipShebangTest || isAIX || isMacOSX || isSolaris) {
// On MacOSX, we cannot distinguish between a main class on the
// shebang line and one on the command line.
// On Solaris, all options after the first on the shebang line are
// ignored.
// ignored. Similar on AIX.
log.println("SKIPPED");
return;
}