Hi Goetz,
Can't VMProps.vmHasSA() just return Platform.shouldSAAttach()? It seems
you are unnecessarily replicating Platform.shouldSAAttach() logic.
If you are adding "@requires vm.hasSAandCanAttach" to a test, shouldn't
you remove the test's Platform.shouldSAAttach() check?
Is there a reason not to take the more direct and established approach
of just adding the Platform.shouldSAAttach() check to TestJmapCore? It
would be a lot less disruptive. I know the vm.hasSAandCanAttach
approach has advantages in not even attempting to compile and run the
test, but I'm not so sure those advantages outweigh the simplicity of
just adding a Platform.shouldSAAttach() check to one test. I can go
either way here. Just wondering if there are additional reasons I might
not be seeing.
Sorry, I don't have an answer to your VMProps evaluation question. You
might need to ask a wider audience than just svc.
thanks,
Chris
On 6/20/18 6:49 AM, 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.
(Should I remove the checks for shouldSAAttach() from the changed tests?)
Best regards,
Goetz.