On Mon, 27 Nov 2023 09:27:40 GMT, Stefan Karlsson <stef...@openjdk.org> wrote:
>> test/hotspot/jtreg/runtime/Monitor/libMonitorWithDeadObjectTest.c line 47: >> >>> 45: >>> 46: #define check(env, what, msg) \ >>> 47: check_exception((env), (msg)); \ >> >> I'm not understanding why you have `check` and `check_exception` here nor >> why you choose to use one versus the other. ?? > > Some JNI calls return something, for those I can use `check` which combines a > null-check and an exception check. Some tests don't return anything, they > can't null-check and can only perform an exception check. Okay I had missed how the return values were being passed as `what`. It is annoying that we have to keep redefining this little helpers for error checking in these kinds of tests as we end up with similar but different ways of doing it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16783#discussion_r1407202355