[8u] RFR: JDK-8271466 Some tests do not support aarch64
xiangyuan(远翔)
xiangyuan at tencent.com
Thu Jul 29 13:15:25 UTC 2021
Hi,
I found 3 cases failed on aarch64, and cases are detailed here: https://bugs.openjdk.java.net/browse/JDK-8271466
1. hotspot/test/runtime/StackGap/testme.sh
Error Info: gcc: error: unrecognized command line option '-m64'
When compiling stack-gap, this case passes compiler option '-m64' to gcc, which is unrecoginized by gcc on aarch64.
2. jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java
Error Info: [jdk/test/sun/management/jmxremote/bootstrap/linux-aarch64/launcher] does not exist. Skipping the test
This testcase depends on a pre-built binary launcher, which is placed the directory "jdk/test/sun/management/jmxremote/bootstrap/{OS-arch}/launcher".
Now there isn't include the file "linux-aarch64/launcher".
3. jdk/test/sun/security/pkcs11/Secmod/TestNssDbSqlite.java
Error Info: Unsupported OS, skipping: Linux-aarch64-64
File jdk/test/sun/security/pkcs11/PKCS11Test.java defines a hashmap named osMap to help to find some native libs on different platform, which doesn't include aarch64.
The fix patch here are:
diff --git a/hotspot/test/runtime/StackGap/testme.sh b/hotspot/test/runtime/StackGap/testme.sh
index 90265e6..5da0867 100644
--- a/hotspot/test/runtime/StackGap/testme.sh
+++ b/hotspot/test/runtime/StackGap/testme.sh
@@ -49,7 +49,10 @@ if [ "x$gcc_cmd" = "x" ]; then
exit 0;
fi
-CFLAGS="-m${VM_BITS}"
+if [ "x${VM_CPU}" != "xaarch64" ];
+then
+ CFLAGS="-m${VM_BITS}"
+fi
LD_LIBRARY_PATH=.:${COMPILEJAVA}/jre/lib/${VM_CPU}/${VM_TYPE}:/usr/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
diff --git a/jdk/test/sun/security/pkcs11/PKCS11Test.java b/jdk/test/sun/security/pkcs11/PKCS11Test.java
index 5fc9c60..940d778 100644
--- a/jdk/test/sun/security/pkcs11/PKCS11Test.java
+++ b/jdk/test/sun/security/pkcs11/PKCS11Test.java
@@ -587,6 +587,7 @@ public abstract class PKCS11Test {
osMap.put("Linux-amd64-64", new String[]{
"/usr/lib/x86_64-linux-gnu/", "/usr/lib/x86_64-linux-gnu/nss/",
"/usr/lib64/"});
+ osMap.put("Linux-aarch64-64", new String[]{"/usr/lib64/"});
osMap.put("Linux-ppc64-64", new String[]{"/usr/lib64/"});
osMap.put("Linux-ppc64le-64", new String[]{"/usr/lib64/"});
osMap.put("Windows-x86-32", new String[]{
The attached binary “launcher” is for case jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java, and is built with Makefile in jdk/test/sun/management/jmxremote/bootstrap/.
It should be placed “jdk/test/sun/management/jmxremote/bootstrap/linux-aarch64/”
Looking forward to be reviewed, thanks a lot.
Best wishes
Xiang Yuan
More information about the jdk8u-dev
mailing list