RFR: 8314831: NMT tests ignore vm flags
Mikhailo Seledtsov
mseledtsov at openjdk.org
Wed Sep 6 17:55:40 UTC 2023
On Wed, 6 Sep 2023 02:49:40 GMT, Mikhailo Seledtsov <mseledtsov at openjdk.org> wrote:
> Some NMT tests do not pass Java/JVM test command line options (flags) to the child process. Such tests should be examined and broken down into 2 categories:
> - a test intentionally does not pass flags to child process - mark such tests with "@requires vm.flagless"
> - tests did not pass flags to child process by mistake - fix them to use the right ProcessTools method that passes test flags to child process
>
> For details see the JBS issue, including on how the tests were assigned to each category and the reasoning behind it.
To answer a question from Gerard: shouldn't we use createJavaProcessBuilderIgnoreTestJavaOpts() ?
A: even though MR for " 8315097: Rename createJavaProcessBuilder #15452 " is related in topic to this change, it is still under discussion and could take some time to make final decision on it. Once decision is done and change 15452 is approved, the global renaming will be applied.
As far as tagging tests with "@requires vm.flagless" - this is our (HotSpot) recommended way of tagging tests that do not pass the JVM args to child VM. This is done in addition to using createJavaProcessBuilder(). This provides us a uniform way of knowing which tests do not pass flags to child VMs, we can make proper test selection when executing with flags based on that information.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15576#issuecomment-1708838795
More information about the hotspot-runtime-dev
mailing list