RFR: 8338550: Do libubsan1 installation in test container only on Ubuntu [v2]

Severin Gehwolf sgehwolf at openjdk.org
Mon Aug 19 15:32:52 UTC 2024


On Mon, 19 Aug 2024 13:16:02 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> After [JDK-8333144](https://bugs.openjdk.org/browse/JDK-8333144) docker related tests do not work on manually configured distros other than the 'standard' Ubuntu. This is because the basic generated Dockerfile with the change from [JDK-8333144](https://bugs.openjdk.org/browse/JDK-8333144) assumes 'apt-get' being available, which is not the case when one runs the testing on RPM based distributions.
>> So let's limit the libubsan1 installation to Ubuntu;  also add an 'apt-get update' to get recent package lists.
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add system property check

Seems mostly good. I wonder if we should move the config property, though.

test/lib/jdk/test/lib/containers/docker/DockerTestUtils.java line 328:

> 326:         if (baseImage.contains("ubuntu") && isUbsan) {
> 327:             template += "RUN apt-get update && apt-get install -y libubsan1\n";
> 328:         }

It would be cleaner if we did the property processing in `DockerfileConfig` so that we have it in one place.

-------------

PR Review: https://git.openjdk.org/jdk/pull/20624#pullrequestreview-2245861159
PR Review Comment: https://git.openjdk.org/jdk/pull/20624#discussion_r1721977881


More information about the hotspot-runtime-dev mailing list