Skip to content

Commit

Permalink
install libubsan1 into test container
Browse files Browse the repository at this point in the history
  • Loading branch information
MBaesken committed Jul 30, 2024
1 parent ba4f63b commit 4a79243
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
11 changes: 0 additions & 11 deletions test/hotspot/jtreg/containers/docker/DockerBasicTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,18 @@
* @modules java.base/jdk.internal.misc
* java.management
* jdk.jartool/sun.tools.jar
* @build HelloDocker jdk.test.whitebox.WhiteBox
*
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI DockerBasicTest
*/
import jdk.test.lib.containers.docker.Common;
import jdk.test.lib.containers.docker.DockerRunOptions;
import jdk.test.lib.containers.docker.DockerTestUtils;
import jdk.test.lib.Platform;
import jdk.test.lib.Utils;
import jdk.test.whitebox.WhiteBox;


public class DockerBasicTest {
private static final String imageNameAndTag = Common.imageName("basic");

public static void main(String[] args) throws Exception {
WhiteBox wb = WhiteBox.getWhiteBox();
if (wb.isUbsanEnabled()) {
System.out.println("ubsan is enabled, avoid docker tests");
return;
}

if (!DockerTestUtils.canTestDocker()) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ private static void generateDockerFile(Path dockerfile, String baseImage,
String baseImageVersion) throws Exception {
String template =
"FROM %s:%s\n" +
"RUN apt-get install libubsan1\n" +
"COPY /jdk /jdk\n" +
"ENV JAVA_HOME=/jdk\n" +
"CMD [\"/bin/bash\"]\n";
Expand Down

0 comments on commit 4a79243

Please sign in to comment.