On Fri, 29 Apr 2022 22:12:28 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

>> The test counts calls of intercepted JNI functions, but doesn't completely 
>> filter out calls from other threads.
>> Function isThreadExpected is used only for ExceptionOccurred function and 
>> the function checks only some known JFR/Graal threads.
>> 
>> The change:
>>  - updates the test to count only the calls on the test thread;
>>  - adds verbose output.
>
> Also there is 
> [JDK-8284027](https://bugs.openjdk.java.net/browse/JDK-8284027), which also 
> is a failure related to unexpected threads and fails because 
> isThreadExpected() is not filtering all the proper threads (loom makes this 
> issue worse). It looks like you are trying to make the individual tests 
> smarter rather than fixing isThreadExpected(). I'm not saying this is the 
> wrong approach, but we should apply the approach to all tests that use 
> isThreadExpected() .

@plummercj ji01t001 checks that the number of the calls >= of the expected.
I thought about make the same condition here, but decided that it would be 
better to verify for equality, but ensure we count the calls from the test 
thread only

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

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

Reply via email to