RFR(S/M): 8205419: [testbug] TestJmapCore failing without SA: introduce @requires vm.hasSA
David Holmes
david.holmes at oracle.com
Fri Jun 22 12:02:34 UTC 2018
On 22/06/2018 4:08 PM, Lindenmaier, Goetz wrote:
> Hi David,
>
>> Obviously using "@run othervm <flags>" you can invalidate what may have
>> been checked in a @require.
> As I understand with othervm you can not switch the user, or even start the
> other vm on a different system.
No of course not, this all happens on the system under the same user
within the context of the same jtreg execution.
I was simply pointing out that you can do silly things like:
@require vm.gc = G1GC (or whatever the syntax is)
and then have:
@run main/othervm -XX:-UseG1GC -XX:+UseSerialGC Test
Cheers,
David
> So in this case, where no flags are checked, it should be fine. Even if you
> Sudo the jtreg runner as proposed in JDK-8199700.
>
> Thanks and best regards,
> Goetz
>
>
>> -----Original Message-----
>> From: David Holmes <david.holmes at oracle.com>
>> Sent: Thursday, June 21, 2018 1:14 PM
>> To: Lindenmaier, Goetz <goetz.lindenmaier at sap.com>; serviceability-dev
>> (serviceability-dev at openjdk.java.net) <serviceability-
>> dev at openjdk.java.net>
>> Subject: Re: RFR(S/M): 8205419: [testbug] TestJmapCore failing without SA:
>> introduce @requires vm.hasSA
>>
>> Answering VMProps question ...
>>
>> On 20/06/2018 11:49 PM, Lindenmaier, Goetz wrote:
>>> Hi,
>>>
>>> TestJmapCore is failing on aix because there jhsdb is not implemented.
>>> So far, such tests check at runtime Platform.shouldSAAttach() which is
>> missing
>>> in TestJmapCore.
>>>
>>> Instead, I implement @requires vm.hasSAandCanAttach.
>>> This makes jtreg skip the tests without compiling and starting them.
>>>
>>> I added the new property to all tests that check shouldSAAttach in jdk and
>> hostpot test
>>> directories.
>>> This is the implementation of the new property, the rest is just repetitive
>> checking it:
>>> http://cr.openjdk.java.net/~goetz/wr18/8205419-
>> requiresHasSA/01/test/jtreg-ext/requires/VMProps.java.udiff.html
>>> webrev:
>>> http://cr.openjdk.java.net/~goetz/wr18/8205419-requiresHasSA/01/
>>>
>>> Is it correct to assume the VMProps is evaluated on the same machine and
>> with the same
>>> user as used for executing the test? canPtraceAttachLinux directly
>> accesses the system.
>>
>> jtreg will run the VM under test with all the VM flags specified to
>> jtreg and execute VMProps to gather information about the VM under test
>> before running the tests themselves.
>>
>> Obviously using "@run othervm <flags>" you can invalidate what may have
>> been checked in a @require.
>>
>> HTH
>>
>> David
>>
>>
>>> (Should I remove the checks for shouldSAAttach() from the changed tests?)
>>>
>>> Best regards,
>>> Goetz.
>>>
More information about the serviceability-dev
mailing list