Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8212961: [TESTBUG] vmTestbase/nsk/stress/jni/ native code cleanup
Backport-of: fde183130bc6379fe0d4624bbeaf252d0e9a15c8
  • Loading branch information
GoeLin committed Jan 4, 2023
1 parent 1f4fc33 commit bd58dd8
Show file tree
Hide file tree
Showing 8 changed files with 656 additions and 666 deletions.
8 changes: 8 additions & 0 deletions test/hotspot/jtreg/vmTestbase/nsk/stress/jni/jnihelper.h
Expand Up @@ -41,3 +41,11 @@ static void* c_malloc(JNIEnv* env, size_t size) {
env->FatalError("Unexpected JNI Exception. TEST FAIL.");\
}\
}

// Checks return code for JNI calls that don't raise exceptions
// and generate fatal error
#define CHECK(jniCall) do { \
if ((jniCall) != 0) { \
env->FatalError("Error invoking JNI method: " #jniCall); \
} \
} while (0)

1 comment on commit bd58dd8

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.