RFR: 8272291: mark hotspot runtime/logging tests which ignore external VM flags [v2]
dholmes at openjdk.java.net
Tue Aug 17 05:02:30 UTC 2021
On Tue, 17 Aug 2021 03:24:32 GMT, Igor Ignatyev <iignatyev at openjdk.org> wrote:
>> test/hotspot/jtreg/runtime/logging/ClassLoadUnloadTest.java line 28:
>>> 26: * @test ClassLoadUnloadTest
>>> 27: * @bug 8142506
>>> 28: * @requires vm.opt.final.ClassUnloading
>> The new requirement is weaker than the old. If ClassUnloading were not enabled by default then this test would now run when it should not.
> nice catch, I guess I assumed that the test makes sure its child JVMs are run in the correct setting (as `CompressedOopsTest.java` does). I'll update the test to pass `-XX:+ClassUnloading` in `ClassLoadUnloadTest::exec`.
They are not exactly equivalent conditions, but when combined with vm.flagless this change seems okay.
>> test/hotspot/jtreg/runtime/logging/CompressedOopsTest.java line 28:
>>> 26: * @bug 8149991
>>> 27: * @requires vm.bits == 64
>>> 28: * @requires vm.flagless
>> Similar comment here, you have weakened the condition that enables the test.
> this test explicitly passes `-XX:+UseCompressedOops` to a child JVM, so the condition hasn't been weakened, if anything this change increases the coverage for JVMs where `UseCompressedOops` isn't true by default as now the test will be included in out-of-box runs.
Okay. Thinking more about this case I think the old condition was to stop this test from being run when compressed oops was actually disabled, because it was going to enable them anyway. But now vm.flagless takes care of that case.
More information about the hotspot-runtime-dev