RFR: 8302117: IgnoreUnrecognizedVMOptions flag causes failure in ArchiveHeapTestClass
Ramkumar Sunderbabu
rsunderbabu at openjdk.org
Thu Feb 9 08:35:46 UTC 2023
On Thu, 9 Feb 2023 07:34:52 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> with IgnoreUnrecognizedVMOptions, product build doesn't throws the expected error. Fixing it.
>
> test/hotspot/jtreg/runtime/cds/appcds/cacheObject/ArchiveHeapTestClass.java line 178:
>
>> 176: output = dumpHelloOnly("-XX:-IgnoreUnrecognizedVMOptions", "-XX:ArchiveHeapTestClass=NoSuchClass");
>> 177: mustFail(output, "VM option 'ArchiveHeapTestClass' is develop and is available only in debug version of VM.");
>> 178: }
>
> This is a very odd way to test this. The usual thing would be to mark the test as needing vm.debug and not even caring about what happens in a product build. This isn't actually testing the flag it is testing whether declaring a flag as develop works - which isn't what this test is really supposed to be for (that would be a VMFlags test). But this change will fix it. Though I'm not sure where the `-XX:+ignoreUnrecognizedVMOptions` is coming from.
-XX:+IgnoreUnrecognizedVMOptions can come from -vmoptions in jtreg command.
-------------
PR: https://git.openjdk.org/jdk/pull/12483
More information about the hotspot-runtime-dev
mailing list