RFR: 8349755: Fix corner case issues in async UL [v7]
David Holmes
dholmes at openjdk.org
Thu Feb 13 00:03:10 UTC 2025
On Wed, 12 Feb 2025 12:39:12 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> test/hotspot/jtreg/runtime/logging/AsyncDeathTestNonProduct.java line 39:
>>
>>> 37: import jdk.test.lib.process.OutputAnalyzer;
>>> 38:
>>> 39: public class AsyncDeathNonProduct {
>>
>> Did you mean to call this `AsyncDeathNonDebug` ??
>>
>> You could just have one test file and two @test sections: one for debug and one for non-debug, then adapt the logic accordingly. But this non-debug version isn't verifying the correct execution of recursive logging in product mode, because there is no actual recursive logging being performed - this test isn't doing anything. You would need some product logging to actually verify that but then anything that did `-Xlog:all` would crash. So perhaps just delete this version of the test.
>
> I meant to call it `NonProduct`, and the rest of your message is confusing to me so I've probably misunderstood what my test does and what `NOT_PRODUCT` means :-).
>
> I've got:
>
> ```c++
> NOT_PRODUCT(log_debug(deathtest)("Induce a recursive log for testing");)
>
>
> I thought `NON_PRODUCT` means that this is included regardless of `assert`s being enabled, but will not be shipped in a product build of the JDK. That's what I want to do, as that let's me test recursive logging without any asserts being triggered.
>
> I'll look into the test section suggestion.
I've misunderstood your intention, but we only run tests on debug and product and your `@requires !vm.debug` means the test will run on product and it will do nothing because the log statements will not be there.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23513#discussion_r1953574814
More information about the hotspot-runtime-dev
mailing list