8215975: [testbug] Adapt nsk tests to the PPC, S390 and AIX platforms.
Summary: Use LIBPATH on AIX, no shared memory connector on any Unix.
Reviewed-by: gadams, simonis, sspitsyn
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach002.java Thu Dec 13 17:57:11 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/AttachingConnector/attach/attach002.java Mon Dec 31 14:38:16 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2019, 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
@@ -203,6 +203,6 @@
return connector;
}
}
- throw new Error("No appropriate connector");
+ throw new Error("No appropriate connector: " + connectorName);
}
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Allocate/alloc001/TestDescription.java Thu Dec 13 17:57:11 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Allocate/alloc001/TestDescription.java Mon Dec 31 14:38:16 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, 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
@@ -21,6 +21,7 @@
* questions.
*/
+// Not run on AIX as it does not support ulimit -v.
/*
* @test
@@ -40,6 +41,7 @@
*
* @library /vmTestbase
* /test/lib
+ * @requires os.family != "aix"
* @run driver jdk.test.lib.FileInstaller . .
* @build nsk.jvmti.Allocate.alloc001
* @run shell alloc001.sh
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Allocate/alloc001/alloc001.bash Thu Dec 13 17:57:11 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Allocate/alloc001/alloc001.bash Mon Dec 31 14:38:16 2018 +0100
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2019, 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
@@ -41,7 +41,8 @@
max_ulimit=1048576
max_heap=256m
else
- max_ulimit=4194304
+ # AIX requires a 32-bit value here.
+ max_ulimit=4194303
max_heap=512m
fi
@@ -74,6 +75,7 @@
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$TESTNATIVEPATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TESTNATIVEPATH
+export LIBPATH=$LIBPATH:$TESTNATIVEPATH
export PATH=$PATH:$TESTNATIVEPATH
echo $JAVA ${JAVA_OPTS} nsk.jvmti.Allocate.alloc001
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses/retransform003/TestDriver.java Thu Dec 13 17:57:11 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses/retransform003/TestDriver.java Mon Dec 31 14:38:16 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, 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
@@ -76,8 +76,18 @@
"-agentlib:retransform003-03=id=3 can_retransform_classes=1",
nsk.jvmti.RetransformClasses.retransform003.class.getName()
);
- String envName = Platform.isWindows() ? "PATH" :
- (Platform.isOSX() ? "DYLD_LIBRARY_PATH" : "LD_LIBRARY_PATH");
+
+ String envName;
+ if (Platform.isWindows()) {
+ envName = "PATH";
+ } else if (Platform.isOSX()) {
+ envName = "DYLD_LIBRARY_PATH";
+ } else if (Platform.isAix()) {
+ envName = "LIBPATH";
+ } else {
+ envName = "LD_LIBRARY_PATH";
+ }
+
pb.environment()
.merge(envName, ".", (x, y) -> y + File.pathSeparator + x);
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetNativeMethodPrefix/SetNativeMethodPrefix002/TestDriver.java Thu Dec 13 17:57:11 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetNativeMethodPrefix/SetNativeMethodPrefix002/TestDriver.java Mon Dec 31 14:38:16 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, 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
@@ -66,8 +66,18 @@
"-agentlib:SetNativeMethodPrefix002-03=trace=all prefix=wc_",
nsk.jvmti.SetNativeMethodPrefix.SetNativeMethodPrefix002.class.getName()
);
- String envName = Platform.isWindows() ? "PATH" :
- (Platform.isOSX() ? "DYLD_LIBRARY_PATH" : "LD_LIBRARY_PATH");
+
+ String envName;
+ if (Platform.isWindows()) {
+ envName = "PATH";
+ } else if (Platform.isOSX()) {
+ envName = "DYLD_LIBRARY_PATH";
+ } else if (Platform.isAix()) {
+ envName = "LIBPATH";
+ } else {
+ envName = "LD_LIBRARY_PATH";
+ }
+
pb.environment()
.merge(envName, ".", (x, y) -> y + File.pathSeparator + x);
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ArgumentHandler.java Thu Dec 13 17:57:11 2018 +0100
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/ArgumentHandler.java Mon Dec 31 14:38:16 2018 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2019, 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
@@ -533,8 +533,12 @@
{"linux-sparcv9", "com.sun.jdi.SharedMemoryAttach"},
{"linux-aarch64", "com.sun.jdi.SharedMemoryAttach"},
{"linux-arm", "com.sun.jdi.SharedMemoryAttach"},
+ {"linux-ppc64", "com.sun.jdi.SharedMemoryAttach"},
+ {"linux-ppc64le", "com.sun.jdi.SharedMemoryAttach"},
+ {"linux-s390x", "com.sun.jdi.SharedMemoryAttach"},
{"macosx-amd64", "com.sun.jdi.SharedMemoryAttach"},
{"mac-x64", "com.sun.jdi.SharedMemoryAttach"},
+ {"aix-ppc64", "com.sun.jdi.SharedMemoryAttach"},
// listening connectors
/*
@@ -559,8 +563,12 @@
{"linux-sparcv9", "com.sun.jdi.SharedMemoryListen"},
{"linux-aarch64", "com.sun.jdi.SharedMemoryListen"},
{"linux-arm", "com.sun.jdi.SharedMemoryListen"},
+ {"linux-ppc64", "com.sun.jdi.SharedMemoryListen"},
+ {"linux-ppc64le", "com.sun.jdi.SharedMemoryListen"},
+ {"linux-s390x", "com.sun.jdi.SharedMemoryListen"},
{"macosx-amd64", "com.sun.jdi.SharedMemoryListen"},
{"mac-x64", "com.sun.jdi.SharedMemoryListen"},
+ {"aix-ppc64", "com.sun.jdi.SharedMemoryListen"},
// launching connectors
/*
@@ -615,6 +623,15 @@
{"linux-arm", "com.sun.jdi.CommandLineLaunch", "dt_shmem"},
{"linux-arm", "com.sun.jdi.RawCommandLineLaunch", "dt_shmem"},
+ {"linux-ppc64", "com.sun.jdi.CommandLineLaunch", "dt_shmem"},
+ {"linux-ppc64", "com.sun.jdi.RawCommandLineLaunch", "dt_shmem"},
+
+ {"linux-ppc64le", "com.sun.jdi.CommandLineLaunch", "dt_shmem"},
+ {"linux-ppc64le", "com.sun.jdi.RawCommandLineLaunch", "dt_shmem"},
+
+ {"linux-s390x", "com.sun.jdi.CommandLineLaunch", "dt_shmem"},
+ {"linux-s390x", "com.sun.jdi.RawCommandLineLaunch", "dt_shmem"},
+
{"windows-i586", "com.sun.jdi.CommandLineLaunch", "dt_socket"},
{"windows-i586", "com.sun.jdi.RawCommandLineLaunch", "dt_socket"},
@@ -633,6 +650,9 @@
{"mac-x64", "com.sun.jdi.CommandLineLaunch", "dt_shmem"},
{"mac-x64", "com.sun.jdi.RawCommandLineLaunch", "dt_shmem"},
+ {"aix-ppc64", "com.sun.jdi.CommandLineLaunch", "dt_shmem"},
+ {"aix-ppc64", "com.sun.jdi.RawCommandLineLaunch", "dt_shmem"},
+
// shared memory transport is implemented only on windows platform
{"solaris-sparc", "dt_shmem"},
{"solaris-sparcv9", "dt_shmem"},
@@ -647,7 +667,11 @@
{"linux-sparcv9", "dt_shmem"},
{"linux-aarch64", "dt_shmem"},
{"linux-arm", "dt_shmem"},
+ {"linux-ppc64", "dt_shmem"},
+ {"linux-ppc64le", "dt_shmem"},
+ {"linux-s390x", "dt_shmem"},
{"macosx-amd64", "dt_shmem"},
{"mac-x64", "dt_shmem"},
+ {"aix-ppc64", "dt_shmem"},
};
}