Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[regress]error: no suitable method found for buildJdkContainerImage(String) #872

Open
sendaoYan opened this issue Oct 20, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@sendaoYan
Copy link
Collaborator

job: https://tone.aliyun-inc.com/ws/xesljfzh/test_result/389024

总共17个docker相关的用例javac报错

/tmp/tone/run/jtreg/jdk-repo/test/hotspot/jtreg/containers/docker/DockerBasicTest.java:51: error: no suitable method found for buildJdkContainerImage(String)
        DockerTestUtils.buildJdkContainerImage(imageNameAndTag);
                       ^
    method DockerTestUtils.buildJdkContainerImage(String,String) is not applicable
      (actual and formal argument lists differ in length)
    method DockerTestUtils.buildJdkContainerImage(String,String,String) is not applicable
      (actual and formal argument lists differ in length)
1 error

TEST RESULT: Failed. Compilation failed: Compilation failed

引入问题的PR:

commit 97eb2d61bf3412257ae7c12add7af43c06acb7d4
Author: lingjun.cg <[email protected]>
Date:   Tue Sep 5 20:13:44 2023 +0800

    [Runtime] Fix CRaC failed jtreg testcases and support load CRaC classses lazily.
    
    Summary:  Most of the CRaC testcases run failed when run on the lastest criu and linux kernel 5.10. The first is write to file instead of stdout and stderr, because stdout and stderr depend on pipe or tty, but pipe and tty cannot be checkpoint and restore correctly with criu. The second is use 'docker run' instead of 'docker exec' to run java application in docker.If checkpoint a application that lauched by 'docker exec', there is an error "Can't lookup mount=24 for fd=0 path=/dev/null".
    
    Testing: All testcases in jdk/jdk/crac.
    
    Reviewers: lei.yul, denghui.ddh
    
    Issue: https://github.com/dragonwell-project/dragonwell11/issues/867
@@ -127,10 +127,12 @@ public class DockerTestUtils {
      * The jdk will be placed under the "/jdk/" folder inside the image/container file system.
      *
      * @param imageName name of the image to be created, including version tag
+      *@param buildDirName  name of the docker build/staging directory, which will
+      *                      be created in the jtreg's scratch folder
      * @throws Exception
      */
-    public static void buildJdkContainerImage(String imageName) throws Exception {
-        buildJdkContainerImage(imageName, null);
+    public static void buildJdkContainerImage(String imageName, String buildDirName) throws Exception {
+        buildJdkContainerImage(imageName, null, buildDirName);
     }
 
      /**
@@ -139,14 +141,13 @@ public class DockerTestUtils {
      *
      * @param imageName         name of the image to be created, including version tag
      * @param dockerfileContent content of the Dockerfile; use null to generate default content
+      * @param buildDirName  name of the docker build/staging directory, which will
+      *                      be created in the jtreg's scratch folder
      * @throws Exception
      */
-    public static void buildJdkContainerImage(String imageName, String dockerfileContent) throws Exception {
-        // image name may contain tag, hence replace ':'
-        String imageDirName = imageName.replace(":", "-");
+    public static void buildJdkContainerImage(String imageName, String dockerfileContent, String buildDirName) throws Exception {
 
-        // Create an image build/staging directory
-        Path buildDir = Paths.get(imageDirName);
+        Path buildDir = Paths.get(".", buildDirName);
         if (Files.exists(buildDir)) {
             throw new RuntimeException("The docker build directory already exists: " + buildDir);
         }
@sendaoYan sendaoYan added the bug Something isn't working label Oct 20, 2024
lingjun-cg added a commit to lingjun-cg/dragonwell11 that referenced this issue Oct 21, 2024
Summary: A previous CRaC pactch change the signature of DockerTestUtils.buildJdkContainerImage(String imageName).All testcases depend on docker build will compile failed.

Testing: TestMemoryWithCgroupV1.java

Reviewed-by: yansendao.ysd,lvfei.lv

Issue: dragonwell-project#872
lingjun-cg added a commit to lingjun-cg/dragonwell11 that referenced this issue Oct 21, 2024
Summary: A previous CRaC pactch change the signature of DockerTestUtils.buildJdkContainerImage(String imageName).All testcases depend on docker build will compile failed.

Testing: TestMemoryWithCgroupV1.java

Reviewers: yansendao.ysd,lvfei.lv

Issue: dragonwell-project#872
Accelerator1996 pushed a commit that referenced this issue Oct 21, 2024
Summary: A previous CRaC pactch change the signature of DockerTestUtils.buildJdkContainerImage(String imageName).All testcases depend on docker build will compile failed.

Testing: TestMemoryWithCgroupV1.java

Reviewers: yansendao.ysd,lvfei.lv

Issue: #872
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants