RFR: 8302117: IgnoreUnrecognizedVMOptions flag causes failure in ArchiveHeapTestClass

David Holmes dholmes at openjdk.org
Thu Feb 9 07:37:43 UTC 2023


On Thu, 9 Feb 2023 07:13:05 GMT, Ramkumar Sunderbabu <rsunderbabu at openjdk.org> wrote:

> with IgnoreUnrecognizedVMOptions, product build doesn't throws the expected error. Fixing it.

Marked as reviewed by dholmes (Reviewer).

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.

-------------

PR: https://git.openjdk.org/jdk/pull/12483


More information about the hotspot-runtime-dev mailing list