On Tue, 29 Aug 2023 22:01:22 GMT, Mikhailo Seledtsov <[email protected]> wrote:
> Container ecosystem is growing. It would be beneficial to define custom > command to figure out whether a specific test host or environment allows for > container testing. This enhancement seeks to make the command used by jtreg > "requires" extension configurable, specifically > test/jtreg-ext/requires/VMProps.java checkContainerSupport(). Hi David, Thank you for taking a look at this change. To answer your questions: -- how is this supposed to work ? If user running the tests does not specify the newly introduced property things will work same as before. If user specifies -Djdk.test.container.requires.check.command then the specified command will be executed to check whether container testing can be performed on a given host/system. By default the code in VMProps.java runs "docker ps". With this change we could override it with any other relevant command, such as "podman version" or other type of container command. -- What if they are really docker specific tests? I think our container tests should be fairly container-generic (or container agnostic), but need to check this. This raises a good question. Perhaps we should consider removing the at-requires check entirely, and rely on individual checks in individual tests. This will give us more flexibility, we run a specific check in each test and throw a jtreg.SkippedException upon failure. We already do some additional checks in each test, such as podman version, cgroups v1 vs v2, etc. Let me know what you think. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15475#issuecomment-1698424798
