jtreg only load specified @modules? (was 8166450: SMARTCARDIO related tests failed on compilation)
Jonathan Gibbons
jonathan.gibbons at oracle.com
Thu Sep 22 15:59:17 UTC 2016
--limit-modules is just a JVM option, with no special meaning to jtreg.
It can be used to help detect you have enough modules specified in
@modules, although it won't help if you have too many.
You cannot do exactly what you are asking for (just load a specific set
of modules) because the JVM (intentionally) does not provide that
ability. You can limit modules and add modules in the root set, but
generally, the JVM will try and load all required dependencies.
I've been discussing this issue with Shura. Determining the required set
of modules requires a relatively expensive analysis of the classfiles,
which is why a "separate" tool may be required, That being said, we
could maybe reduce the amount of "separation" by integrating such a tool
into either the jtreg distribution (still as a separate tool) or into
jtreg itself, using new command line options.
-- Jon
On 9/22/16 7:27 AM, Wang Weijun wrote:
> Oh, I did't realized that. I thought with --limit-modules only those specified will be loaded.
>
> --Max
>
>> On Sep 22, 2016, at 1:16 AM, Jonathan Gibbons <jonathan.gibbons at oracle.com> wrote:
>>
>> Max,
>>
>> Does --limit-modules not give you the effect you are asking for?
>>
>> --limit-modules wil reduce the default set of observable modules. jtreg will use --add-modules for any necessary modules specified in @modules.
>>
>> -- Jon
>>
>> On 09/21/2016 07:11 AM, Wang Weijun wrote:
>>> Hi, jtreg-dev
>>>
>>> Is it possible for jtreg (probably with an option) to only load modules described in the @modules tags in complication and execution? This will ensure the @modules tags are written correctly without a dedicated tool (or manual check).
>>>
>>> Thanks
>>> Max
>>>
>>>
>>>> Begin forwarded message:
>>>>
>>>> From: Sergei Kovalev <sergei.kovalev at oracle.com>
>>>> Subject: Re: RFR(s): 8166450: SMARTCARDIO related tests failed on compilation
>>>> Date: September 21, 2016 at 10:06:14 PM GMT+8
>>>> To: Wang Weijun <weijun.wang at oracle.com>
>>>> Cc: security-dev at openjdk.java.net
>>>>
>>>> Hi Max,
>>>>
>>>> This is standard VM option. To emulate minimal JRE I'm using "--limit-modules java.base" option.
>>>>
>>>>
>>>> 21.09.16 17:04, Wang Weijun wrote:
>>>>> Change looks fine.
>>>>>
>>>>> One question: When you say the --limit-modules option, is it a new option for jtreg that allows it to automatically choose modules described in the @modules tags? Or it's just the standard VM option and you still need to provide the module names yourself?
>>>>>
>>>>> Thanks
>>>>> Max
>>>>>
>>>>>> On Sep 21, 2016, at 8:08 PM, Sergei Kovalev <sergei.kovalev at oracle.com> wrote:
>>>>>>
>>>>>> Hello team,
>>>>>>
>>>>>> Could you please review small fix for regression tests related to smartcardio API?
>>>>>>
>>>>>> BugID: https://bugs.openjdk.java.net/browse/JDK-8166450
>>>>>> WebRev: http://cr.openjdk.java.net/~skovalev/8166450/webrev.00/
>>>>>>
>>>>>> Issue: unable to run smartcardio related tests bu jtreg by default.
>>>>>> Root cause: missed module declaration in the tests header.
>>>>>> Solution: Adding missed module declaration.
>>>>>> Testing done: Fix tested locally using jtreg and "--limit-modules" command line option.
>>>>>>
>>>>>> --
>>>>>> With best regards,
>>>>>> Sergei
>>>>>>
>>>> --
>>>> With best regards,
>>>> Sergei
>>>>
More information about the jtreg-dev
mailing list