RFR: 8238263: Create at-requires mechanism for containers

Bob Vandette bob.vandette at oracle.com
Fri Oct 23 20:03:11 UTC 2020



> On Oct 23, 2020, at 3:57 PM, Igor Ignatyev <iignatyev at openjdk.java.net> wrote:
> 
> On Fri, 23 Oct 2020 19:25:27 GMT, Harold Seigel <hseigel at openjdk.org> wrote:
> 
>> I think it depends on whether the tests will be permanently or temporarily excluded from running with containers. I thought this mechanism would be to permanently exclude the tests. That's why I used `@requires`.
> 
> I see, if this is for permanent exclusion then yes I agree that `@requires` is a better choice.
> 
>>> enable this option based on an environment variable so we don?t have to remember the
> cryptic command line sequence.
>> I'll look into basing the option on an environment variable.
> 
> one will still need to pass an environment variable to jtreg, and hence will need to remember some sort of "cryptic command line sequence". a solution for that might be to default `jdk.containerized` to `false` in `VMProps.java` and when only _containerized_ runs will have to set it up.

Why?  Environment variables are inherited.  For developers running jtreg, all they need to do is export the variable.

% export JAVA_CONTAINERIZED=1
% bash
% echo $JAVA_CONTAINERIZED
% 1

Bob.

> 
> 
> btw, I'm not sure that `jdk.containerized` is the best name for this property as _containerization_ is more of an environmental characteristic than that of jdk. how about smth like `env.containerized` or `testenv.containerized`?
> 
> -------------
> 
> PR: https://git.openjdk.java.net/jdk/pull/844



More information about the core-libs-dev mailing list