On Wed, 4 Nov 2026 09:38:35 GMT, Volkan Yazici <[email protected]> wrote:
>> Erik Gahlin has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Use -1 to detect EOF
>
> test/jdk/jdk/jfr/event/io/TestRandomAccessFileReadLine.java line 55:
>
>> 53: }
>> 54:
>> 55: public static List<String> test(boolean enabled) throws Throwable {
>
> I'm not really sure if this way of toggling JFR is sufficient:
>
> 1. `test(true)` already enables the JFR for the VM, hence `test(false)` runs
> in a VM where `RandomAccessFile.jfrTracing` is `true`.
> 2. Even if you only have `test(false)`, `new Recording()` trickles down all
> the way to `JFRTracing.enable()`.
>
> That is, effectively, JFR (i.e., `RandomAccessFile.jfrTracing`) is always on
> for this test.
>
> You may consider multiple JTreg runs where you combine the result:
>
>
> @run main/othervm ${test.main.class} testWithJfr
> @run main/othervm ${test.main.class} testWithoutJfr
> @run main/othervm ${test.main.class} verifyResults
>
>
> Nit: `test()` can be `private`.
FileRead will be disabled, which is sufficiently to trigger the alternative
path.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/33637#discussion_r4466745552