On Fri, 30 Jun 2023 05:54:12 GMT, Serguei Spitsyn <[email protected]> wrote:
>> Alex Menkov has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> updated comment
>
> test/hotspot/jtreg/serviceability/jvmti/vthread/GetThreadStateMountedTest/libGetThreadStateMountedTest.cpp
> line 112:
>
>> 110: LOG(" ERROR: all expected 'weak' bits are set\n");
>> 111: }
>> 112: }
>
> Nit: I guess, error message at line 110 has to be:
> `ERROR: not all expected 'weak' bits are set`
> Also, it looks like the check 3a is not really needed as the 3b should cover
> it.
> But I leave it up to you, if you think check 3a gives some convenience.
'weak' value is for 'sleeping' testcase. In the case we have 2 valid states:
JVMTI_THREAD_STATE_SLEEPING and JVMTI_THREAD_STATE_PARKED, but only one of them
should be reported.
Test passes expected_weak == JVMTI_THREAD_STATE_SLEEPING |
JVMTI_THREAD_STATE_PARKED.
check 3a verifies that at least 1 bit is set (JVMTI_THREAD_STATE_SLEEPING,
JVMTI_THREAD_STATE_PARKED or both).
check 3b verifies that only one of the bits is set (i.e. we don't have both
JVMTI_THREAD_STATE_SLEEPING and JVMTI_THREAD_STATE_PARKED)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14622#discussion_r1248265672