aqa-tests icon indicating copy to clipboard operation
aqa-tests copied to clipboard

DockerBasicTest.java run fail on aarch64 platform

Open sendaoYan opened this issue 2 years ago • 8 comments

Describe the bug DockerBasicTest.java run fail on aarch64 platform, because of can't get the "aarch64/ubuntu:latest" docker image.

To Reproduce jtreg -va -nr -w tmp hotspot/test/runtime/containers/docker/DockerBasicTest.java

docker pull aarch64/ubuntu:latest

Expected behavior run success

Screenshots

image

image

image

Additional context dockerfile generate by testcase:

image

hotspot/test/testlibrary/com/oracle/java/testlibrary/DockerfileConfig.java:

image

git diff hotspot/test/testlibrary/com/oracle/java/testlibrary/DockerfileConfig.java 
diff --git a/hotspot/test/testlibrary/com/oracle/java/testlibrary/DockerfileConfig.java b/hotspot/test/testlibrary/com/oracle/java/testlibrary/DockerfileConfig.java
index e000f0eed4..f8d424a3a1 100644
--- a/hotspot/test/testlibrary/com/oracle/java/testlibrary/DockerfileConfig.java
+++ b/hotspot/test/testlibrary/com/oracle/java/testlibrary/DockerfileConfig.java
@@ -44,7 +44,7 @@ public class DockerfileConfig {
 
         switch (Platform.getOsArch()) {
             case "aarch64":
-                return "aarch64/ubuntu";
+                return "ubuntu";
             case "ppc64le":
                 return "ppc64le/ubuntu";
             case "s390x":

sendaoYan avatar May 06 '22 13:05 sendaoYan

Test passed in grinder https://ci.adoptopenjdk.net/job/Grinder/4604/console, which is using temurin jdk8 aarch64. Not sure the real reason for the failure.

sophia-guo avatar May 06 '22 17:05 sophia-guo

Test passed in grinder https://ci.adoptopenjdk.net/job/Grinder/4604/console, which is using temurin jdk8 aarch64. Not sure the real reason for the failure.

If you want to run this test really, you should make sure the docker service work normally. Testcase will check docker service before test start.

image

image

sendaoYan avatar May 07 '22 01:05 sendaoYan

testcase list:

runtime/containers/docker/DockerBasicTest.java
runtime/containers/docker/TestCPUAwareness.java
runtime/containers/docker/TestCPUSets.java
runtime/containers/docker/TestMemoryAwareness.java
runtime/containers/docker/TestMisc.java

sendaoYan avatar Jul 25 '22 03:07 sendaoYan

@sendaoYan Could you confirm that we need to open an issue in JBS to update hotspot/test/testlibrary/com/oracle/java/testlibrary/DockerfileConfig.java to fix this issue?

sophia-guo avatar Jul 26 '22 15:07 sophia-guo

@sendaoYan Could you confirm that we need to open an issue in JBS to update hotspot/test/testlibrary/com/oracle/java/testlibrary/DockerfileConfig.java to fix this issue?

I think it's necessaty to creat open an issue in upstream JBS. But I don't have an account. After this issue has been fixed, we can enable these testcase again.

sendaoYan avatar Jul 27 '22 06:07 sendaoYan

@andrew-m-leonard could you help this? Reopen and will close when issue is opened in jbs

sophia-guo avatar Jul 28 '22 18:07 sophia-guo

Same issue with arm32 https://ci.adoptopenjdk.net/job/Grinder/5314/

sophia-guo avatar Jul 28 '22 18:07 sophia-guo

What is the correct fix here? removing aarch64 from the docker image name doesn't look right to me?

andrew-m-leonard avatar Aug 01 '22 11:08 andrew-m-leonard

The correct fix for this is to specify -Djdk.test.docker.image.name=<base-image-name> and -Djdk.test.docker.image.version=<image-version> when running the test. That is, if you wanted to run the test on a registry.fedoraproject.org/fedora:37 base image, one would set:

-Djdk.test.docker.image.name=registry.fedoraproject.org/fedora \
-Djdk.test.docker.image.version=37

It's not a good idea to rely on the defaults for those container tests.

jerboaa avatar Nov 14 '22 13:11 jerboaa

There really is nothing to report upstream, as that's the way to handle mismatches on the base image versions. See https://bugs.openjdk.org/browse/JDK-8221342

jerboaa avatar Nov 14 '22 13:11 jerboaa

jdk.test.docker.image.name

Thanks for your advice.

sendaoYan avatar Nov 16 '22 08:11 sendaoYan