RFR: 8281822: Test failures on non-DTrace builds due to incomplete DTrace* flags handling [v2]

David Holmes dholmes at openjdk.java.net
Tue Feb 15 22:25:06 UTC 2022


On Tue, 15 Feb 2022 16:11:48 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> A test failure reproduces in GHA in x86_32 mode. Reproduces locally too:
>> 
>> 
>> $ CONF=linux-x86-server-fastdebug make run-test TEST=serviceability/7170638/SDTProbesGNULinuxTest.java
>> 
>> java.lang.Error: java.lang.RuntimeException: '.note.stapsd' missing from stdout
>> 
>> at SDTProbesGNULinuxTest.testLibJvm(SDTProbesGNULinuxTest.java:76)
>> at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
>> at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
>> at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
>> 
>> 
>> The reason is that the new test now enables `DTraceMethodProbes`, `DTraceAllocProbes`, `DTraceMonitorProbes`, but VM never actually checks those options are available. So test thinks dtrace support is there, yet there are no relevant sections in `libjvm.so`, so the test fails. We should extend the argument checks to those three options too.
>> 
>> Unfortunately, there are tests that do `DTrace*` flags, we should make them sense the build capability, and act accordingly. This simplifies some existing tests too.
>> 
>> Additional testing:
>>  - [x] Linux x86_64 fastdebug (dtrace enabled), affected test still passes
>>  - [x] Linux x86_32 fastdebug (dtrace disabled due to missing dependencies), affected test now passes
>
> Aleksey Shipilev has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Explicit DTraceOptionsTest
>  - Sense DTrace build option

Yeah that is certainly a lot more changes, the main value of which seems to be for backports given we're even thinking of dropping DTrace support entirely. (I decided not to bother trying to add a "hasDTrace" capability when fixing the issue with the VMDeprecatedOptions test as it was not worth the time and effort IMO).

One query about restricting the test to Linux below - and I'll need to take the final version for a spin in our CI before pushing, but tacit approval.

Thanks,
David

test/hotspot/jtreg/serviceability/dtrace/DTraceOptionsTest.java line 28:

> 26:  * @bug 8281822
> 27:  * @summary Test DTrace options are accepted on suitable builds
> 28:  * @requires os.family == "linux"

macOS should be a possibility too. But if you check explicitly for hasDTrace then you don't also need to limit the platform.

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

Marked as reviewed by dholmes (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7477


More information about the hotspot-runtime-dev mailing list