RFR: 8314837: 5 compiled/codecache tests ignore VM flags
Vladimir Kozlov
kvn at openjdk.org
Wed Aug 30 21:21:02 UTC 2023
On Wed, 30 Aug 2023 09:47:58 GMT, Yi-Fan Tsai <duke at openjdk.org> wrote:
> TestSegmentedCodeCacheOption, TestCodeHeapSizeOptions, and TestPrintCodeCacheOption create processes with various flags. These flags include interpreter, tiered compilation, or segmented code cache, and they may conflict with the additionally specified vm flags. If propagating the flags and overwriting their values, the tests may not run in the intended way. This change adds `@requires vm.flagless` to these tests and keeps them creating processes while ignoring flags.
>
> CodeCacheFullCountTest creates a process with specific flags: ReservedCodeCacheSize, UseCodeCacheFlushing, and MethodFlushing. This change requires `vm.flagless` for the same reason.
>
> CheckCodeCacheInfo creates a process to print the code cache info while enabling Verbose. Both PrintCodeCache and Verbose are unlikely to conflict with additionally specified vm flags in a significant way, and the info printed stays the same. This change propagates the vm flags.
>
> CheckCodeCacheInfo passes in fastdebug build.
>
> make test TEST="test/hotspot/jtreg/compiler/codecache/CheckCodeCacheInfo.java" JTREG="JAVA_OPTIONS=-XX:-TieredCompilation"
> make test TEST="test/hotspot/jtreg/compiler/codecache/CheckCodeCacheInfo.java" JTREG="JAVA_OPTIONS=-Xint"
> make test TEST="test/hotspot/jtreg/compiler/codecache/CheckCodeCacheInfo.java" JTREG="JAVA_OPTIONS=-XX:-PrintCodeCache"
I think your description is not accurate. I sounds like this change will prevent passing external test flags into tests.
But synopsis of this RFE correctly says `tests ignore VM flags`. And main RFE [8314823](https://bugs.openjdk.org/browse/JDK-8314823) has even more explicit synopsis `Update or mark as vm.flagless tests which ignores external VM flags`.
So adding `@requires vm.flagless` simply marks tests which ignore external flags and don't run them in configurations with external flags specified.
I suggest to add comment to CheckCodeCacheInfo.java before `ProcessTools.createTestJvm()` call to say that:
ProcessTools.createTestJvm - creates a ProcessBuilder to run java with all the test framework arguments applied.
this text is from David H. comment in 8314823.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15485#issuecomment-1699856903
More information about the hotspot-compiler-dev
mailing list